{"id":30134084,"url":"https://github.com/lexxai/epam-2024-petworld-python","last_synced_at":"2026-04-27T16:32:01.389Z","repository":{"id":290158290,"uuid":"865061085","full_name":"lexxai/EPAM-2024-petworld-python","owner":"lexxai","description":"EMAM . Marathon 2024. PetWorld. API, Backend, User Auth. FastAPI. Python","archived":false,"fork":false,"pushed_at":"2025-04-27T10:03:46.000Z","size":1512,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-09-29T07:59:57.238Z","etag":null,"topics":["api","backend","docker","epam","fastapi","mysql","python"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/lexxai.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":"2024-09-29T21:59:00.000Z","updated_at":"2025-04-27T08:29:54.000Z","dependencies_parsed_at":"2025-04-27T09:36:46.667Z","dependency_job_id":null,"html_url":"https://github.com/lexxai/EPAM-2024-petworld-python","commit_stats":null,"previous_names":["lexxai/epam-2024-petworld-python"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lexxai/EPAM-2024-petworld-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexxai%2FEPAM-2024-petworld-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexxai%2FEPAM-2024-petworld-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexxai%2FEPAM-2024-petworld-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexxai%2FEPAM-2024-petworld-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lexxai","download_url":"https://codeload.github.com/lexxai/EPAM-2024-petworld-python/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexxai%2FEPAM-2024-petworld-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32345802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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":["api","backend","docker","epam","fastapi","mysql","python"],"created_at":"2025-08-10T21:01:17.956Z","updated_at":"2026-04-27T16:32:01.368Z","avatar_url":"https://github.com/lexxai.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Local setup guide\n\n***\n\u003e This guide should be used for local setup and testing only purposes. Don't use any credentials you might bump into in files like `docker-compose.yml` in production.\n\n1. Based on `.env.template`, create your own `.env` file and fill in all the possible entries. `APP_CONFIG__DB__URL` is mandatory to start the project and apply initial migrations. P.S. It is mandatory to fill in passwords with any value you want\n2. Run `docker-compose up` command and make every container is up-and-running\n3. Apply the latest migrations you have in `alembic/versions` folder. For this use `alembic upgrade head` command.\n4. Follow `localhost:8000/docs` to have a view of APIs available to do further dev testing\n\n## Homework\n0. Setup the project locally and make sure it's running without any issues\n1. Configure and implement logging functionality so that every request is logged into console and separate file named `pet.log`. This logging data should contain:\n   * Request URL\n   * Request method\n   * Status code\n   * Total time required to complete the request\n2. _Additionally_ you could implement the same logging functionality, but using decorator approach, so that codebase is split to corresponding modules and looks concise.\n\n\n## Homework Solution\n\n1. .env moved to level of Docker env\n2. Configured logging_config\n![logging_config example](image.png)\n3. Logging HTTP request (middleware)\n![middleware](image-1.png)\n4. Log request\n![alt text](image-2.png)\n![alt text](image-3.png)\nPostman:\n![alt text](image-4.png)\nLog postman /me:\n![alt text](image-5.png)\nDecorator:\n![alt text](image-7.png)\n![alt text](image-6.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexxai%2Fepam-2024-petworld-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flexxai%2Fepam-2024-petworld-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexxai%2Fepam-2024-petworld-python/lists"}