{"id":24901517,"url":"https://github.com/zayminmaw/detrack-api-clone","last_synced_at":"2025-08-09T19:35:35.789Z","repository":{"id":44658523,"uuid":"441368217","full_name":"zayminmaw/detrack-api-clone","owner":"zayminmaw","description":"Simplified Detrack API clone with FastAPI and Postgres database.","archived":false,"fork":false,"pushed_at":"2022-02-01T16:51:25.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T21:16:19.474Z","etag":null,"topics":["delivery-api","python"],"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/zayminmaw.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}},"created_at":"2021-12-24T04:47:52.000Z","updated_at":"2022-02-01T16:24:58.000Z","dependencies_parsed_at":"2022-09-25T14:10:59.577Z","dependency_job_id":null,"html_url":"https://github.com/zayminmaw/detrack-api-clone","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/zayminmaw%2Fdetrack-api-clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zayminmaw%2Fdetrack-api-clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zayminmaw%2Fdetrack-api-clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zayminmaw%2Fdetrack-api-clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zayminmaw","download_url":"https://codeload.github.com/zayminmaw/detrack-api-clone/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245898316,"owners_count":20690466,"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":["delivery-api","python"],"created_at":"2025-02-01T21:16:26.297Z","updated_at":"2025-03-27T18:19:21.420Z","avatar_url":"https://github.com/zayminmaw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Development setup\n\nFirst create a directory then create a virtual environment in it (PLEASE USE VIRTUAL ENVIRONMENT).\n\n```shell\npython3 -m venv \u003cyour-env-name\u003e\n```\n\nTo activate your virtual environment go to\n\n#### On Window :\n\n```shell\n\u003cyour-env-name\u003e\\Scripts\\activate.bat\n```\n\n#### On Unix or MacOs :\n\n```shell\nsource \u003cyour-env-name\u003e/bin/activate\n```\n\nFinally git clone the repository.\n\n```shell\ngit clone https://github.com/zay467/detrack-api-clone.git\n```\n\nThen go into the cloned folder and install requirements (we will be continue working on this directory). While installing setup the \".env\" file.\n\n```shell\npip install -r requirements.txt\n```\n\n\u003c!-- For our database migrations we will be using alembic. Don't worry it is already in requirements.txt so it is installed. Now let's initailize alembic.\n\n```shell\nalembic init alembic\n```\n\nAfter initailized, some changes need to make.\n\nGo to alembic.ini and add your database string / URI.\n\n```shell\nsqlalchemy.url = \u003cyour-database-string\u003e\n```\n\nThen go to alembic/env.py.\n\n```shell\n# comment out \"target_metadata = None\" and add this\nfrom infrastructure.base import Base\ntarget_metadata = Base.metadata\n```\n\nAll changes need for alembic is done. Let's generate your migrations with alembic's help. You will have to run this command every time you add new models or you make changes to your models.\n\n```shell\n# this auto generate the migration files\nalembic revision --autogenerate -m \"init\"\n# to create or update the models to database\nalembic upgrade head\n``` --\u003e\n\nMigrate your models into database.\n\n```shell\n# to create or update the models to database\nalembic upgrade head\n```\n\nNow let's start your server.\n\n```shell\nuvicorn main:app --reload\n```\n\n#### Useful commands\n\nif you installed new packages during development, don't forget to update the requirement.\n\n```shell\npip freeze \u003e requirements.txt\n```\n\nThis command is for auto generating the migration files if you add new models or make changes to your existing model. Then don't forget to mirgrate the changes.\n\n```shell\nalembic revision --autogenerate -m \"init\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzayminmaw%2Fdetrack-api-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzayminmaw%2Fdetrack-api-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzayminmaw%2Fdetrack-api-clone/lists"}