๐ Basic example of a URL shortener project developed using FastAPI.
This URL shortener allows users to input a long URL and generate an equivalent short URL. Users can then use the generated short URL to quickly access the original URL.
- Shortens long URLs into short URLs.
- Get original URLs by short URL.
- tests apis.
- Add some cache mechanism.
- test use case.
- Implement frontend.
pip install -r requirements.txt
or pip install -r requirements-tests.txt
uvicorn src.main:app --host 0.0.0.0 --port 5000 --reload
python -m pytest
python -m pytest --cov=src
docker-compose build
docker-compose up
Check linters errors
ruff check src
Check format errors
ruff format -- check src
Fix imports order
ruff --fix src
Fix file format
ruff format src