{"id":50594501,"url":"https://github.com/datarobot-community/af-component-fastapi-backend","last_synced_at":"2026-06-05T13:01:00.144Z","repository":{"id":352006373,"uuid":"960719821","full_name":"datarobot-community/af-component-fastapi-backend","owner":"datarobot-community","description":"Application Framework Backend","archived":false,"fork":false,"pushed_at":"2026-05-29T14:33:17.000Z","size":322,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-05-29T16:05:34.621Z","etag":null,"topics":["dr-engineering"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datarobot-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-04T23:47:22.000Z","updated_at":"2026-05-29T14:33:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/datarobot-community/af-component-fastapi-backend","commit_stats":null,"previous_names":["datarobot-community/af-component-fastapi-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/datarobot-community/af-component-fastapi-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datarobot-community%2Faf-component-fastapi-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datarobot-community%2Faf-component-fastapi-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datarobot-community%2Faf-component-fastapi-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datarobot-community%2Faf-component-fastapi-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datarobot-community","download_url":"https://codeload.github.com/datarobot-community/af-component-fastapi-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datarobot-community%2Faf-component-fastapi-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33942436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dr-engineering"],"created_at":"2026-06-05T13:00:54.235Z","updated_at":"2026-06-05T13:01:00.112Z","avatar_url":"https://github.com/datarobot-community.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/datarobot-community/af-component-fastapi-backend\"\u003e\n    \u003cimg src=\"https://af.datarobot.com/img/datarobot_logo.avif\" width=\"600px\" alt=\"DataRobot Logo\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cspan style=\"font-size: 1.5em; font-weight: bold; display: block;\"\u003eaf-component-fastapi-backend\u003c/span\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://datarobot.com\"\u003eHomepage\u003c/a\u003e\n  ·\n  \u003ca href=\"https://af.datarobot.com\"\u003eDocumentation\u003c/a\u003e\n  ·\n  \u003ca href=\"https://docs.datarobot.com/en/docs/get-started/troubleshooting/general-help.html\"\u003eSupport\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/datarobot-community/af-component-fastapi-backend/tags\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/tag/datarobot-community/af-component-fastapi-backend?label=version\" alt=\"Latest Release\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/datarobot-community/af-component-fastapi-backend\" alt=\"License\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nThe FastAPI Component. Deploys a DataRobot Custom Application with a FastAPI server\n\nThis component provides the structure for a FastAPI backend that can be deployed as a DataRobot Custom Application. It's designed for app developers building App Framework templates that need a Python API layer, and it integrates cleanly with the [React frontend component](https://github.com/datarobot-community/af-component-react). The component is part of the [App Framework Studio](https://af.datarobot.com) ecosystem.\n\nThe repo ships a FastAPI application scaffold and the configuration needed to deploy it as a DataRobot Custom Application. Because the component is repeatable, a single template can include multiple independent FastAPI backends — apply this component more than once, each with a distinct `fastapi_app` name.\n\n# Table of contents\n\n- [Prerequisites](#prerequisites)\n- [Quick start](#quick-start)\n- [Component dependencies](#component-dependencies)\n  - [Required](#required)\n  - [Local development](#local-development)\n  - [Updating](#updating)\n- [Troubleshooting](#troubleshooting)\n- [Next steps and cross-links](#next-steps-and-cross-links)\n- [Contributing, changelog, support, and legal](#contributing-changelog-support-and-legal)\n\n# Prerequisites\n\nBefore applying this component, ensure your environment meets the following requirements.\n\n- Python 3.11+\n- [`uv`](https://docs.astral.sh/uv/) installed\n- [`dr`](https://cli.datarobot.com) installed\n- A DataRobot account with permissions to create Custom Applications.\n- The [`af-component-base`](https://github.com/datarobot-community/af-component-base) component must already be applied to your project (see [Component dependencies](#component-dependencies)).\n\n# Quick start\n\nRun the following command in your project directory:\n\n```bash\ndr component add https://github.com/datarobot-community/af-component-fastapi-backend .\n```\n\nIf you need additional control, you can run this to use copier directly:\n\n```bash\nuvx copier copy datarobot-community/af-component-fastapi-backend .\n```\n\nDuring the copy, the wizard asks for a `fastapi_app` name. Use a short, lowercase identifier (for example, `api` or `backend`). If your template needs multiple FastAPI backends, apply this component again with a different name — the component is repeatable.\n\nAfter applying, verify the server starts by running `uv run uvicorn FASTAPI_APP.app:app --reload --port 8080` and hitting `http://localhost:8080/health`.\n\n# Component dependencies\n\nThis component requires the `base` component to be applied first. The sections below list required dependencies, local development setup, and how to keep the component up to date.\n\n## Required\n\nThe following components must be applied to the project **before** this component:\n\n| Name | Repository | Repeatable |\n|------|-----------|------------|\n| `base` | [https://github.com/datarobot-community/af-component-base](https://github.com/datarobot-community/af-component-base) | No |\n\n## Local development\n\nRun the FastAPI server locally with `uv`:\n\n```bash\nuv run uvicorn FASTAPI_APP.app:app --reload --port 8080\n```\n\nThe server is available at `http://localhost:8080`. Use the `/health` endpoint as a quick smoke test:\n\n```bash\ncurl http://localhost:8080/health\n```\n\n**Key paths:**\n\n| Path | Purpose |\n|------|---------|\n| `FASTAPI_APP/app.py` | FastAPI application entrypoint. |\n| `FASTAPI_APP/routes/` | Route definitions. |\n| `pyproject.toml` | Project dependencies and metadata. |\n\nWhen working in a Codespace, forward port `8080` to access the server from your browser.\n\n## Updating\n\nAll components should be regularly updated to pick up bug fixes, new features, and compatibility with the latest DataRobot App Framework.\n\nFor automatic updates to the latest version, run the following command in your project directory:\n\n```bash\ndr component update .datarobot/answers/fastapi-FASTAPI_APP_NAME.yml\n```\n\nIf you need more fine-grained control and prefer using copier directly, you can run this to have more control over the process:\n\n```bash\nuvx copier update -a .datarobot/answers/fastapi-FASTAPI_APP_NAME.yml -A\n```\n\n# Troubleshooting\n\nCommon setup and runtime issues are listed below by symptom.\n\n**`uvx copier copy` fails with a merge conflict**\nEnsure `af-component-base` is applied first. This component expects base scaffolding to be present before it runs.\n\n**`uv run` reports a missing package**\nRun `uv sync` to install dependencies declared in `pyproject.toml`.\n\n**Application fails to start on DataRobot**\nCheck the Custom Application logs in the DataRobot UI. The most common cause is a missing environment variable — confirm all required runtime parameters are set in the deployment configuration.\n\n**Port conflict on local dev**\nChange the `--port` flag in the `uvicorn` command, or stop any other process already bound to port `8080`.\n\n# Next steps and cross-links\n\nUse these resources to go deeper with the component and the broader App Framework ecosystem.\n\n- [App Framework documentation](https://af.datarobot.com)\u0026mdash;full component catalog, architecture overview, and deployment guides.\n- [af-component-react](https://github.com/datarobot-community/af-component-react)\u0026mdash;pair this backend with a React frontend.\n- [af-component-base](https://github.com/datarobot-community/af-component-base)\u0026mdash;required base component.\n- [DataRobot Custom Applications docs](https://docs.datarobot.com/en/docs/wb-apps/custom-apps/upload-custom-app.html)\u0026mdash;runtime parameters, app hosting, and environment configuration.\n\n# Contributing, changelog, support, and legal\n\n- **Contributing**\u0026mdash;fork the repository, create a feature branch, and open a pull request. Run `task lint` before submitting. See `CONTRIBUTING.md` for the full process.\n- **Changelog**\u0026mdash;see `CHANGELOG.md` for version history. This project follows semantic versioning.\n- **Getting help**\u0026mdash;open a [GitHub Issue](https://github.com/datarobot-community/af-component-fastapi-backend/issues) for bugs or feature requests. For general DataRobot support, visit the [support portal](https://docs.datarobot.com/en/docs/get-started/troubleshooting/general-help.html).\n- **License**\u0026mdash;Apache 2.0 — see [LICENSE](/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatarobot-community%2Faf-component-fastapi-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatarobot-community%2Faf-component-fastapi-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatarobot-community%2Faf-component-fastapi-backend/lists"}