Note
Swagger UI will be available at http://127.0.0.1:8000/api/v1/schema/swagger-ui/
cd scripts- Command Prompt or PowerShell:
.\run.bat - macOS or Linux Terminal:
source run.sh
sudo apt updatesudo apt upgradesudo apt install -y python3-venv python3-pippython3 -m venv venvsource venv/bin/activatepip install -r requirements.txtpython manage.py makemigrationspython manage.py migratepython populate.pypython manage.py runserver
- GET
/posts: Returns a paginated list of posts. - GET
/posts/{id}: Retrieves a single post by ID. - POST
/posts: Creates a new post. - PUT
/posts/{id}: Fully replaces an existing post. - PATCH
/posts/{id}: Partially updates an existing post. - DELETE
/posts/{id}: Deletes a post.
- GET
/proxy/posts: Forwards request to the external API’s /posts endpoint, passing all query parameters. - GET
/proxy/posts/{id}: Fetches a specific post by ID from the external API.
Note
See OBJECTIVES.md for project goals and requirements.
- Caching: Django's in-memory cache for proxied responses (30 seconds TTL).
- Rate Limiting: Django REST Framework's default throttling (per IP).
- Caching: Switch Django’s cache backend to Redis for distributed caching.
- Rate Limiting: Use Redis-backed throttling.
- Retry Logic: Implement retry mechanisms.
- Logging: Add custom logging to monitor retries, failures, and response times.
- Monitoring: Integrate Datadog or Prometheus to track application performance, collect metrics, and set up real-time alerts for errors and performance issues.
- API Key: Add API authentication if the external API requires it.
cd scripts- Command Prompt or PowerShell:
.\run.bat - macOS or Linux Terminal:
source run.sh
cd scripts- Command Prompt or PowerShell:
.\initialize.bat - macOS or Linux Terminal:
source initialize.sh
python -m venv venv- Command Prompt:
.\venv\Scripts\activate - PowerShell:
.\venv\Scripts\Activate.ps1 - macOS or Linux Terminal:
source venv/bin/activate deactivate
pip listpip freeze > requirements.txtpip install -r requirements.txtpip uninstall -r requirements.txt -y
python populate.pypython manage.py makemigrationspython manage.py migratepython manage.py runserver