This file provides guidance to Claude Code (claude.ai/code) or Opencode (opencode.ai) when working with code in this repository.
Subdirectory AGENTS.md files provide package-specific context (key classes, where-to-look tables, local conventions and anti-patterns).
- Suggest updates to AGENTS.md when you find new high-level information
This repository (workers-py) contains three Python packages that are used for Cloudflare Python Workers.
packages/clicontains the command-line interface for managing Python Workers, including installing packages, running workers locally, and uploading workers to Cloudflare.packages/runtime-sdkcontains the runtime SDK for Python Workers, which provides a base class for Python Workers and utilities for working with Cloudflare's runtime.packages/django-cfis the Django integration package, providing database backends for D1 and Durable Objects, an R2 storage backend, and Cloudflare Access middleware.
For cli conventions, see packages/cli/AGENTS.md.
For runtime-sdk conventions, see packages/runtime-sdk/AGENTS.md.
For django-cf conventions, see packages/django-cf/AGENTS.md.
This project uses the following tools to manage the build process:
uvfor package installation and running of tools. Never use system Python or pip directly.pytestfor the implementation of tests, useuv run pytestto run tests.pre-commitfor linting and formatting, useuv run pre-commit run --all-filesto run pre-commit.
Since this repository contains three packages, cli, runtime-sdk, and django-cf, the build system and commands are managed separately for each package.
Every command should be run inside the respective package directory, not at the root of the repository.