{"id":13594149,"url":"https://github.com/slimovich/Realworld-fastapi-gino-template","last_synced_at":"2025-04-09T07:30:52.809Z","repository":{"id":43389255,"uuid":"257593089","full_name":"slimovich/Realworld-fastapi-gino-template","owner":"slimovich","description":"Real world Fast-API application template using gino(Async ORM) based on hexagonal architecture","archived":false,"fork":false,"pushed_at":"2022-12-08T07:45:28.000Z","size":289,"stargazers_count":94,"open_issues_count":5,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-02T16:50:04.299Z","etag":null,"topics":["async","async-orm","dependency-injection","docker","fastapi","fastapi-template","flake8","gino","hexagonal-architecture","jenkins","pgadmin4","postgresql","python3","python38","realworld","realworld-application","sonarqube","swagger","tutorial"],"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/slimovich.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}},"created_at":"2020-04-21T12:46:15.000Z","updated_at":"2024-06-05T15:13:38.000Z","dependencies_parsed_at":"2022-07-07T15:43:30.676Z","dependency_job_id":null,"html_url":"https://github.com/slimovich/Realworld-fastapi-gino-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slimovich%2FRealworld-fastapi-gino-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slimovich%2FRealworld-fastapi-gino-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slimovich%2FRealworld-fastapi-gino-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slimovich%2FRealworld-fastapi-gino-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slimovich","download_url":"https://codeload.github.com/slimovich/Realworld-fastapi-gino-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223375159,"owners_count":17135317,"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":["async","async-orm","dependency-injection","docker","fastapi","fastapi-template","flake8","gino","hexagonal-architecture","jenkins","pgadmin4","postgresql","python3","python38","realworld","realworld-application","sonarqube","swagger","tutorial"],"created_at":"2024-08-01T16:01:29.362Z","updated_at":"2024-11-06T16:30:31.611Z","avatar_url":"https://github.com/slimovich.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003e ### 🛠 Status: WIP\n\u003e\n\u003e *Under developement, WIP. Be patient.*\n\n![Build Status](https://github.com/slimovich/fastapi-gino-postgresql-template/workflows/Build/badge.svg)\n[![codecov](https://codecov.io/gh/slimovich/Realworld-fastapi-gino-template/branch/master/graph/badge.svg)](https://codecov.io/gh/slimovich/Realworld-fastapi-gino-template)\n\nA real wolrd template project using Fastapi framework as well as a full implementation of CI/CD.\n\nIntroduction to many of FastAPI's features, including pydantic models, dependency injection, and Gino (Async ORM) integration, using hexagonal architecture.\n\nOverview\n----------\nThis repository contains a skeleton app which can be used to speed-up your next project.\n\n- **Fast-API:** Asynchronous RESTful API Framework\n- **Gino:** Async ORM used with AsyncPG and postgreSQL\n- **Alembic:** Database migrations\n- **hexagonal architecture:** Bettre code organisation\n- **Pipenv:** Package manager (Also creating virtual environement)\n- **Pytest:** Run unit test with code coverage\n- **JWT:** Token authentication.\n- **PGAdmin4:** Client for postgreSQL\n- **Makefile:** Building project\n- **SonarQube:** Analysing code and interpreting pytest and cov report\n- **Flake8, Mypy:** Lint code\n- **Isort, Black, Autoflake:** Formating code\n- **Bandit:** Check for vulnerabilities   \n- **Docker:** Packaging and deployment\n- **Jenkins:** CI/CD\n\nQuickstart\n----------\nfor running the server locally\n- first install pipenv\n```bash\npip install pipenv\n```\n\n- setup a local environnement\n```bash\nsource setup/scripts/setEnv.sh\n```\n\n- install the dependencies locally\n```bash\npipenv run make install-dev-deps\n```\n\nThe command above will install for you a separate environnement and installing all dependencies\n\n- run unit test\n```bash\npipenv run make test\n```\n\n- run the local server with localhost:8080\n```bash\npipenv run make run\n```\n\nDeployment with Docker\n----------------------\nYou must have docker and docker-compose tools installed in your system. Then just run:\n\n```bash\nmake build-dev\nmake run-dev-containers\n```\n\nThis will build the images and run 3 containers (Fastapi application, PostgreSQL, PGAdmin 4) in developement environnement.\n\nIf you want to run the containers in production environnement, you can do the following:\n\n```bash\nmake build-prod\nmake run-prod-containers\n```\n\nYour can find the files to configure each environnement in the root directory:\n- env-develop.env\n- env-production.env\n\nApplication will be available on localhost in your browser.\n\nAll routes are available on /docs paths with Swagger\n\nSonar Qube\n----------------------\nTODO\n\nJenkins\n----------------------\nTODO\n\n\nProject structure\n-----------------\n\nFiles related to application are in the ``src`` or ``tests`` directories.\nApplication parts are:\n\n    src\n    ├── api                     - web related stuff.\n    ├── core                    - application configuration, server management, logging.\n    ├── domain                  - Business logic.\n    ├── infrastructure          - external services of the application like db.\n    └── main.py                 - FastAPI application entry point.\n\nContributing\n-------------\nContributions, issues and feature requests are welcome!\n\n1. Fork the Project\n2. Create your Feature Branch (git checkout -b feature/YourFeature)\n3. Commit your Changes (git commit -m 'Add My Feature')\n4. Push to the Branch (git push origin feature/YourFeature)\n5. Open a Pull Request\n\nContact\n-----------------\n* Mail: slim.baccar91@gmail.com\n\nRelease Notes\n-----------------\nTODO","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslimovich%2FRealworld-fastapi-gino-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslimovich%2FRealworld-fastapi-gino-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslimovich%2FRealworld-fastapi-gino-template/lists"}