https://github.com/code4mk/django-petra
Simplify Django REST API development effortlessly with django petra.
https://github.com/code4mk/django-petra
code4mk django django-api django-docker django-petra django-rest-api
Last synced: about 2 months ago
JSON representation
Simplify Django REST API development effortlessly with django petra.
- Host: GitHub
- URL: https://github.com/code4mk/django-petra
- Owner: code4mk
- License: mit
- Created: 2023-12-11T10:42:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-12T12:46:03.000Z (4 months ago)
- Last Synced: 2025-04-06T20:37:01.880Z (3 months ago)
- Topics: code4mk, django, django-api, django-docker, django-petra, django-rest-api
- Language: Python
- Homepage: https://opensource.code4mk.org/docs/django-petra
- Size: 72.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Django Petra
Django Petra is a powerful collection of utilities and enhancements for Django Rest Framework (DRF), designed to streamline the process of building RESTful APIs. It provides convenience functions, tools, and patterns to help developers write clean, efficient, and maintainable code.
## Features
### Core Functionality
- Enhanced DRF core components for common API development tasks
- Customized base classes with improved functionality
- Utility functions and mixins for common API patterns
- Simplified pagination, routing, and data serialization### File Storage
- Flexible storage system supporting both local and S3 storage
- Easy file operations (put, get, delete, update, etc.)
- Temporary URL generation for S3
- Directory listing and file management### Email Management
- Enhanced email sending capabilities
- HTML template support with inline CSS
- Queue-based email sending using Celery
- Attachment support including inline images### CORS Handling
- Comprehensive CORS middleware
- Configurable CORS settings
- Origin whitelist and regex support
- Preflight request handling### API Logging
- Automatic API request/response logging
- Performance metrics tracking
- Client IP tracking
- Detailed request/response information storage### Task Scheduling
- Celery integration for background tasks
- Flexible scheduling patterns (cron-style)
- Various scheduling intervals (seconds to yearly)
- Queue management### Database Utilities
- Raw query helpers
- Custom model managers
- Soft delete functionality
- Time-stamped model mixins