Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
100 Days of AI Development with Python: 105 Hands-On Labs
New
356 students

100 Days of AI Development with Python: 105 Hands-On Labs

Master Generative AI, LLMs, Prompt Engineering, RAG, Vector Search, AI Agents, Multimodal AI and Deployment.
Last updated 11/2026
English
English [Auto],

What you'll learn

  • Develop practical AI development skills through 105 hands-on Python labs across 10 comprehensive modules.
  • Set up a secure Python development environment and manage API keys, dependencies, and environment variables.
  • Build applications using Large Language Model (LLM) request and response patterns.
  • Master prompt engineering techniques, including system prompts, few-shot prompting, and reusable prompt templates.
  • Manage conversation history, context windows, token consumption, and estimated AI usage costs.
  • Generate, parse, and validate structured JSON outputs with automated error handling and retry mechanisms.
  • Understand embeddings, vector representations, cosine similarity, and semantic search.
  • Build vector indexes with metadata filtering, similarity ranking, and Top-K retrieval.
  • Develop Retrieval-Augmented Generation (RAG) applications with grounded responses and source citations.
  • Implement AI tool calling and function calling using Python functions, schemas, and tool registries.
  • Build AI agents with planning, short-term memory, decision-making, and multi-step task execution.
  • Develop multimodal processing pipelines for images, audio, PDF documents, and DOCX files.
  • Evaluate AI responses using test datasets, automated scoring, validation, and regression testing.
  • Build and serve AI-powered web APIs using Python.
  • Complete an end-to-end capstone project combining RAG, source citations, API development, and automated evaluation.
  • Develop reusable AI development components and establish a consistent hands-on learning routine.

Course content

10 sections • 105 lectures • 15h 12m total length
  • Checking Your Python Version from a Script6:59

    Every AI application you build in this course is a Python program, and Python itself changes between versions. Some libraries need a recent release, and some behave differently on older ones. In this opening lab you will check your Python version from a script, which is the first line of defence against confusing environment problems.


    You will begin with the sys module. You will read sys.version and sys.version_info, and see that the second one is a named tuple that you can compare directly with another tuple, such as three and ten, to decide whether the interpreter is recent enough. You will also print the executable path and the platform so that you know exactly which Python is running.


    Next you will write a small function that enforces a minimum version. It takes the required version as a tuple, compares it with the running one and either returns quietly or raises a clear error that names both the required and the installed version and tells the user what to do. You will call it at the top of a script so that an old interpreter fails immediately with a helpful message, instead of crashing later with a confusing syntax error.


    You will test the function by passing different required versions, including one that is deliberately too high, and read the output. You will also use platform.python_version for a short text form.


    You will discuss why this matters for AI work, where packages with native code are sensitive to the interpreter version.


    By the end of this lab you will be able to read and compare the Python version in code and fail early with a clear message.

  • Creating a Virtual Environment in Code6:18

    Virtual environments keep each project's packages separate. Normally you create one from the command line, but you can also do it from Python itself, which is useful for setup scripts. In this lab you will create a virtual environment in code.


    You will begin with a quick reminder of why isolation matters. Without it, installing a package for one project can break another, and it becomes impossible to say which versions a project really needs. A virtual environment is a folder that holds its own interpreter link and its own packages.


    Next you will use the standard venv module. You will import it and call venv.create with a folder name, and learn the useful options, such as with_pip to include pip and clear to replace an existing environment. You will inspect the folder that results, find the scripts or bin directory and the pyvenv.cfg file, and read what the configuration records.


    You will then write a function that creates the environment only if it does not already exist, using pathlib to check, and returns the path to the interpreter inside it for the current operating system. You will handle the differences between Windows and other systems in how the interpreter path is laid out.


    You will run the interpreter from inside the new environment using subprocess with an argument list, check its version and confirm that it is separate.


    You will remove the environment safely at the end of the exercise.


    By the end of this lab you will be able to create and locate a virtual environment from a Python script.

  • Detecting Whether a Virtual Environment Is Active5:05

    A common cause of mystery errors is running a script outside the virtual environment you meant to use. Packages seem to be missing, or the wrong versions appear. In this lab you will detect whether a virtual environment is active.


    You will begin with how Python records it. Inside a virtual environment, sys.prefix points to the environment folder, while sys.base_prefix points to the original installation. Outside one, they are the same. You will print both values in two situations, with and without activation, and compare them to see the difference.


    Next you will write a function, named something like in_virtualenv, that returns a boolean based on that comparison. You will also read the VIRTUAL_ENV environment variable and discuss why it is a weaker signal, since it is set by an activation script and not by Python, so a script run with the environment's interpreter directly may not have it.


    You will use the function to protect your tools. A helper called require_virtualenv raises a clear error with instructions if the environment is not active, and you will place it at the start of a script. You will add an option to bypass the check for cases where it is genuinely not needed, such as inside a container.


    You will test by running the script both ways and reading the messages. You will also record the result in a small environment report dictionary that includes the interpreter path and version.


    By the end of this lab you will be able to detect virtual environments reliably and guard scripts against running in the wrong place.

  • Writing and Reading a requirements.txt File7:37

    A project that works on your computer needs a way to describe its dependencies so that others, and your future self, can recreate the setup. The standard way is a requirements.txt file. In this lab you will write and read one in code.


    You will begin with the format. Each line names a package, optionally followed by a version specifier such as double equals and a number, a minimum version with greater-than-or-equal or a compatible release with a tilde. Comments begin with a hash, and blank lines are ignored.


    Next you will write a function that creates the file from a dictionary of package names and versions, sorts the entries so that the file is stable and writes them with pathlib. You will then write the reading function. It opens the file, skips comments and blank lines, splits each line into a name and a specifier with a regular expression and returns a list of small records. You will handle unusual lines, such as extras in square brackets or environment markers, by reporting them clearly and not crashing.


    You will compare the file with the installed packages using importlib.metadata, and report which are missing or at a different version. You will also discuss pinned and unpinned requirements and why pinning gives repeatable results for AI projects, where small library changes can alter behaviour.


    You will test the reader with a sample file that contains tricky lines.


    By the end of this lab you will be able to write, parse and check a requirements file programmatically.

  • Reading Configuration from Environment Variables6:44

    AI applications need settings such as model names, API keys and limits. Writing them directly into code is a mistake, since the code gets shared and the values differ between machines. Environment variables are the standard solution. In this lab you will read configuration from environment variables.


    You will begin with os.environ, a dictionary-like object that holds the variables of the running process. You will read a value by indexing, and see the KeyError when it is absent, then with the get method and a default. You will explain when a missing value should be an error and when a default is acceptable.


    Next you will write a small configuration function. It reads a list of required variables, collects any that are missing and raises one error that names all of them, which is friendlier than failing on the first. It also handles optional settings with defaults, and converts types, such as turning a text value into an integer or a boolean, with clear messages for invalid input, since environment variables are always strings.


    You will build a configuration data class with fields for the model name, a timeout, a debug flag and a placeholder key. You will fill it from the environment, and print it with the secret hidden.


    You will set variables for a single run on your operating system, and from Python using a copy of the environment passed to a subprocess, without changing your own.


    You will use placeholder values only, never real keys.


    By the end of this lab you will be able to read, validate and convert settings from the environment.

  • Parsing a .env File by Hand7:26

    Many projects keep their settings in a file named .env, with one name and value per line. Libraries exist to read it, but writing a parser by hand teaches you exactly what they do. In this lab you will parse a .env file by hand.


    You will begin with the format. Each line has a name, an equals sign and a value. Lines starting with a hash are comments, blank lines are ignored, values may be wrapped in single or double quotation marks and a line may begin with the word export so that it works in a shell.


    Next you will write the parser. You will read the file with pathlib, loop over its lines and strip whitespace. You will skip comments and blanks, split each line once on the first equals sign using partition so that values containing equals signs are preserved, and remove matching quotes from around the value. You will validate names with a regular expression, allowing letters, digits and underscores, and report the line number of any problem.


    You will handle trailing comments carefully. A hash inside quotes is part of the value, while a hash after an unquoted value starts a comment, which requires a little more logic. You will return a dictionary and write tests with assert for many tricky lines.


    You will discuss the limits of a hand-written parser, such as multi-line values and variable expansion, and why mature libraries are used in production.


    You will use only placeholder values in the sample file.


    By the end of this lab you will be able to parse a simple configuration file and test it against tricky input.

  • Loading .env Values into the Environment7:43

    Parsing a .env file gives you a dictionary, but your program reads settings from the environment, not from a dictionary. The next step is to load the values into the process environment. In this lab you will load .env values into the environment.


    You will begin with the target. The os.environ object can be modified, and the changes apply to the running process and to any child processes it starts. You will set a variable, read it back and observe that the change disappears when the program ends, and does not affect your terminal.


    Next you will write a loader that uses your parser from the previous lab and copies each value into os.environ. You will decide on a policy for conflicts. By convention, variables that already exist in the real environment should win over the file, because deployment systems set real values, so you will use setdefault, with an override option for cases where you want the file to win.


    You will print a summary of what was loaded, taking care to show only the names and not the values, and log the count at the debug level. You will handle a missing file gracefully, since the file is optional in production.


    You will then combine this with the configuration reader from earlier, so that settings come from the real environment first, then from the file and then from defaults. You will write tests that use a temporary file and restore the environment afterwards, to avoid leaking changes between tests.


    You will discuss the order of precedence and its benefits.


    By the end of this lab you will be able to load file-based settings into the environment safely.

  • Keeping Secrets Out of Git with .gitignore9:13

    Secrets leak most often through version control. A key committed to a repository is public to everyone who can read it, and removing it later does not remove it from the history. In this lab you will keep secrets out of Git with a .gitignore file.


    You will begin with what .gitignore does. It is a text file that tells Git which files and folders to leave out of the repository. You will learn the pattern syntax, including names, wildcards, folders with a trailing slash, negation with an exclamation mark and comments. You will write a file that excludes the .env file, virtual environment folders, caches, logs and output folders.


    Next you will write Python code that checks a project. It reads the .gitignore file, converts its patterns into checks with the fnmatch module, and tests whether a list of sensitive file names would be ignored. You will report any sensitive file that is not covered, such as an .env file in a project without the right rule.


    You will also scan project files for strings that look like keys, using a regular expression, and report the file and line number without printing the value. You will run it on a practice folder that contains invented placeholder keys.


    You will discuss good practice. You should commit a template file, such as .env.example, with placeholders. You should treat any key that was ever committed as exposed and rotate it, and you should consider using a secret scanning tool or a pre-commit hook.


    By the end of this lab you will be able to write ignore rules and check a project for exposed secrets.

  • Masking API Keys Before Printing8:10

    Even with careful storage, a key can leak through a print statement or a log. Masking hides most of a secret while keeping enough to recognise it. In this lab you will mask API keys before printing.


    You will begin with the problem. A debug message that prints the whole configuration is useful until it ends up in a shared log, a screenshot or a support ticket. A masked value, such as the first few characters followed by asterisks, still lets you check that the right key is in use without exposing it.


    Next you will write a masking function. It takes a string and shows only a small number of characters at the start and end, replacing the rest with a fixed-length run of asterisks, so that the length of the secret is not revealed. You will handle short values by masking them completely, since showing characters from a very short secret would reveal most of it, and handle empty values and None.


    You will then apply masking to structures. A function walks a dictionary, including nested ones, and masks the values of keys that look sensitive, such as those containing key, token, secret or password, ignoring case. You will use it when printing the configuration data class.


    You will extend it to scan free text with a regular expression and replace anything that looks like a key, which is useful for log messages and error output, and test it with placeholder values.


    You will discuss that masking is a second line of defence and not a replacement for keeping secrets out of logs.


    By the end of this lab you will be able to mask secrets in values, dictionaries and text.

  • Building a Chat Request Payload6:43

    Language model APIs communicate through requests that follow a standard shape. Before calling anything, you should be able to build one and understand each part. In this lab you will build a chat request payload.


    You will begin with the structure of a typical chat request. It contains the name of the model, a list of messages and optional settings. Each message is a dictionary with a role, such as system, user or assistant, and its content. You will see how the list represents a conversation in order.


    Next you will write a function, build_chat_request, that takes a model name, a list of messages and keyword options such as temperature and a maximum number of tokens. It assembles a dictionary, includes the optional settings only when they are provided and returns it. You will convert it to JSON with json.dumps and print it with indentation to see what would be sent over the network.


    You will add checks. The model name must be a non-empty string, the messages must be a non-empty list of dictionaries with allowed roles and string content and numeric options must lie in valid ranges. You will raise a ValueError with a specific message for each problem, and test them.


    You will also use a data class to represent a message, with a method to convert it to a dictionary, and compare it with using plain dictionaries.


    No network call is made in this lab. You are only building and inspecting the data.


    By the end of this lab you will be able to build and validate a chat request payload.

  • Your First Model Call with a Stub Client6:45

    It is time to make a model call, but without a network, a key or any cost. A stub client stands in for the real service, with the same interface and a predictable answer. In this lab you will make your first model call with a stub client.


    You will begin with the reason for stubs. Developing against a real service is slow and costs money, and results vary from run to run, which makes testing hard. A stub lets you write and test all your application logic first, and swap in the real client afterwards.


    Next you will design the interface. A client class has a method, such as chat, that accepts the request dictionary you built in the previous lab and returns a response dictionary with the same shape as a real one, including a list of choices, each with a message, a finish reason and a usage section with token counts. You will write the stub so that it returns a canned reply, perhaps echoing part of the last user message, and records every request it receives.


    You will write a function that sends a request, reads the reply text from the nested response and prints it, and use the recorded requests in an assert to confirm that the right payload was sent. You will also write a second class with the same method, which shows how a real client would plug in, without implementing the network part.


    You will discuss that code which depends on the interface, not on a specific class, is easier to test.


    By the end of this lab you will be able to define a client interface, write a stub and make your first call.

Requirements

  • Basic knowledge of Python programming, including variables, functions, loops, lists, and dictionaries.
  • A computer running Windows, macOS, or Linux.
  • Python 3 installed on your computer.
  • A code editor such as Visual Studio Code, PyCharm, or any preferred Python IDE.
  • Basic familiarity with running Python scripts from a terminal or command prompt is helpful.
  • No previous experience with Artificial Intelligence, Generative AI, or Large Language Models is required.
  • No advanced mathematics, statistics, or machine learning knowledge is required.
  • No paid AI API subscriptions are required for the core stub-based programming exercises.
  • No specialized GPU or expensive computing hardware is required for the core labs.
  • A willingness to practice consistently, experiment with code, and complete hands-on exercises.

Description

This course contains the use of artificial intelligence.

Are you ready to move beyond using AI tools and start building your own intelligent applications? Welcome to 100 Days of AI Development with Python, a comprehensive, hands-on course designed to help you develop practical skills in Artificial Intelligence, Generative AI, Large Language Models (LLMs), Agentic AI, and Python Programming.

With 105 hands-on labs across 10 comprehensive modules, this course provides a structured learning journey that takes you from foundational AI development concepts to building, evaluating, and serving intelligent applications using Python.

Unlike traditional AI courses that focus heavily on theory, this course emphasizes hands-on learning, practical coding exercises, AI application development, and project-based learning. Every lesson introduces practical concepts that help you understand how modern AI systems work.

Begin your journey by setting up a secure Python development environment, managing virtual environments, configuring dependencies, protecting API keys, and understanding model request and response structures.

Explore Large Language Models (LLMs) and learn how to manage conversation history, system messages, token limits, context windows, streaming responses, and AI usage cost estimation. Develop essential Prompt Engineering skills using few-shot prompting, reusable prompt templates, temperature settings, and generation parameters.

Discover how to create reliable AI applications using Structured Outputs, JSON Parsing, Schema Validation, Error Handling, and Automated Retry Mechanisms. Learn techniques for improving response consistency and handling malformed AI-generated content.

Dive into AI Embeddings, Vector Search, Semantic Search, Cosine Similarity, Vector Indexing, Metadata Filtering, and Similarity Ranking. Understand how information can be represented, indexed, and retrieved efficiently within intelligent applications.

Master the fundamentals of Retrieval-Augmented Generation (RAG) by implementing document chunking, context retrieval, relevance filtering, token budgeting, grounded question answering, and source citation validation.

Take your AI development skills further with AI Agents, Agentic AI, Tool Calling, Function Calling, Tool Registries, and Intelligent Automation. Build loop-based agents capable of planning tasks, maintaining short-term memory, executing tools, tracking progress, handling failures, and completing multi-step workflows.

Explore Multimodal AI by processing images, audio recordings, PDF documents, and DOCX files. Learn about binary file processing, Base64 encoding, image token estimation, audio metadata, transcription patterns, document extraction, and unified multimodal pipelines.

Develop essential LLM Evaluation, AI Testing, AI Quality Assurance, Regression Testing, and Automated Evaluation skills. Learn how to measure response quality, validate structured outputs, identify regressions, and establish quality gates.

Finally, explore AI API Development, Python Web Services, REST API Fundamentals, Endpoint Routing, Deployment Readiness, and Health Monitoring. Bring everything together through a comprehensive capstone project combining retrieval, grounded question answering, source citations, API development, and automated evaluation.

This course is ideal for Python Developers, AI Engineers, Software Engineers, Machine Learning Engineers, Data Scientists, Backend Developers, AI Consultants, Technology Professionals, and aspiring Generative AI Developers.

The core exercises use lightweight, simulated model clients, allowing you to explore AI development patterns without requiring expensive GPUs, paid AI subscriptions, or advanced machine learning knowledge.

Whether you want to pursue a career in AI Engineering, develop AI-powered applications, explore Generative AI development, build intelligent AI agents, or strengthen your Python programming skills, this course provides a practical foundation for your journey.

Build consistently. Experiment confidently. Learn by doing.

Enroll today and begin your 100 Days of AI Development with Python journey!

Who this course is for:

  • Python developers who want to transition into Artificial Intelligence and Generative AI development.
  • Aspiring AI Engineers looking to build practical AI application development skills.
  • Software engineers interested in integrating Large Language Models into applications.
  • Developers interested in building AI agents, intelligent assistants, and automated workflows.
  • Professionals looking to learn Retrieval-Augmented Generation (RAG), embeddings, and vector search.
  • Students and graduates seeking practical experience in modern AI technologies.
  • Data Scientists and Machine Learning Engineers looking to expand their Generative AI development skills.
  • Backend developers interested in building and serving AI-powered APIs.
  • Technology professionals looking to upskill in Agentic AI, function calling, and multimodal AI.
  • AI enthusiasts who want to move beyond simply using chatbots and start building AI applications.
  • Entrepreneurs and startup founders interested in understanding AI application development.
  • Freelancers and consultants looking to expand their technical AI capabilities.
  • Self-taught programmers who prefer structured, project-oriented learning over purely theoretical courses.
  • Anyone with basic Python knowledge looking for a structured 100-day AI development challenge featuring 105 hands-on labs.