Your Python APIFrom endpoint to release

Build your application logic with FastAPI, on your own or with your AI agent. MainPath gives your Python backend a project foundation and a workflow for tests, builds and deployment.

The MainPath CLI starts your project locally. The pipeline takes the next steps towards your server.

Build the endpoint firstTry it on your own machine

Open the backend repository of your MainPath project and start its local environment. Develop your Python endpoints and check their behaviour before sharing the next version.

  • Put your own environment values in the documented custom files.
  • MainPath maintains generated files such as .gitlab-ci.yml and generated.yaml.
mp run-local
Starts the appropriate local development environment for your project.

From commit to a reachable APIWith a version you can try out

  1. Merge your change

    Bring your checked code onto main. The prepared pipeline starts there.

  2. Wait for tests and build

    Checks run, then the pipeline creates the Docker image for your Python backend.

  3. Test on Dev

    The pipeline deploys the built version to Dev. Try the API with its clients as well.

  4. Release to production

    When the version is ready, start the manual production step. A push alone does not publish to production.

An error after releaseContext beyond a log line

Connect your own Sentry account and enable Sentry for the FastAPI backend. Errors then appear with a stack trace and release version in your Sentry project.

  • See which release an error relates to.
  • Your application logic and the fix stay in your Python code.
Set up error tracking

What your API needsDefine it in your project

MainPath prepares the workflow. Data, external services and access rules need to fit your application.

  • Data and uploads

    Use the database and storage paths intended for your backend. Enable Easy Backup when needed for supported MySQL backends in production.

  • Keys for external services

    Keep private API keys and credentials in managed secrets. Do not put them in application code or unencrypted custom files.

  • Configuration per environment

    Give Dev and production the appropriate values. Add your own values in the documented custom files and leave generated configuration unchanged.

  • Rules for your endpoints

    Authentication, authorization, validation and data handling are part of your FastAPI code. A reachable API still needs application-level security.

Your API is part of the projectTests and its own address

Check changes automatically

Tests and builds follow your code on every push. Add tests for endpoint behaviour so changes are checked in a way your team can follow.

Your API on your own domain

Connect your API domain for production. MainPath shows the required DNS records and sets up HTTPS on the connected server.

Your next Python endpointWith a path to release

Start from a FastAPI template or talk to us about bringing your existing backend to MainPath.

Questions about FastAPI on MainPath

Can I import an existing FastAPI project?

FastAPI is one of the supported backend stacks. Your agent checks the existing project and its mapping before importing it.

Explore project imports

Where does my Python backend run?

The pipeline builds a Docker image and deploys it to the project’s connected server. Set up your own API domain for production. A web frontend or mobile app in the same MainPath project can use the backend.

Publish a backend

Can I connect external AI services?

Build the integration in your FastAPI code and keep the required credentials in managed secrets. MainPath does not automatically provide AI models, GPU resources or background workers for that integration.

Are backups and Sentry enabled automatically?

No. Easy Backup is an optional setting for supported MySQL backends in production. For error tracking, connect your Sentry account and enable Sentry for the component.

Can my AI agent change the pipeline file?

MainPath maintains generated files such as .gitlab-ci.yml and generated.yaml. Put your own environment values in the documented custom files and private values in managed secrets. Use MainPath configuration or contact support for additional automation.

Develop locally with MainPath

Thank you for your request

We have received your request and will get back to you as soon as possible.

Would you like to talk to us directly?

Choose a time here for an introductory call with Robin.

Open the calendar in a new tab