{"id":18068394,"url":"https://github.com/sebastianmahecha/traffic_offences","last_synced_at":"2026-01-25T21:48:25.831Z","repository":{"id":259614583,"uuid":"878631100","full_name":"SebastianMahecha/traffic_offences","owner":"SebastianMahecha","description":"This project is a practice API. I'm using Python + FastApi, PostgreSQL and machine learning tools","archived":false,"fork":false,"pushed_at":"2024-11-08T11:33:13.000Z","size":378234,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T16:13:45.501Z","etag":null,"topics":["api","fastapi","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/SebastianMahecha.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-25T18:46:13.000Z","updated_at":"2025-01-29T17:54:28.000Z","dependencies_parsed_at":"2024-12-18T22:50:55.671Z","dependency_job_id":null,"html_url":"https://github.com/SebastianMahecha/traffic_offences","commit_stats":null,"previous_names":["sebastianmahecha/traffic_offences"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianMahecha%2Ftraffic_offences","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianMahecha%2Ftraffic_offences/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianMahecha%2Ftraffic_offences/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianMahecha%2Ftraffic_offences/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SebastianMahecha","download_url":"https://codeload.github.com/SebastianMahecha/traffic_offences/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361703,"owners_count":20926643,"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":["api","fastapi","python"],"created_at":"2024-10-31T08:06:18.006Z","updated_at":"2026-01-25T21:48:25.781Z","avatar_url":"https://github.com/SebastianMahecha.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# traffic_offences\n\nRUN PROJECT\n\nfastapi dev main.py\n\nconda activate traffic_offences_env\n\n\ncreate database traffic_offences_db;\nCREATE ROLE traffic_offences_user WITH LOGIN PASSWORD '12345678';\ngrant all privileges on database  traffic_offences_db to traffic_offences_user;\nALTER DATABASE traffic_offences_db  OWNER TO traffic_offences_user;\n\npsql -U traffic_offences_user -d traffic_offences_db \n\n\npip install fastapi uvicorn sqlalchemy asyncpg\n\n\n\nConfig automigrate\n\npip install alembic\nalembic init alembic\n\nModificar el archivo env.py,\nagregar el target_metadata\n\ntarget_metadata = SQLModel.metadata\n\nReemplazar las urls de la DB en offline y online\nDATABASE_URL = os.getenv(\"DATABASE_URL\")\n\nreemplazar el connectable del online\n\nconnectable = create_engine(DATABASE_URL)\n\nimportar los modelos del proyecto \nfrom models import *\n\n\nagregar la siguiente linea en el archivo script.py.mako\n\nimport sqlmodel # added\n\n\nCrear migraciones\nalembic revision --autogenerate -m \"create user table\"\ncorrer migracion\nalembic upgrade head","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianmahecha%2Ftraffic_offences","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebastianmahecha%2Ftraffic_offences","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianmahecha%2Ftraffic_offences/lists"}