{"id":21457822,"url":"https://github.com/pedrosfaria2/fastapi_initializr","last_synced_at":"2026-05-07T05:38:52.319Z","repository":{"id":262737603,"uuid":"888173904","full_name":"pedrosfaria2/fastapi_initializr","owner":"pedrosfaria2","description":"A FastAPI project generator","archived":false,"fork":false,"pushed_at":"2024-11-22T00:20:58.000Z","size":90,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T04:59:52.626Z","etag":null,"topics":["api","api-rest","ddd","ddd-architecture","docker","docker-compose","fastapi","fastapi-template","jinja2","makefile","poetry","pydantic","pytest","python","python3","tdd","template"],"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/pedrosfaria2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-14T00:06:33.000Z","updated_at":"2024-11-22T00:20:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"996a6f28-18f4-461b-a7dd-b44047ff58e6","html_url":"https://github.com/pedrosfaria2/fastapi_initializr","commit_stats":null,"previous_names":["pedrosfaria2/fastapi_initializr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pedrosfaria2/fastapi_initializr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrosfaria2%2Ffastapi_initializr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrosfaria2%2Ffastapi_initializr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrosfaria2%2Ffastapi_initializr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrosfaria2%2Ffastapi_initializr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedrosfaria2","download_url":"https://codeload.github.com/pedrosfaria2/fastapi_initializr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrosfaria2%2Ffastapi_initializr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278188307,"owners_count":25944917,"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","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"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":["api","api-rest","ddd","ddd-architecture","docker","docker-compose","fastapi","fastapi-template","jinja2","makefile","poetry","pydantic","pytest","python","python3","tdd","template"],"created_at":"2024-11-23T06:07:14.645Z","updated_at":"2025-10-03T16:09:43.590Z","avatar_url":"https://github.com/pedrosfaria2.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI Initializr\n\nFastAPI Initializr is a tool to quickly generate and bootstrap new FastAPI projects. It aims to simplify the setup process by providing customizable project templates with common configurations and best practices.\n\n## Features\n\n- Generate FastAPI project structure\n- Choose from different project templates:\n  - **Minimal**: Basic FastAPI setup with essential configurations\n  - **Basic**: Extended template with pre-configured structure (in progress) including:\n    - Organized directory structure (`app/routers`, `app/services`, `app/models`, etc.)\n    - Example CRUD endpoints\n    - Health check endpoint\n    - Basic SQLite integration\n    - Logging configuration\n    - More features coming soon!\n- Customize Python version, database, and other project settings\n- Include optional features like Docker setup and database migrations\n- Support for both `pip` and `Poetry` as dependency managers\n- Pre-configured utilities like `black`, `flake8`, `pre-commit`, and `commitizen`\n- Download generated project as a zip file\n\n## Technologies Used\n\n- **FastAPI**: Web framework for building APIs with Python\n- **Pydantic**: Data validation and settings management using Python type annotations\n- **Poetry**: Dependency management and packaging\n- **pip**: Standard Python package installer\n- **Loguru**: Library for flexible logging\n- **Jinja2**: Template engine for generating project files\n- **Pytest**: Testing framework for Python\n- **Docker**: Containerization platform\n- **Docker Compose**: Tool for defining and running multi-container Docker applications\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.10+\n- `pip` or `Poetry`\n- Docker (optional)\n- Docker Compose (optional)\n- Make (optional)\n\n### Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/pedrosfaria2/fastapi_initializr.git\n   cd fastapi_initializr\n   ```\n\n2. Install dependencies and set up the environment:\n\n   ```bash\n   make setup\n   ```\n\n## Usage\n\n### Running the Application\n\nTo start the FastAPI server, use one of the following commands:\n\n- Run the application directly:\n\n  ```bash\n  make run\n  ```\n\n- Run the application using Docker:\n\n  ```bash\n  make run-docker\n  ```\n\n- Run the application using Docker Compose (for development):\n\n  ```bash\n  make run-compose\n  ```\n\nOpen your web browser and visit `http://localhost:8001/docs` to access the FastAPI Initializr Swagger.\n\n### Generating a Project\n\n1. Access the API at `/generator/create` endpoint.\n2. Provide a configuration payload. Example:\n   ```json\n   {\n     \"project_name\": \"my_fastapi_app\",\n     \"description\": \"My FastAPI Application\",\n     \"template_type\": \"minimal\",  // or \"basic\" for the extended template\n     \"python_version\": \"3.10\",\n     \"author\": \"Your Name\",\n     \"fastapi_version\": \"0.100.0\",\n     \"uvicorn_version\": \"0.22.0\",\n     \"dependency_manager\": \"poetry\",\n     \"include_dockerfile\": false,\n     \"include_docker_compose\": false,\n     \"include_black\": true,\n     \"include_flake8\": true,\n     \"include_pre_commit\": true,\n     \"include_conventional_commit\": true\n   }\n   ```\n3. The generated ZIP file will include a structured FastAPI project with:\n   - `main.py` with basic endpoints\n   - `requirements.txt` or `pyproject.toml`\n   - `README.md`\n   - `.gitignore`\n   - Optional Dockerfile and/or docker-compose.yml\n   - Pre-configured utilities\n   - Additional structure and features if using the \"basic\" template (work in progress)\n\n## Project Status\n\nThe basic template is currently under development. While the core functionality is implemented, including the directory structure, CRUD endpoints, and basic configurations, some features are still being refined and enhanced. Feel free to try it out and provide feedback!\n\n## Dependency Management\n\nFastAPI Initializr supports both `pip` and `Poetry` for managing dependencies. The choice of manager is specified in the configuration (`dependency_manager`).\n\n### Using `pip`\n\nIf `pip` is selected:\n- A `requirements.txt` file will be generated.\n- Install dependencies with:\n  ```bash\n  pip install -r requirements.txt\n  ```\n\n### Using `Poetry`\n\nIf `Poetry` is selected:\n- A `pyproject.toml` file will be generated.\n- Install dependencies with:\n  ```bash\n  poetry install\n  ```\n\n## Utilities\n\nThis tool provides pre-configured utilities to help maintain code quality and enforce standards:\n\n- **Black**: Code formatter. Run:\n  ```bash\n  black .\n  ```\n\n- **Flake8**: Linter for Python. Run:\n  ```bash\n  flake8 .\n  ```\n\n- **Pre-Commit**: Runs checks before commits. Install hooks:\n  ```bash\n  pre-commit install\n  ```\n\n- **Commitizen**: For conventional commits. Make a commit:\n  ```bash\n  cz commit\n  ```\n\nThese utilities are included in the generated project if enabled in the configuration.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Acknowledgements\n\n- [FastAPI](https://fastapi.tiangolo.com/)\n- [Pydantic](https://pydantic-docs.helpmanual.io/)\n- [Poetry](https://python-poetry.org/)\n- [Jinja2](https://jinja.palletsprojects.com/)\n- [Black](https://github.com/psf/black)\n- [Flake8](https://flake8.pycqa.org/)\n- [Pre-Commit](https://pre-commit.com/)\n- [Commitizen](https://commitizen-tools.github.io/commitizen/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrosfaria2%2Ffastapi_initializr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedrosfaria2%2Ffastapi_initializr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrosfaria2%2Ffastapi_initializr/lists"}