{"id":22191641,"url":"https://github.com/leosimoes/dio-python-fastapi-workout","last_synced_at":"2026-04-28T20:36:35.195Z","repository":{"id":241292948,"uuid":"806153669","full_name":"leosimoes/DIO-Python-FastAPI-Workout","owner":"leosimoes","description":"Project \"Developing your First API with FastAPI, Python and Docker\" by DIO.","archived":false,"fork":false,"pushed_at":"2024-05-27T16:00:49.000Z","size":382,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-29T02:46:37.158Z","etag":null,"topics":["fastapi","python","rest-api","sqlalchemy"],"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/leosimoes.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-05-26T14:25:06.000Z","updated_at":"2024-05-28T14:22:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"97bcde10-76b8-4de9-a821-0317d02c0152","html_url":"https://github.com/leosimoes/DIO-Python-FastAPI-Workout","commit_stats":null,"previous_names":["leosimoes/dio-python-fastapi-workout"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leosimoes/DIO-Python-FastAPI-Workout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leosimoes%2FDIO-Python-FastAPI-Workout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leosimoes%2FDIO-Python-FastAPI-Workout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leosimoes%2FDIO-Python-FastAPI-Workout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leosimoes%2FDIO-Python-FastAPI-Workout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leosimoes","download_url":"https://codeload.github.com/leosimoes/DIO-Python-FastAPI-Workout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leosimoes%2FDIO-Python-FastAPI-Workout/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32398996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["fastapi","python","rest-api","sqlalchemy"],"created_at":"2024-12-02T12:17:04.076Z","updated_at":"2026-04-28T20:36:35.178Z","avatar_url":"https://github.com/leosimoes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DIO - Python - FastAPI - Workout\nProject \"Developing your First API with FastAPI, Python and Docker\" by DIO.\n\n\n## Development steps\nThe project development steps were:\n\n1. Create project (in PyCharm):\n\n![Image-01-PyCharm](Images/Image-01-PyCharm.png)\n\n2. Run the application and open the browser at `http://127.0.0.1:8000/`:\n\n![Image-02-Run](Images/Image-02-Run.png)\n\n![Image-03-Hello](Images/Image-03-Hello.png)\n\n3. Check if the dependencies `fastapi`, `uvicorn`, `sqlalchemy`, `pydantic`, `alembic` and `asyncpg` are in `requirements.txt`.\n\n4. Create `contrib` package with the files:\n- `__init__.py`;\n- `schemas.py` which implements the `BaseSchema` class:\n\n```python\nfrom pydantic import BaseModel\n\nclass BaseSchema(BaseModel):\n    class Config:\n        extra = 'forbid'\n        from_attributes=True\n```\n\n- `models.py` which implements the `BaseModel` class:\n\n```python\nfrom uuid import uuid4\nfrom sqlalchemy import UUID\nfrom sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column\nfrom sqlalchemy.dialects.postgresql import UUID as PG_UUID\n\n\nclass BaseModel(DeclarativeBase):\n    id: Mapped[UUID] = mapped_column(PG_UUID(as_uuid=True), default=uuid4, nullable=False)\n```\n\nNote: The classes in other packages will inherit from the classes in the corresponding files in the contrib package.\n\n5. Create a package for each entity in MER, with the files `__init__.py`, `schemas.py` and `models.py`:\n- athlete package with classes `Athlete` and `AthleteModel`\n- category package with classes `Category` and `CategoryModel`\n- training_center package with classes `TrainingCenter` and `TrainingCenterModel`\n\n6. Run the `alembic init` command.\n\n7. Create the `docker-compose.yml` file.\n\n\n## References\nDIO - Desenvolvendo sua Primeira API com FastAPI, Python e Docker:\nhttps://web.dio.me/lab/desenvolvendo-uma-api-assincrona-com-fastapi/learning/4058b4b5-1716-43fb-9bf6-121139c16227\n| https://github.com/digitalinnovationone/workout_api/tree/main/workout_api\n\nFastAPI - Documentation:\nhttps://fastapi.tiangolo.com/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleosimoes%2Fdio-python-fastapi-workout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleosimoes%2Fdio-python-fastapi-workout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleosimoes%2Fdio-python-fastapi-workout/lists"}