{"id":31847062,"url":"https://github.com/likeinlife/banner_api","last_synced_at":"2026-04-10T00:44:57.345Z","repository":{"id":232387656,"uuid":"783266019","full_name":"likeinlife/banner_api","owner":"likeinlife","description":"Тестовое задание Backend Avito","archived":false,"fork":false,"pushed_at":"2024-04-13T17:31:33.000Z","size":107,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-14T08:00:05.472Z","etag":null,"topics":["dependency-injector","docker","docker-compose","fastapi","poetry","postgresql","pydantic","python","python3","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/likeinlife.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}},"created_at":"2024-04-07T12:11:05.000Z","updated_at":"2024-04-09T11:10:42.000Z","dependencies_parsed_at":"2024-04-13T18:34:18.716Z","dependency_job_id":"0158e4d1-07b4-4278-ae0f-dd6f44a223f3","html_url":"https://github.com/likeinlife/banner_api","commit_stats":null,"previous_names":["likeinlife/banner_api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/likeinlife/banner_api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likeinlife%2Fbanner_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likeinlife%2Fbanner_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likeinlife%2Fbanner_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likeinlife%2Fbanner_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/likeinlife","download_url":"https://codeload.github.com/likeinlife/banner_api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/likeinlife%2Fbanner_api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010939,"owners_count":26084837,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"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":["dependency-injector","docker","docker-compose","fastapi","poetry","postgresql","pydantic","python","python3","sqlalchemy"],"created_at":"2025-10-12T09:18:53.526Z","updated_at":"2025-10-12T09:18:56.680Z","avatar_url":"https://github.com/likeinlife.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Banner API\n\nСервис, который позволяет показывать пользователям баннеры, в зависимости от требуемой фичи и тега пользователя, а также управлять баннерами и связанными с ними тегами и фичами.\n\n# Демонстрация работы\n\nhttps://disk.yandex.ru/i/xiCEISJEF4f0yA\n\n# Запуск и остановка\n\n1. `make env` - скопировать sample.env в .env\n2. `make up` - запустить сервис (banner_api, postgresql, redis)\n3. `make fill-db count=10` - заполнить ДБ случайными значениями\n4. `make down` - остановить сервис. `make downv` - остановить сервис и удалить volumes\n\n# Проверка\n\n1. Swagger: http://127.0.0.1:8000/api/openapi\n2. Postman: коллекция в корне проекта `Banner API.postman_collection.json`\n\n# Тестирование\n\n1. `make test` - запустить тесты\n2. `make test-down` - полностью удалить контейнеры с тестами\n\n# Реализованные дополнительные требования\n\n1. Линтеры - ruff, mypy\n2. Интеграционные тесты\n3. Метод удаления баннера по фиче/тегу. Для выполнения задачи использовался Dramatiq\n\n# Примечание\n\n## Стек\n\nОсновной:\n\n- Python 3.10\n- FastAPI\n- SQLAlchemy 2\n- Dramatiq\n- PostreSQL\n- Redis\n- Docker, docker-compose\n\nВспомогательный:\n\n- Pydantic v2, pydantic-settings - конфиги, модели\n- DependencyInjector - DI\n- structlog, asgi_correlation_id - логирование, request-id\n- alembic - миграции\n\nИнструменты разработки, линтеры/форматтеры:\n\n- mypy\n- ruff\n- pre-commit\n\n## Токены\n\nТ.к. задачи разработать сервис аутентификации/авторизации не стояло, токены реализованы следующим образом:\n\n- отрицательные число - администратор\n- положительное число - обычный пользователь\n\n## Архитектура\n\nСделано что-то похожее на слоистую архитектуру. Выделены DTO, но нет абстрактных репозиториев.\n\nСтруктура состоит из слоёв:\n\n1. DTO\n2. Репозитории (работа происходит через Unit of Work)\n3. Usecases\n4. Представления","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flikeinlife%2Fbanner_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flikeinlife%2Fbanner_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flikeinlife%2Fbanner_api/lists"}