A modern API developer portal for Django REST Framework projects.
Project description
Modern DRF Swagger 🚀
A modern, team-based API developer portal for Django REST Framework projects with built-in analytics and granular access control.
📸 Screenshots
Login Page
Secure login with dark/light theme support and password visibility toggle
API Explorer
Modern interface for browsing, testing, and exploring your API endpoints
Analytics Dashboard
Track API usage, latency, and error rates with beautiful charts
Features
- 🎨 Modern API Explorer: Clean, dark-themed interface for exploring and testing DRF APIs
- 👥 Team Management: Role-based access control (Super Admin, Admin, Developer, Viewer)
- 🔒 Endpoint Permissions: Granular control over which teams can access specific endpoints
- 📊 Analytics Dashboard: Track API usage, latency, and error rates with charts
- 📝 Request History: Personal history with search, filtering, and request replay (auto-cleanup of old logs)
- 🎯 Schema-Driven: Automatically discovers endpoints via drf-spectacular
- ⚡ Real Request Proxy: Execute actual HTTP requests with accurate latency measurement
- 🎨 Syntax Highlighting: JSON responses with color-coded syntax
- 🔍 Search & Filter: Quickly find endpoints and past requests
- 🔖 Bookmarkable Endpoints: URL hash routing preserves selected endpoint on refresh
- 📦 Collapsible Groups: Organize endpoints by tags with collapse/expand controls
🚀 Quick Start
Want detailed step-by-step instructions? Check out the 📖 QUICKSTART.md guide!
1. Install the Package
Via PyPI (Recommended):
pip install modern-drf-swagger
Or via Git (Development):
git clone https://github.com/firdavsDev/modern-drf-swagger.git
cd modern-drf-swagger
pip install -e .
2. Add to INSTALLED_APPS
That's it! You only need to add api_portal - no need to manually add drf-spectacular:
# settings.py
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
# Third-party
'rest_framework',
# API Portal (auto-configures everything)
'api_portal',
# Your apps
'myapp',
]
3. Configure API Portal (Optional)
All configuration is done through one dictionary - API Portal handles drf-spectacular internally:
# settings.py
API_PORTAL = {
# Basic Info (automatically configures drf-spectacular)
'TITLE': 'My Company API Portal',
'DESCRIPTION': 'Complete API documentation',
'VERSION': '1.0.0',
# Features
'ANALYTICS_ENABLED': True,
'HISTORY_LIMIT': 100,
'ALLOW_ANONYMOUS': False,
# Schema Settings
'SCHEMA_PATH_PREFIX': r'/api/', # Only show endpoints starting with /api/
# UI Settings
'ENDPOINTS_COLLAPSIBLE': True,
'ENDPOINTS_DEFAULT_COLLAPSED': False,
# Filtering
'EXCLUDE_PATHS': ['/admin/', '/internal/'],
}
Note: You don't need to configure REST_FRAMEWORK['DEFAULT_SCHEMA_CLASS'] or SPECTACULAR_SETTINGS - API Portal does this automatically!
4. Add URL Routes
# urls.py
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('api/', include('myapp.urls')), # Your API
path('api/docs/', include('api_portal.urls')), # API Documentation Portal
]
5. Run Migrations
python manage.py migrate
6. Create Superuser and Setup Teams
python manage.py createsuperuser
python manage.py runserver
Visit http://localhost:8000/admin to:
- Create teams
- Add team members with roles
- Grant endpoint permissions to teams
7. Access the Portal
Visit http://localhost:8000/api/docs/ and login with your credentials.
📚 Full Documentation
- 📖 Complete Quickstart Guide - Detailed step-by-step installation and setup
- 📋 Changelog - Version history and updates
- 📜 License - MIT License
🚀 Roadmap
- WebSocket/GraphQL support
- API key authentication
- Request mocking
- Export analytics as CSV
- Custom themes
- OAuth2/SAML integration
- Comprehensive test suite
🤝 Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
See .github/copilot-instructions.md for development guidelines and architecture details.
📄 License
MIT License - see LICENSE file for details.
Copyright (c) 2026 DavronbekDev
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file modern_drf_swagger-1.0.1.tar.gz.
File metadata
- Download URL: modern_drf_swagger-1.0.1.tar.gz
- Upload date:
- Size: 55.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a80cb64955ad7e7fe90f2c88ddbee47538af8de8a3971a7d01457fbf14c2b19
|
|
| MD5 |
e42c39c1e6569e22f2df4adda7efcaff
|
|
| BLAKE2b-256 |
531a6a1d5541788c7644119f34dbff898f58cddf8ecda394747304c96f126e63
|
File details
Details for the file modern_drf_swagger-1.0.1-py3-none-any.whl.
File metadata
- Download URL: modern_drf_swagger-1.0.1-py3-none-any.whl
- Upload date:
- Size: 61.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
164380e142cf2cc2c647c6b671068399c625b98c461b694482eb6d4b26bf2463
|
|
| MD5 |
a85127caf16ba665606b7f9d2d09715d
|
|
| BLAKE2b-256 |
80e54feee5ea6b95d53e3fadb2ab60c8fc9b9e5be8e1b6733afd99a62e4db70d
|