{"id":18496523,"url":"https://github.com/AtticusZeller/fastapi_supabase_template","last_synced_at":"2025-04-08T22:32:22.073Z","repository":{"id":215531030,"uuid":"711453198","full_name":"AtticusZeller/fastapi_supabase_template","owner":"AtticusZeller","description":"👏fastapi deeply integrates with supabase，auth，curd postgresql，file upload ，etc  ， all in one😎，inspired by full stack fastapi postgresql","archived":false,"fork":false,"pushed_at":"2025-03-04T05:42:05.000Z","size":1670,"stargazers_count":184,"open_issues_count":1,"forks_count":14,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-05T03:02:06.012Z","etag":null,"topics":["fastapi","fastapi-admin","fastapi-crud","fastapi-template","python","supabase","supabase-auth","supabase-client","supabase-db","supabase-storage"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AtticusZeller.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-29T10:12:30.000Z","updated_at":"2025-04-03T03:06:48.000Z","dependencies_parsed_at":"2024-01-11T16:23:10.402Z","dependency_job_id":"95adf828-ec09-46a3-95bb-ee0827e7fd4c","html_url":"https://github.com/AtticusZeller/fastapi_supabase_template","commit_stats":null,"previous_names":["atticuszz/fastapi_supabase_template","atticuszeller/fastapi_supabase_template"],"tags_count":10,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtticusZeller%2Ffastapi_supabase_template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtticusZeller%2Ffastapi_supabase_template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtticusZeller%2Ffastapi_supabase_template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtticusZeller%2Ffastapi_supabase_template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AtticusZeller","download_url":"https://codeload.github.com/AtticusZeller/fastapi_supabase_template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247694876,"owners_count":20980733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["fastapi","fastapi-admin","fastapi-crud","fastapi-template","python","supabase","supabase-auth","supabase-client","supabase-db","supabase-storage"],"created_at":"2024-11-06T13:29:53.712Z","updated_at":"2025-04-08T22:32:17.065Z","avatar_url":"https://github.com/AtticusZeller.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.png\" alt=\"Logo\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"License: MIT\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/Atticuszz/fastapi_supabase_template\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/Atticuszz/fastapi_supabase_template/branch/main/graph/badge.svg?token=YOUR_TOKEN\" alt=\"codecov\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/Atticuszz/fastapi_supabase_template/actions\"\u003e\n    \u003cimg src=\"https://github.com/Atticuszz/fastapi_supabase_template/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/Atticuszz/fastapi_supabase_template/releases/\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/release/Atticuszz/fastapi_supabase_template.svg\" alt=\"GitHub release\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/python-3.10|3.11|3.12-blue.svg\" alt=\"Python\"\u003e\n  \u003ca href=\"https://supabase.com\"\u003e\n    \u003cimg src=\"https://supabase.com/badge-made-with-supabase-dark.svg\" alt=\"Made with Supabase\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# ⚡SupaFast⚡\n\n___\n\u003e supabase \u0026 fastapi crud template\n\n![supafast.drawio.png](assets%2Fsupafast.drawio.png)\n\n## Features 🚀\n\n___\n\n### FastAPI\u0026supabase\n\n1. works of authorization all handled by supabase-py and fastapi **dependency** without any extra code\n2. supabase-py crud integration with **pydantic** model validation\n\n### Pytest\n\n1. pytest integration with **pytest-cov**\n2. pytest **fixtures** for fastapi client and supabase client\n3. pytest **fixtures** for access_token and refresh_token\n4. test for **CRUD** operations\n5. test for **api** operations\n\n### CI/CD\n\n1. **codecov** for coverage report\n2. **poetry** for dependency management and pytest integration\n3. **pre-commit** for code quality\n4. **latest_changes.yml** for auto update README.md\n5. **Semantic Release** for auto release and changelog\n6. **docker** for deployment\n\n## How to use it\n\n___\n![](assets/usage.gif)\n\n1. create your github repo and config it\n   1. allow ci to access your repo\n      ![img.png](assets/img.png)\n   2. config ci_tokens\n      1. `CODECOV_TOKEN` for codecov in `.github/workflows/ci.yml` ,`semantic-release` is optional for auto release\n      2. `ATTICUS_PAT`should replace with your GitHub token for latest_changes.yml in `.github/workflows/latest_changes.yml`\n      3. `DOCKER_USERNAME` and `DOCKER_PASSWORD` for docker-image.yml in `.github/workflows/docker-image.yml`\n      4. replace `tags: atticuszhou/supafast:latest` with your docker repo in `.github/workflows/docker-image.yml`\n   3. config fastapi setting in `your_project\\src\\app\\core\\config.py`\n   4. config `pyproject.toml` with your project name and description,etc\n\n2. cd your repo and install dependencies with [uv](https://github.com/astral-sh/uv), which is an extremely fast Python package and project manager, written in Rust.\n\n```shell\nuv sync --all-extras --dev\n```\n3. set your supabase env\n\n```shell\nexport SUPABASE_URL=your_supabase_url\nexport SUPABASE_KEY=your_supabase_key\nexport SUPERUSER_EMAIL=your_superuser_email\nexport SUPERUSER_PASSWORD=your_superuser_password\n```\n4. config fastapi settings\n```python\n# src/app/core/config.py\nclass Settings(BaseSettings):\n    API_V1_STR: str = \"/api/v1\"\n    SUPABASE_URL: str = Field(default_factory=lambda: os.getenv(\"SUPABASE_URL\"))\n    SUPABASE_KEY: str = Field(default_factory=lambda: os.getenv(\"SUPABASE_KEY\"))\n    SUPERUSER_EMAIL: str = Field(default_factory=lambda: os.getenv(\"SUPERUSER_EMAIL\"))\n    SUPERUSER_PASSWORD: str = Field(default=lambda: os.getenv(\"SUPERUSER_PASSWORD\"))\n    # SERVER_NAME: str\n    SERVER_HOST: AnyHttpUrl = \"https://localhost\"\n    SERVER_PORT: int = 8000\n    BACKEND_CORS_ORIGINS: list[AnyHttpUrl] = []\n    PROJECT_NAME: str = \"fastapi supabase template\"\n    Config: ClassVar[ConfigDict] = ConfigDict(arbitrary_types_allowed=True)\n```\n\n5. run server\n```shell\nuv run uvicorn src.app.main:app --reload\n```\n\n## Roadmap 🫶\n___\n\n- [x] FastAPI backend\n    - [x] **standard** structure\n      for \u003ca href=\"https://github.com/tiangolo/fastapi\" class=\"external-link\" target=\"_blank\"\u003e**FastAPI**\u003c/a\u003e project\n  ```text\n  ── src\n  │   └── app\n  │       ├── api\n  │       │   ├── api_v1\n  │       │   │   ├── endpoints\n  │       │   │   │   ├── __init__.py\n  │       │   │   │   └── items.py\n  │       │   │   ├── __init__.py\n  │       │   │   └── api.py\n  │       │   ├── __init__.py\n  │       │   └── deps.py\n  │       ├── core\n  │       │   ├── __init__.py\n  │       │   ├── config.py\n  │       │   └── events.py\n  │       ├── crud\n  │       │   ├── __init__.py\n  │       │   ├── base.py\n  │       │   └── crud_item.py\n  │       ├── schemas\n  │       │   ├── __init__.py\n  │       │   ├── auth.py\n  │       │   ├── base.py\n  │       │   ├── item.py\n  │       │   └── msg.py\n  │       ├── services\n  │       │   └── __init__.py\n  │       ├── utils\n  │       │   └── __init__.py\n  │       ├── __init__.py\n  │       └── main.py\n  ...\n  ```\n    - [x] **auto-auth** by fastapi dependency with supabase-auth\n    - [x] **CRUD** operations pytest\n    - [x] **api** requests pytest\n- [ ] Supabase integration\n    - [x] crud supabase-postgresql\n    - [ ] websocket with supabase-realtime\n    - [ ] curd supabase-storage\n    - [ ] supafunc integration\n- [x] deployment\n    - [x] Full **Docker** integration (Docker based).\n- [ ] clone\n    - [ ] cookiecutter\n## Release Notes 🥸\n\n___\n\n### Latest Changes\n\n## License\n\nThis project is licensed under the terms of the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAtticusZeller%2Ffastapi_supabase_template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAtticusZeller%2Ffastapi_supabase_template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAtticusZeller%2Ffastapi_supabase_template/lists"}