{"id":25829135,"url":"https://github.com/amozebus/fastapi-beyond-crud-2","last_synced_at":"2025-02-28T18:53:28.896Z","repository":{"id":275503570,"uuid":"926269588","full_name":"amozebus/fastapi-beyond-crud-2","owner":"amozebus","description":"Template for API that uses PostgreSQL-database / Шаблон API, использующего базу данных PostgreSQL","archived":false,"fork":false,"pushed_at":"2025-02-05T20:54:33.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-19T14:16:53.200Z","etag":null,"topics":["alembic","fastapi","fastapi-template","postgresql","python","sqlmodel"],"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/amozebus.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":"2025-02-02T23:37:44.000Z","updated_at":"2025-02-09T22:14:57.000Z","dependencies_parsed_at":"2025-02-03T00:35:53.884Z","dependency_job_id":null,"html_url":"https://github.com/amozebus/fastapi-beyond-crud-2","commit_stats":null,"previous_names":["amozebus/fastapi-beyond-crud-2"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amozebus%2Ffastapi-beyond-crud-2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amozebus%2Ffastapi-beyond-crud-2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amozebus%2Ffastapi-beyond-crud-2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amozebus%2Ffastapi-beyond-crud-2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amozebus","download_url":"https://codeload.github.com/amozebus/fastapi-beyond-crud-2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241203955,"owners_count":19926874,"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":["alembic","fastapi","fastapi-template","postgresql","python","sqlmodel"],"created_at":"2025-02-28T18:53:27.206Z","updated_at":"2025-02-28T18:53:28.875Z","avatar_url":"https://github.com/amozebus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# FastAPI Beyond CRUD 2 (with PostgreSQL)\n\n\u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\u003c/a\u003e\n\nTemplate for API that uses [PostgreSQL](https://postgresql.org)-database. Written in [Python](https://python.org) with [FastAPI](https://fastapi.tiangolo.com), [asyncpg](https://github.com/MagicStack/asyncpg) as database client, [SQLModel](https://sqlmodel.tiangolo.com) as ORM\n\nIncluded [Alembic](https://alembic.sqlalchemy.org) for database migrations\n\nUsers' passwords hashing with [BCrypt](https://en.wikipedia.org/wiki/Bcrypt) and users authorization with access [JWTs](https://jwt.io)\n\n\u003c/div\u003e\n\n## How to run\n\n1. Rename `.env.example` to `.env` and fill fields\n\n    * Fields:\n\n    ```\n    DATABASE_URL (str): PostgreSQL-database URL\n\n    JWT_SECRET (str): secret for JWTs signature\n\n    ACCESS_TOKEN_EXPIRE (int): access JWTs expire time in seconds\n    ```\n\n2. Install dependencies:\n\n```sh\npip install -r requirements.txt\n```\n\n3. Run database migrations:\n\n```sh\nalembic upgrade head\n```\n\n3. Run app:\n\n```sh\npython src/main.py\n```\n\n### Docker\n\n2. Build Docker image:\n\n```sh\ndocker build . --tag api\n```\n\n3. Run Docker image:\n\n```sh\ndocker run -d api\n```\n\n4. Run database migrations:\n\n```sh\ndocker exec {container id} alembic upgrade head\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famozebus%2Ffastapi-beyond-crud-2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famozebus%2Ffastapi-beyond-crud-2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famozebus%2Ffastapi-beyond-crud-2/lists"}