{"id":15321954,"url":"https://github.com/akmamun/fastapi-sql-boilerplate","last_synced_at":"2025-09-10T23:44:36.716Z","repository":{"id":209615852,"uuid":"724525729","full_name":"akmamun/fastapi-sql-boilerplate","owner":"akmamun","description":"A FastAPI and SQLAlchemy Boilerplate for Rapid API Development with Async Database Support","archived":false,"fork":false,"pushed_at":"2023-12-01T18:13:05.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T18:43:31.133Z","etag":null,"topics":["asynchronous","asyncpg","fastapi","sqlalchemy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akmamun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-28T09:02:14.000Z","updated_at":"2023-11-28T19:46:24.000Z","dependencies_parsed_at":"2023-12-01T19:28:51.838Z","dependency_job_id":"68da8ec6-e3ce-4b32-9720-1c05e7dd7e42","html_url":"https://github.com/akmamun/fastapi-sql-boilerplate","commit_stats":null,"previous_names":["akmamun/fastapi-sql-boilerplate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmamun%2Ffastapi-sql-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmamun%2Ffastapi-sql-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmamun%2Ffastapi-sql-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmamun%2Ffastapi-sql-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akmamun","download_url":"https://codeload.github.com/akmamun/fastapi-sql-boilerplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245864051,"owners_count":20684958,"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":["asynchronous","asyncpg","fastapi","sqlalchemy"],"created_at":"2024-10-01T09:13:44.283Z","updated_at":"2025-03-27T14:40:29.578Z","avatar_url":"https://github.com/akmamun.png","language":"Python","readme":"# FastAPI MicroService with Docker and Asynchronous SQLAlchemy\n\nThis repository provides a template for building a FastAPI microservice using Docker with asynchronous SQLAlchemy for efficient database operations.\n\n###  Installation Instructions\n**Using Docker:**\n- To run the service using Docker, use the following command:\n     ```sh\n     sudo docker-compose up --build\n     ```\n\n**Run Locally:**\n\n- Create a [virtual environment](https://docs.python.org/3/library/venv.html)\n- Install the Python dependencies with\n     ```sh\n     pip install -r requirements.txt\n    ```\n- Copy the .env.example file as .env\n    ```sh\n    cp .env.example .env\n    ```\n- Ensure that you fill in all the valid environment properties in the .env file.\n\n## Setup and Configuration:\n\nPlease note that when forking and intending to use it, follow instruction\n\n- Delete the `example_app_name` folder\n- Remove the line `from example_app_name.routes import routers` in `main.py`\n\nYour setup is now ready for smooth use.\n\n### Run Locally\n- To run the service locally, use the following command:\n    ```sh\n    uvicorn main:app --reload\n    ```\n\n### Run Docker Compose for Production Build\n- Ensure that you have [Docker](https://docs.docker.com/engine/install) and [Docker Compose](https://docs.docker.com/compose/install/) installed\n\n## Project Structure\n\n```\n├── app_name\n│   ├── controllers\n│   │   └── __init__.py\n│   ├── models\n│   │   └── __init__.py\n│   ├── repositories\n│   │   └── __init__.py\n│   ├── routes.py\n│   └── tests\n│       └── __init__.py\n├── config\n│   ├── config.py\n│   └── db.py\n├── db\n│   └── alchemy_repository.py\n├── docker-compose.yml\n├── Dockerfile\n├── example_app_name\n│   ├── controllers\n│   │   ├── __init__.py\n│   │   └── item_controller.py\n│   ├── models\n│   │   └── item_models.py\n│   ├── repositories\n│   │   ├── __init__.py\n│   │   └── item_repository.py\n│   ├── routes.py\n│   └── tests\n│       └── __init__.py\n├── helpers\n│   ├── env.py\n│   └── pagination.py\n├── locust.py\n├── main.py\n├── README.md\n├── requirements.txt\n└── scripts\n    └── migrate.py\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakmamun%2Ffastapi-sql-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakmamun%2Ffastapi-sql-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakmamun%2Ffastapi-sql-boilerplate/lists"}