Skip to main content

A utility package for Django that makes API development easier for developers.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_petra-0.0.1.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

django_petra-0.0.1-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file django_petra-0.0.1.tar.gz.

File metadata

  • Download URL: django_petra-0.0.1.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.18

File hashes

Hashes for django_petra-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2a3bc8fa8b5a223c74fbbeaee771adde7ee06a679b9251735c0cf77eb728b8ed
MD5 d9f0b6b7f81e8425915cf6a25d15f8ec
BLAKE2b-256 7bea8f41d956d4c2b6fb9bc963b86f16861330619ef16960467d41eabbe7e60e

See more details on using hashes here.

File details

Details for the file django_petra-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: django_petra-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 33.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.18

File hashes

Hashes for django_petra-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c144ab2cacacb8fea78aafa9921fd86574db92b57663fc8de5c74f4056134c3
MD5 b2b894072af450f65a0706fba48b516c
BLAKE2b-256 0b46a8b9488d5b17009988387bcd3bbab77ea4a054b5bda418d0e441a1f2e1c2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page