A FastAPI-based backend service for generating short-form content from videos. This project is structured with a clear modular architecture and uses click and uvicorn for command-line execution and ASGI server deployment.
shorts-generator/
├── src/
│ ├── shorts_generator/
│ │ ├── __init__.py
│ │ ├── __pycache__/
│ │ ├── audio_trancriber.py
│ │ ├── prompt.py
│ │ ├── shorts_agent.py
│ │ ├── utils.py
│ │ ├── video_processor.py
│ │ └── __init__.py
│ │
│ ├── api.py
│ ├── config.py
│ ├── credentials.json # <— Gmail credentials
│ ├── mail_sender.py
│ ├── model.py
│ ├── task.py
│ └── token.json # <— Gmail token
│
├── .env
├── .gitignore
├── .python-version
├── pyproject.toml
├── README.md
├── test.py
└── uv.lock
git clone https://github.com/Saad-Ali-Khan/shorts-generator.git
cd shorts-generatorPrerequisites: Install uv, uvicorn, celery, redis
uv syncThe main FastAPI app is located in src/shorts_generator/api.py
cd src
uvicorn api:app --reload
For Server:
uv run uvicorn api:app --host 0.0.0.0 --port 8000 --reload --timeout-keep-alive 600cd src
uv run celery -A task worker --loglevel=infoAPI docs available at