top of page
Castello di Pergolato Banner.jpg

Python Zero to Hero 2024
with Michael Kennedy

Castello di Pergolato
Tuscany, Italy
October 5 - 12, 2024

Spend a week in a luxurious Tuscan castle.


Each morning, learn Python with world-renowned expert Michael Kennedy. In the afternoons and evenings, explore the best Tuscany has to offer with hosts Larry Lustig and Marco Chelo, and local guides, and enjoy the Castello di Pergolato, an 11th century fortress converted to an aristocratic villa in the 15th century.

Bring a companion! There are extra morning activities for them if they're not interested in the course.

Video Introduction

Python From Zero to Hero is a new course in 2024.  But look at the video below for a retrospective on one of our other courses in 2023.

The Course

Twenty-four hours of instruction covering Python and associated technologies. We will build a complete web application and API from scratch!

Rooms & Prices

Rooms start at $4,000 per person, double occupancy with the exact cost depending on the room you select.  See the Room Chart for a listing of all rooms.


Private ensuite room

Course tuition


Four Lunches

Four dinners



The Location

Chianti is the heart of classic Tuscany with rolling hills covered in vines and olive trees.  We're in a beautiful rural area with easy access to Florence, Siena, and hill towns like San Gimignano.


Class is four hours in the morning, during which there are extra activities for family members.  In the afternoon we'll meet up as a group for tours.  If you want time to yourselves, feel free to take off on your own -- we're here to advise you.

The Team

The program has three full-time staff from Code in a Castle: Michale(the instructor), and Larry and Marco (the hosts).  In addition, we make use of local guides on several days.  The castle has its own staff as well. 

The Castle

The Castello di Pergolato originated as a fortress in the 11th century but was converted to a country villa in the 15th.  Today it's an historic but comfortable private castle with swimming pool.

Food & Drink

Italy.  Tuscany.  Chianti.  Eating and drinking will be a big part of our week, from breakfast in the Rose Garden to welcome and farewell dinners at the castle.  Drinks, including outstanding wines from Tuscany, are also included.

The Course

Have you always wanted to build a website and API using Python? Maybe you already have one, but it's built using older, aging technology. This course will take you on a whirlwind tour of the latest Python technologies: FastAPI, Pydantic, async & await, HTMX, and MongoDB. And we will combine them into an impressive clone of If you're looking to level up your career and need some hands-on experience with new Python libraries and techniques, this course will definitely fit the bill.

Python From Zero to Hero is intended for for anyone who wants to build an API with Python as the backend language. And for people who want to leverage a modern database such as MongoDB and talk to it using Python's latest APls (async and await, Pydantic and more).

In terms of expected experience levels, the more experience you have with Python, databases, and the web, the better. However, we do spend the first day talking pure Python topics. This is to ensure that everyone has a level playing field for the rest of the content.

If you have literally never programmed in any language, this course will be too advanced. Otherwise, bring a can-do attitude and we'll make it happen for you through out the course.


For this you'll need the following:

* A working knowledge of Python or some other general-purpose programming language.

* A laptop computer.  You'll get instructions on software to install closer to the program

Topics Covered​​

Day 1:

  • Python Foundations

  • Language foundations

  • External packages

  • Strongly typed python

  • Working with data with Pydantic

  • Exercises


Day 2:

  • Web foundations

  • Async Python and async and await

  • Introducing Document Databases and MongoDB

  • Docker lightening introduction

  • Exercises

Day 3:

  • Database foundations

  • Foundations of the Beanie ODM (History, Registering Connections, etc.)

  • Modeling data with Document DBs and Pydantic Classes

  • Querying and Inserting Data with Beanie's async API

  • Exercises

Day 4:

  • Intro to FastAPI

  • Building a realistic API with FastAPI

  • Accepting inbound data with FastAPI

  • Web apps/pages/html with FastAPI

Day 5:

  • Interactive web pages without JavaScript

  • Introducing HTMX

  • HTMX for dynamic search

  • Deep linking with HTMX

  • Better HTML organization and sharing with Jinja partials

  • Exercises

Day 6:

  • Performance testing and deployment

  • Understanding modern web app typologies

  • Running our app in "production"

  • Performance Testing with

  • A peak inside's infrastructure

  • Exercises

Attendees & Carl Franklin in class.

The Area

The castle is located in Chianti, the classic region of Tuscany stretching from Florence in the north to Siena in the south.

The Castle

The Castello di Pergolato (also called Castello Lorenzo) has its origins as a fortress in the 11th century.  In the 15th century it was converted from use as a defensive fortification to a country residence of Florentine nobility.

The castle is surrounded by cypress and olive trees and equipped with a pool and even a small gym.   It even has air conditioning, which is somewhat unusual for this area.

It's rural setting is about two miles from the nearest town and easily reachable from the airports at Florence, Pisa, and Bologna.  You can also drive from Rome or Milan.

We'll have exclusive use of the castle and grounds for the week of the course.

Rooms & Prices

Early Bird Special

Until July 10th we're offering a discount of $500 off any room (single, double, or triple occupancy).  Full prices are listed below.  Contact us and we'll invoice you at the discounted rate.

Prices are per room and depend on the room selected and the number of people occupying the room.  Everyone who attends is welcome, but not required, to take the course.  We do expect that at least one person in each room is there for the course.  During class, companions are free to enjoy the castle facilities or to participate in additional escorted activities arranged for them.

Some rooms can be made up with one large bed or two twin beds (as is common in Europe).  If you are a single course participant and looking to split the cost of a room, contact us and we'll put you in touch with anyone else who has a similar interest.


We're currently collecting detailed information about the rooms at Castello di Pergolato.  Check back in a few weeks for the complete room list and detailed pricing.

Pricing will start from

$4,000 per person double occupancy w/ shared bath ($6,000 single)

$4,500 per person double occupancy w/ private bath ($7,000 single)

Please note the following

  • All rooms have air conditioning, although on very hot days the rooms do not get as cold as American air conditioning.

  • Some rooms have private bathrooms and some might share with one other room, depending on attendance.

  • Those rooms marked as "Double or 2 Singles" have two twin beds combined into a double bed, which can also be separated.
  • Mattresses and pillows tend towards "extra firm".

  • Where triple occupancy is available, the third bed is a roll-away and is appropriate for a child or teenager.

  • The windows do not have screens (typical for Europe).

The Team

Our team will ensure that your visit to the Castello di Pergolato is not only the most valuable professional learning experience you've ever had, but also an unforgettable getaway.  In addition to our team members, the attentive castle staff will endeavor to make your stay delightful.  


Breakfast is daily from 8:00 to 9:00 am.  For those taking the course, classes will run from approximately 9:00 am to 1:00 pm each day. For those not taking the course, activities generally start around 10 am. The rest of the group will join us later in the day.

We keep the group pretty busy (there's a lot to see and do in Tuscany) but all activities are optional so if you want a day to simply enjoy the castle and hang out by the pool, do it!

All the activities (admissions, guide fees, etc.) are included in the trip.  For the very small number of exclusions, see the descriptions below, and the Inclusions & Payments section.

We keep the specific itinerary flexible to account for special opportunities and to plan around the weather, but here are some of the activities we have planned for the week.

Vineyard Tour & Tasting

Chianti was the first legally defined wine growing region in the world.  We'll visit a local vineyard for a tour of the vines, wine making process, and cellars before sitting down for a guided tasting


Local Hill Towns

The most famous hill towns in the world are found in Tuscany (and neighboring Umbria).  Using our local knowledge we'll visit some of the off-the-beaten path towns as well as dropping into San Gimignano for dinner one evening (after the tourist crowds have left).


Tour of Siena

You've heard of Florence and you've heard of Pisa, but do you know Siena?  Siena is the most attractive and interesting city in Tuscany. We'll take a guided tour of the city, focusing on the history of the Palio, a wild horse race that has taken place in the city's central piazza for 400 years.  Oh — and ice rcream.


Organic Farm Visit

We'll visit our friends at farmhouse La Pineta where they produce organic wine from heritage grapes as well as raising animals and crops.  If we have time, we'll ask them to do a participatory pasta making workshop.


Food & Drink

Both food and drink are treated with a great deal of respect by Italians, and we'll be doing the same during our week in Tuscany.  Breakfast at the castle is included every day.  Lunch is included on some days, and four of the dinners are also included.  Drinks, including alcohol and a variety of interesting Italian soft drinks, are also included.  We make every effort to cater to special diets.


Breakfast: Breakfast is served by the castle staff and can be enjoyed indoors or in the garden.  Breakfasts in Italy tend to be heavy on pastries, but there will also be salumi (meats) and cheeses available.

Lunch: Lunches will be available at the castle in the form of a cold buffet of breads, meats, cheeses, vegetables, and fruits.  When away from the castle, lunch may be part of a visit to a local food producer, or may be at a seaside pizzeria or local osteria.

Dinner: Two of our dinners, on days two and seven, will be catered affairs at the castle.  These will be served in the garden, weather permitting, or in the castle's dining room.  We'll set the menus for these dinners once we know the preferences of all the attendees.

Other included dinners will be in well-respected local restaurants.  For one of these dinners dressier clothes are appropriate.

 For those dinners not included, we're happy to advise you on the local restaurant scene and help with reservations.  Please note that many restaurants in Italy require reservations and don't open for dinner until 8pm.


It's no secret that Italians in general, and Tuscans in particular, are a wine-drinking people.  A selection of local wines will be available at the castle.   Included meals also include house wines with lunch and dinner.

In addition, Italy has a rich culture of pre-dinner (aperitivi) and post-dinner (digestivi) drinks.  We'll stock the castle with a variety of Italian amari (bitters) and other items for those who want to educate themselves about this aspect of Italian dining.

Non-drinkers are also cared for with a rich selection of Italian soft drinks which rarely make it out of the country.  It's not necessary to drink alcohol to experience new tastes in Italy.

Special Diets

If you have special dietary restrictions, we're here to help you.  At our group meals, we'll make sure you have plenty to eat. For meals on your own, we can help you find a suitable restaurant and make sure that the restaurant understands your requirements.

Gluten-Free: For a country so identified with pasta, there is a surprising awareness about gluten-free diets in Italy.  The good news is that Italy has a long gastronomic history of using non-wheat flours (such as chickpea and chestnut flours) for both sweet and savory dishes.

Pescatarian, Vegetarian, and Vegan: Experienced Italian eaters know that one secret of Italian food is that the meat is rarely the star of the meal.  Pescatarians and vegetarians will have no problem at all eating during our week in Italy.  If you're vegan, you'll have a slightly harder time of it (you already knew that, didn't you?) but you'll still find plenty of delicious pasta and vegetable dishes.

Low Carb & Keto: While Italy is known for pizza and pasta, the local cuisine is also rich in salumi (preserved meats) and cheeses.  Tuscan beef is famous around the world.  It is possible to have a rich food experience while still following a low carb diet.

Religious: Yes, there is a fair amount of pork in the Italian diet but, as with meat in general, it's easy to avoid and we're happy to help.  Tuscan beef is famous, and pizza is generally safe (and is available in non-dairy styles as well).

Inclusions & Payment

Included in the Price

  • Accommodation as selected during booking, including one mid-week housekeeping.

  • Full use of the castle's pool and other facilities, exclusive to our group.

  • Tuition in the course for 1, 2, or 3 people per room.

  • Meals:

    • ​Breakfast every day

    • Four dinners: catered welcome dinner at the castle on the second night, a farewell dinner on the last night, and two other restaurant dinners.

    • Four lunches during tours.

  • House wine and other drinks included with all meals and at the castle.

  • All activities discussed in the Activities section, including guiding fees and admissions where required.

Not Included

  • Transportation to and from the venue.

  • Transportation to the various activities (but if you prefer not to rent a car, contact us and we'll consider providing transportation for a small supplement).

  • Mandatory travel insurance.

  • Meals not specified in the Included section.


A deposit of 25% is required at the time of reservation to select a room.  This deposit is refundable for 14 days or until July 30th, whichever is earlier.  After that, the deposit is non-refundable.

Full payment is due July 30th.  This payment is non-refundable.  In the event that you are not able to attend, you may nominate an alternate person to attend in your place.

We accept payment by bank wire, credit card, Apple Pay and Google Pay.


You are required to have insurance with "cancel for any reason" coverage.  We will ask you for the name of the carrier and the policy number during booking.

Inquire / Book Now


Please whitelist in your email client to ensure you receive responses!

Booking and inquires start the same way, by contacting us using the form below.  We're happy to communicate by email or to give you a call at your convenience.

You should always hear back from us within 24 hours (unless you requested a phone call at a later time).  If you submitted a contact form and haven't heard back from us as expected or if you have an urgent question, then please text Larry at +1 917-548-0384 and he'll get back to you as soon as possible.

Thanks for your inquiry! If you haven't heard back in 24 hours, something has gone wrong.  If that happens, please email directly.

Frequently Asked Questions

Is this course tax deductible?

You will need to consult your tax advisor.  In general, the cost of training and education (including transportation and lodging) is deductible under US law if it relates to your business and benefits your business activities.

Will my employer pay for this course?

It's possible.  This is a professional education course taught by a well-known professional trainer who offers similar (but generally less in-depth) versions of the same materials at conferences and corporate training sessions.   The cost, on a double-occupancy basis, is generally in line with courses of similar length taught in other venues.  We are always happy to communicate with your HR department if they have questions or if they require an itemized breakdown.

Is there a minimum number needed for the course?

Yes, we need to fill six of the ten rooms in order for the course to go ahead.

What language is the course taught in?

While our team speaks English, Italian, some French, and some Spanish, all the teaching will be in English only.

Do I need my own transportation?

Yes. We expect each party to arrive at the venue by car. If you are interested in sharing a car with another attendee, please let us know and we'll put you in touch with anyone else in a similar position.  If you prefer not to drive, we're considering offering transportation service in a small mini-bus for an extra charge of about $500 per person.  Please inquire if interested.

Is the Castello di Pergolato a hotel?

No, the castle is not a hotel.  Think of it more as a very, very nice vacation rental that is only available as an exclusive weekly rental.  No one else will be staying there with us although they'll be some cleaning staff.

Will my non-course attending companion enjoy this program?

Yes, possibly more than you!  We work very, very hard to ensure that there's plenty of activity for everyone.  While attendees are in class, other people can enjoy the castle or some of the separate activities we organize for them.  Of the three-person staff we'll have at the program, only Michael is dedicated to the instruction. Larry and Marco will be organizing other activities.

What if I'm one person but want to pay the double-occupancy rate?

We don't arrange roommates ourselves, but if you're interested in sharing one of the rooms that can be configured with twin beds, please let us know and we'll put you in touch with anyone else who is also interested.

Is my special diet accommodated?

We make every effort to cater to special diets.  If your diet isn't covered in the Food & Drink section, please contact us with details and we'll see what we can do.

bottom of page