Protobase is a foundational Python library for class creation, enhancing efficiency and reliability, automatic protocol implementation akin to Rust's Traits, and features for immutable object creation.
Project description
Protobase
Protobase is a comprehensive Python library designed to serve as a foundational element in class creation, similar to dataclasses and the attrs library. It aims to streamline and optimize the development process by introducing efficient, reliable, and user-friendly structures.
- traits (defered auto impl methods)
- immutability
- consign
FUTURE
- attr realtime type checking (debug mode)
- annotations ++
- Validators and codecs (json, bson, etc)
- schematics generation (openapi & more)
- Design Patterns (visitor)
Features
- Efficient Attribute Management: Utilizes
__slots__to disable dynamic attribute assignment, boosting performance and reducing memory usage. - Automatic Protocol Implementation: Inherits from Protocol, allowing classes to automatically implement methods, akin to Rust's trait derivation.
- Encapsulation of Python's Intricacies: Simplifies the usage of complex Python features like
__dict__and__weakref__, making them more accessible and less error-prone. - Immutable and Unique Objects: Provides mechanisms for creating immutable and unique objects (interning), ensuring data integrity and consistency.
Installation
pip install protobase
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 protobase-0.1.tar.gz.
File metadata
- Download URL: protobase-0.1.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df2032e19bfa7ed5dd440aedd1e08f37919abf5b7109af7a17522b7c80106056
|
|
| MD5 |
79b9bef9aaba15c4038f003f1b78db89
|
|
| BLAKE2b-256 |
1e3ffafd5e84c771015399af952e92e285e6de9ab588b7fa82325814348b1f28
|
File details
Details for the file protobase-0.1-py3-none-any.whl.
File metadata
- Download URL: protobase-0.1-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1191836ba9bc8b8cd6b2a81f16cc4b04d7270ddc21df18f7061b0ffd4b70bd46
|
|
| MD5 |
3358ac12967443c42406ca6f9566b46c
|
|
| BLAKE2b-256 |
5ea6fe1c3ccdd2b4101709aefc027d9ebda5652e764b6a27bb7feeb5d51df1dd
|