GitHub - dmiganoid/Prac9_12 · GitHub
Skip to content
dmiganoidPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

PDF Report Microservices

Учебный MVP по теме "Микросервис для генерации PDF-отчётов по данным из БД".

Состав

  • api-gateway - внешняя точка входа на FastAPI.
  • report-service - управление заявками на отчёты, PostgreSQL, Redis Streams, MinIO.
  • pdf-worker - фоновая генерация PDF через ReportLab.
  • postgres, redis, minio - инфраструктура для MVP.

Запуск

cp .env.example .env
docker compose up --build

После запуска доступны:

Проверка сценария

curl -X POST http://localhost:8000/api/v1/reports \
  -H "Content-Type: application/json" \
  -d '{
    "report_type": "sales_summary",
    "date_from": "2026-01-01",
    "date_to": "2026-01-31",
    "filters": {}
  }'
curl http://localhost:8000/api/v1/reports/<report_id>
curl -o report.pdf http://localhost:8000/api/v1/reports/<report_id>/download

Тесты

python3 -m pip install -r requirements-dev.txt
pytest

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages