{"id":21546999,"url":"https://github.com/lexxai/goit_python_web_hw_11","last_synced_at":"2026-04-30T08:34:59.047Z","repository":{"id":205822377,"uuid":"715146574","full_name":"lexxai/goit_python_web_hw_11","owner":"lexxai","description":"GoIT, Python WEB, Homework number 11. FastAPI. PostgreSQL. Docker. REST API. ORM SQLAlchemy. Pydantic. Jinga. Alembic.","archived":false,"fork":false,"pushed_at":"2023-11-08T00:00:11.000Z","size":862,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T01:07:54.665Z","etag":null,"topics":["alembic","docker","fastapi","jinga","jinga2","postgresql","pydantic","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lexxai.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-11-06T15:12:01.000Z","updated_at":"2023-11-07T23:51:20.000Z","dependencies_parsed_at":"2023-11-07T00:41:31.897Z","dependency_job_id":"d41ce085-8ac6-40d5-bba2-f5be67a1081c","html_url":"https://github.com/lexxai/goit_python_web_hw_11","commit_stats":null,"previous_names":["lexxai/goit_python_web_hw_11"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lexxai/goit_python_web_hw_11","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexxai%2Fgoit_python_web_hw_11","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexxai%2Fgoit_python_web_hw_11/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexxai%2Fgoit_python_web_hw_11/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexxai%2Fgoit_python_web_hw_11/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lexxai","download_url":"https://codeload.github.com/lexxai/goit_python_web_hw_11/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexxai%2Fgoit_python_web_hw_11/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32459420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["alembic","docker","fastapi","jinga","jinga2","postgresql","pydantic","rest-api","sqlalchemy"],"created_at":"2024-11-24T06:13:52.184Z","updated_at":"2026-04-30T08:34:59.032Z","avatar_url":"https://github.com/lexxai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goit_python_web_hw_11\n#GoIT, #Python #WEB, Homework number 11. #FastAPI. #PostgreSQL. #Docker. #RESTAPI. #ORM #SQLAlchemy. #Pydantic. #Alembic.\n# Домашнє завдання #11\n\n## Мета цього домашнього завдання\nCтворити REST API для зберігання та управління контактами. API повинен бути побудований з використанням інфраструктури FastAPI та використовувати SQLAlchemy для управління базою даних.\n\n### Контакти повинні зберігатися в базі даних та містити в собі наступну інформацію:\n\n- Ім'я\n- Прізвище\n- Електронна адреса\n- Номер телефону\n- День народження\n- Додаткові дані (необов'язково)\n\n### API повинен мати можливість виконувати наступні дії:\n\n- Створити новий контакт\n- Отримати список всіх контактів\n- Отримати один контакт за ідентифікатором\n- Оновити існуючий контакт\n- Видалити контакт\n\n### На придачу до базового функціоналу CRUD API також повинен мати наступні функції:\n\n- Контакти повинні бути доступні для пошуку за іменем, прізвищем чи адресою електронної пошти (Query).\n- API повинен мати змогу отримати список контактів з днями народження на найближчі 7 днів.\n\n### Загальні вимоги\n\n1. Використання фреймворку FastAPI для створення API\n1. Використання ORM SQLAlchemy для роботи з базою даних\n1. В якості бази даних слід використовувати PostgreSQL.\n1. Підтримка CRUD операцій для контактів\n1. Підтримка зберігання дати народження контакту\n1. Надання документів для API\n1. Використання модуля перевірки достовірності даних Pydantic\n\n\n## Виконання \n\n### Index Templated page\n![Index](doc/index_01.png)\n\n### PostgreSQL. model Contacts. ORM SQLAlchemy, Alembic\n\n![pg-table](doc/pg-table-02.png)\n\n### FastAPI CRUD \n\n![api-crud-01](doc/api-crud-01.png)\n\n\n### BONUS:\n\n####  Контакти повинні бути доступні для пошуку за іменем, прізвищем чи адресою електронної пошти (Query).\n\n![api-search-01](doc/api-search-01.png)\n\n#### API повинен мати змогу отримати список контактів з днями народження на найближчі 7 днів.\n\n![api-search-01](doc/api-search-02.png)\n\n\n## DOCKER\n\n### BUILD\n![api-docker-01](doc//docker-01.png)\n\nDockerHUB: https://hub.docker.com/r/lexxai/web_hw11\n\n### RUN\n\n.env\n```\nPOSTGRES_USERNAME=postgres\nPOSTGRES_PASSWORD=XXXXXXXX\nPOSTGRES_HOST=pg,localhost\nPOSTGRES_PORT=5432\nPOSTGRES_DATABASE=postgres\n```\n\n```\ndocker-compose up -d code\n``` \n(scripts/docker_run_docker-compose.cmd)\n\n\n![api-docker-01](doc/docker-02.png)\n\n\n\n## OpenAPI DOCS\n\n[openapi.json](doc/openapi.json) - offline\n\n[openapi.json](http://127.0.0.1:9000/openapi.json) - online\n\n[online FastAPI Docs](http://127.0.0.1:9000/docs) - online FastAPI","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexxai%2Fgoit_python_web_hw_11","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flexxai%2Fgoit_python_web_hw_11","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexxai%2Fgoit_python_web_hw_11/lists"}