← All featuresPython Development

Keep the Python environment with the project that uses it.

Manage Python environments, use Pyright and Ruff, inspect models, generate type stubs, run Pytest, and profile supported workloads in Flame IDE.

Flame's shared editor, project navigation, and terminal. Open Python environment and model tools for the relevant project. Select the image to enlarge.
WHY IT HELPS

Trace a Python failure from interpreter to application data.

When two services use different Python environments, a passing test in the wrong interpreter tells you little. Flame keeps environment selection per project, brings Pytest results into the test explorer, and provides tools for type stubs and model inspection. Use the source, terminal, API client, and Git diff to verify the complete change.

Choose the interpreter deliberately

Discover virtualenv, Conda, Poetry, Pipenv, system, and custom environments. Select the executable per project, create a virtualenv through uv or venv, and use supported isolated runtime downloads when appropriate.

Inspect a typed data boundary

Generate .pyi stubs for supported targets and inspect Pydantic, dataclass, NamedTuple, and TypedDict models. Read the generated schema and validate a sample JSON payload before changing an API consumer.

Connect tests and measurements

Run Pytest, inspect parameterized cases and fixture relationships, and view coverage when the project supplies it. Python CPU profiling uses py-spy with a cProfile fallback; memory profiling depends on the supported tools available on the host.

HOW TO USE IT

Fix a validation regression in a Python service.

  1. Select the project environment

    Open the Python service and select its intended interpreter. Create or discover the environment, then install the repository's dependencies using its own package and lockfile workflow.

  2. Reproduce the failure

    Run the relevant Pytest case in the test explorer or project terminal. Confirm the interpreter and inputs before asking an agent to investigate.

  3. Inspect the data model

    Open the model inspector for the affected source, examine fields and schema, and validate a representative JSON payload. Generate a type stub when an untyped boundary needs one, then review its signatures.

  4. Repair, rerun, and review

    Make a focused correction, or attach the failing test and model context to an agent. Rerun the regression and normal-case tests, inspect the Git diff, and verify the endpoint if its behavior changed.

REQUIREMENTS & LIMITS

Know what the tool depends on.

  • Environment and package operations require working host toolchains and, for downloads, network access. Availability differs by platform and selected runtime.
  • Pyright, Ruff, debugpy, Jupyter kernels, and profiler tools need the appropriate installation or project setup. Language intelligence and debugger support are separate capabilities.
  • Coverage needs compatible coverage output, commonly pytest-cov or coverage.py. A model schema or generated stub should be reviewed against actual runtime behavior.
  • py-spy and memray have their own platform and permission requirements. Use the tools Flame reports as available rather than assuming every profiling mode works on every host.
FAQ

Python Development: common questions