More types for Python.
Project description
Typhe
Typhe is a lightweight Python library that extends Python's type system with additional integer and string types, as well as structures (struct) to make your code safer and more explicit.
🔹 Supported Types
- char
- sint8
- uint8
- sint16
- uint16
- uint32
- sint32
- uint64
- sint64
- struct
⚡ Additional Types
- mint – Limited integer type
- mstr – Limited string type
📦 Requirements
- Python >= 3.8
- setuptools >= 42
- wheel
⚙️ Installation
Install Typhe via pip:
pip install typhe
💡 Usage Example
from typhe import uint8, struct
class Calculator(struct):
def __init__(self):
super().__init__({
"operator": str,
"number1": uint8,
"number2": uint8
})
calculator = Calculator()
calculator(
operator="+",
number1=uint8(5),
number2=uint8(10)
)
print(calculator.number1) # Output: 5
🤝 Contributing
Contributions are welcome! Please fork the repository, make your changes, and submit a pull request.
📝 License
Typhe is licensed under the GPL3 License. See the LICENSE file for details.
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
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 typhe-2025.0.4.tar.gz.
File metadata
- Download URL: typhe-2025.0.4.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a48e4a4049ae93bd7655d2c1b995dd7744ee15ab71c399ca10466baaa1812bcb
|
|
| MD5 |
46726185d180b4fc03f0c840f51c1263
|
|
| BLAKE2b-256 |
7779cb1f6554c602fa8069730393d3785cd07e6135247e3277b0038c6df7338b
|
File details
Details for the file typhe-2025.0.4-py3-none-any.whl.
File metadata
- Download URL: typhe-2025.0.4-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16025e2ffd11c46e9d6f7b6201be5cf21d8e13ec57d90d29d52ff41d14f9b4ec
|
|
| MD5 |
120832e1c3dab276f49ad36af1c85ced
|
|
| BLAKE2b-256 |
63c8a3b9f1be4118f585b71b8d7f4ed1e24ee94d0be1d4727ed29c3d8ca0cd51
|