Modern Python 3.11+ Framework: Flask/FastAPI orchestration, and strict runtime enforcement.
Project description
🛡️ py_aide
Modern Python 3.11+ Framework: Flask/FastAPI Orchestration & Strict Runtime Enforcement
py_aide is a robust, developer-centric framework designed to bring safety, structure, and consistency to Python web applications. It provides a unique "Strict Runtime Enforcement" layer that ensures your code remains clean, documented, and type-safe at execution time.
🚀 Key Features
- Strict Runtime Enforcement: A powerful decorator that enforces type hints, docstrings, and calling conventions at runtime.
- Unified Server Portal: Seamlessly orchestrate Flask and FastAPI applications with shared security gates.
- Circuit Breaker Resilience: Industrial-grade protection against cascading failures.
- Thread-Safe SQL: A thread-level multiton SQLite manager with automatic JSON serialization and a custom DSL.
- Modern Security: Argon2id password hashing with background rehashing and Fernet-based encryption.
- Enterprise HTTP Client: A standardized, "always resolve" HTTP client with built-in retries and interceptors.
📚 Documentation Roadmap
We recommend exploring the framework in this order:
⚙️ Core System
- Structural Enforcement: Learn about the
@enforce_requirementsdecorator and the validation engine. - Global Utilities: Discover helpers for dates, image processing, secure codes, and file system operations.
🌐 Server & API
- Service Portals: Documentation for Flask/FastAPI orchestration, security gates, and WebSockets.
- HTTP Client & Response: Master the "Always Resolve" strategy and the unified
Responseprotocol.
🧵 Persistence & Concurrency
- Database Orchestration: Deep dive into thread-safe SQLite and the powerful JSON DSL.
- Hybrid Cache: Lightning-fast memory access with non-blocking disk persistence.
- Threading & Buffers: Learn how to use persistent queues and non-blocking write buffers.
- Resilience & Circuits: Protecting your services with the Circuit Breaker pattern.
🔐 Security
- Security & Identity: Hashing, Token management, and Encryption standards.
⚙️ Core Philosophy: Strict Enforcement
At the heart of py_aide is the @enforce_requirements decorator. It prevents "sloppy" code by failing early (at boot-time or runtime) if your contracts are violated.
from py_aide.enforcer import enforce_requirements
from py_aide.customTypes import Options
@enforce_requirements
def create_user(*, name: str, role: Options[str, ["admin", "user"]]) -> dict:
"""Creates a new user record with runtime type and choice validation."""
return {"name": name, "role": role}
📦 Installation
pip install py_aide
Note:
py_aiderequires Python 3.11+ and is currently optimized for Linux environments.
📄 License
This project is licensed under the MIT License.
👥 Authors
- Kakuru Douglas - vicaniddouglas@gmail.com
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 py_aide-0.21.0.tar.gz.
File metadata
- Download URL: py_aide-0.21.0.tar.gz
- Upload date:
- Size: 201.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e373cb0d5599a9bd641836e28418be59ff5104109f3a520e0d32552423063e77
|
|
| MD5 |
e62b45a437a8887e5d677758bf3aebb4
|
|
| BLAKE2b-256 |
88483c588bc0d5f708d46d2247bb90a2ec7976c9615c31bae1c8d1f8719d1506
|
File details
Details for the file py_aide-0.21.0-py3-none-any.whl.
File metadata
- Download URL: py_aide-0.21.0-py3-none-any.whl
- Upload date:
- Size: 201.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42fa1a239ffb18b08fc436f176901bfffafb443b95471d44a068c2b13fac963f
|
|
| MD5 |
15c3a240a8fcb1bda5485c8bb121d493
|
|
| BLAKE2b-256 |
1684f77f1fd7720458c2e2a730cfef4d0b99e844d38083ee1e61ead50b416c01
|