{"id":27484578,"url":"https://github.com/allwelldotdev/restapis_fastapi","last_synced_at":"2026-05-20T07:31:32.774Z","repository":{"id":285351492,"uuid":"957824749","full_name":"allwelldotdev/restapis_fastapi","owner":"allwelldotdev","description":"Learning FastAPI with Mastering REST APIs with FastAPI by Jose Salvatierra Fuentes..","archived":false,"fork":false,"pushed_at":"2025-11-23T13:18:20.000Z","size":894,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-23T15:13:41.794Z","etag":null,"topics":["fastapi","logging","pytest","python"],"latest_commit_sha":null,"homepage":null,"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/allwelldotdev.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,"zenodo":null}},"created_at":"2025-03-31T07:38:21.000Z","updated_at":"2025-11-23T13:18:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"b8e171fa-e0b8-4f66-9e27-c514c8db2bb2","html_url":"https://github.com/allwelldotdev/restapis_fastapi","commit_stats":null,"previous_names":["allwelldotdev/restapis_fastapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/allwelldotdev/restapis_fastapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allwelldotdev%2Frestapis_fastapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allwelldotdev%2Frestapis_fastapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allwelldotdev%2Frestapis_fastapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allwelldotdev%2Frestapis_fastapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allwelldotdev","download_url":"https://codeload.github.com/allwelldotdev/restapis_fastapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allwelldotdev%2Frestapis_fastapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33250371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T04:48:54.280Z","status":"ssl_error","status_checked_at":"2026-05-20T04:48:10.851Z","response_time":356,"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","logging","pytest","python"],"created_at":"2025-04-16T16:45:07.509Z","updated_at":"2026-05-20T07:31:32.757Z","avatar_url":"https://github.com/allwelldotdev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Building a Minimal Asynchronous Social Media REST API with FastAPI \u0026 TDD (Test Driven Development)\n\n*(Updated for v0.2)*\n\nBuilt a minimal Social Media API with REST architecture as a project to deepen my understanding of FastAPI \u0026 Python. `socials_api` is a minimal Social Media API with the following functions:\n- User Posts\n- User Comments\n\nUsing Swagger UI, you can access the API docs at the `/docs` endpoint (as seen below).\n\n![API docs from Swagger UI](./assets/doc_imgs/v0.2_api_docs.png)\n\n## Code Functionality *(Updated in v0.2)*\n1. **SQLite SQL Database:** Transitioned from a dictionary-based data storage system to using an SQLite database for persisten data storage and retrieval.\n2. **Switch to DB for deduplication of Primary Keys for Post \u0026 Comment ID Values:** No need for custom algorithm to keep the ID values deduplicated. Using DB Primary Keys, ID values auto-increment and remain unique.\n3. **More Endpoints:** Added \"Get Posts With Comments\" endpoint and updated the return schema for posts and comments to match their database model.\n\n\n## TDD (Test Driven Development)\nTo ensure TDD (Test Driven Development), I used the popular Python testing framework `pytest` to write FastAPI unit tests for the codebase. All 24 tests pass! You can find tests code in `./v0.2/socials_api/tests/` directory.\n\n![v0.2 tests with pytest](./assets/doc_imgs/v0.2_tests.png)\n\n## Code use\nAn exhibit of API calls to display what the API can do. Testing using Postman API Client:\n1. Create Post\n\n![v0.2 API 'create post' example](./assets/doc_imgs/v0.2_create_post.png)\n\n2. Post Comments\n\n![v0.2 API 'post comments' example](./assets/doc_imgs/v0.2_post_comment.png)\n\n3. Get All Comments\n\n![v0.2 API 'get all comments' example](./assets/doc_imgs/v0.2_get_all_comments.png)\n\n4. Delete Post By Id\n\n![v0.2 API 'delete post by id' example](./assets/doc_imgs/v0.2_delete_post_by_id.png)\n\n\n## Run code locally...\nTo run the codebase appropriately locally, read the following instructions:\n- Clone/Fork the repo to local.\n- Start FastAPI web server:\n  ```bash\n  cd restapi_fastapi # make sure you are in the project root directory\n  uvicorn --app-dir v0.2 socials_api.main:app --reload\n  ```\n- Connect to web server using a web browser client or Postman API Client. Go to `localhost/docs` or `localhost:8000/docs`.\n- Manually test API endpoints. To find available API endpoints, use Swagger UI API docs by visiting `/docs` endpoint on web browser client.\n- Run unit tests on codebase (using `pytest`):\n  ```bash\n  cd restapi_fastapi # make sure you are in the project root directory\n  pytest -v v0.2/socials_api\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallwelldotdev%2Frestapis_fastapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallwelldotdev%2Frestapis_fastapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallwelldotdev%2Frestapis_fastapi/lists"}