Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 1.02 KB

File metadata and controls

43 lines (27 loc) · 1.02 KB

Python Workers: FastMCP Example

This is an example of a Python Worker that uses the FastMCP package.

Deploy to Workers

Note

Due to the size of the Worker, this example can only be deployed if you're using the Workers Paid plan. Free plan users will encounter deployment errors because this Worker exceeds the 3MB size limit.

Developing and Deploying

To develop your Worker run:

uv run pywrangler dev

To deploy your Worker run:

uv run pywrangler deploy

Testing

To test run:

uv run pytest tests

Linting and Formatting

This project uses Ruff for linting and formatting:

uv ruff format . --check
uv ruff check .

IDE Integration

To have good autocompletions in your IDE simply select .venv-workers/bin/python as your IDE's interpreter.