Feedback

Chat Icon

Practical MCP with FastMCP & LangChain

Engineering the Agentic Experience

Prerequisites
26%

Pyproject: The Modern Python Project

In the past, Python projects were often managed with a combination of:

  • setup.py: A Python file that defined the package metadata and dependencies.
  • requirements.txt: A text file that listed the dependencies for the project.
  • virtualenv: The virtual environment tool that created isolated environments for Python projects.

This approach is fragmented and is neither productive nor efficient. It requires multiple files and tools to manage a single project, which can lead to confusion and errors. The modern approach to Python project management is to use a single file called pyproject.toml. This file is a standardized format for defining the project metadata, dependencies, and build configuration. It was introduced in PEP 518 (Python Enhancement Proposal) and has since become the standard for Python projects.

With pyproject.toml, you can define your project metadata, dependencies, and build configuration in a single file. This simplifies the project management process and makes it easier to maintain and share your projects. Tools like uv, Poetry, and others have adopted pyproject.toml as the standard for Python project management.

The TOML file defines your project’s metadata, required Python version, dependencies, and build system in a single standardized format. Instead of spreading configuration across multiple files, it becomes the single source of truth for how your project is built and installed.

At minimum, a simple project might look like this:

[project]
# Project name
name = "mcp-server"
# Project version
version = "0.1.0"
# Project description
description = "A simple MCP server"
# Required Python version
requires-python = ">=3.12"

# Project dependencies
dependencies = [
    "openai",
    "fastapi",
]

Here:

  • name and version identify the package.
  • requires-python defines the supported interpreter versions.
  • dependencies

Practical MCP with FastMCP & LangChain

Engineering the Agentic Experience

Enroll now to unlock current content and receive all future updates for free. Your purchase supports the author and fuels the creation of more exciting content. Act fast, as the price will rise as the course nears completion!