Python Tools library for some services
Project description
aldheeb-pytools 🛠️
aldheeb-pytools is a modern Python utilities library providing async-ready helpers for backend systems, databases, cryptography, and Telegram automation.
✨ Features
- ⚡ Async-first design built for modern
asyncioapplications - 🗄️ MongoDB utilities for cleaner and safer database operations
- 🔐 Cryptography helpers (AES-GCM, secure key derivation)
- 🤖 Telegram utilities using Kurigram integration
- 📧 IMAP email utilities for fetching and parsing emails
- 🌍 Country & phone utilities for region and number handling
- 🧰 General utilities for parsing, validation, and data handling
- 🧩 Fully typed codebase with strict type hints support
📦 Installation
Starting from v0.2.0, the library uses optional dependencies — install only what you need.
Minimal install (no optional dependencies)
pip install aldheeb-pytools
Install specific features
| Extra | Installs | Use for |
|---|---|---|
crypto |
cryptography |
Encryption & key derivation |
mongo |
pymongo |
MongoDB utilities |
phone |
phonenumbers |
Phone number parsing |
country |
pycountry, phonenumbers |
Country info & region codes |
tg |
kurigram, aiologic |
Telegram automation |
imap |
aioimaplib |
IMAP email fetching |
bs4 |
beautifulsoup4 |
HTML email parsing |
full |
everything above | All features |
# Single feature
pip install "aldheeb-pytools[crypto]"
# Multiple features
pip install "aldheeb-pytools[crypto, mongo, phone]"
# Everything
pip install "aldheeb-pytools[full]"
Note: If you try to use a feature without its required packages installed, you'll get a clear
ImportErrorwith the exact install command needed.
🚀 Quick Start
🔐 Encryption example
pip install "aldheeb-pytools[crypto]"
from pytools import encrypt, decrypt
key = "my-secure-key"
encrypted = encrypt("secret data", key)
print(encrypted)
decrypted = decrypt(encrypted, key)
print(decrypted)
🗄️ MongoDB example
pip install "aldheeb-pytools[mongo]"
from pytools import MongoIndex
index = MongoIndex.from_dict({"key": {"field": 1}})
🤖 Telegram example
pip install "aldheeb-pytools[tg]"
from pytools import format_tg_username, mention_tg_user
username = format_tg_username("@myuser")
mention = mention_tg_user(123456789, "John")
🧪 Development Setup
git clone https://github.com/eeeob/aldheeb-pytools.git
cd aldheeb-pytools
pip install -e ".[dev]"
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
📬 Contact
- Email: aldheeb01@gmail.com
- GitHub: https://github.com/eeeob/aldheeb-pytools
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 aldheeb_pytools-0.2.2.tar.gz.
File metadata
- Download URL: aldheeb_pytools-0.2.2.tar.gz
- Upload date:
- Size: 33.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5926407e586c0aa7dd97cf5c7d3d0a79685fe781a93445772e1858fc6b6807e
|
|
| MD5 |
d9db9bbe8c0980d16181a7e6be3d235b
|
|
| BLAKE2b-256 |
412dd020160542b79a19fed9b309a2d9b353149f4af1d7d75af6e7a11d27e1e4
|
Provenance
The following attestation bundles were made for aldheeb_pytools-0.2.2.tar.gz:
Publisher:
pypi_release.yml on eeeob/aldheeb-pytools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aldheeb_pytools-0.2.2.tar.gz -
Subject digest:
d5926407e586c0aa7dd97cf5c7d3d0a79685fe781a93445772e1858fc6b6807e - Sigstore transparency entry: 1799843017
- Sigstore integration time:
-
Permalink:
eeeob/aldheeb-pytools@3cfe2a650a3e2caa4df671d093e18452edb11455 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/eeeob
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_release.yml@3cfe2a650a3e2caa4df671d093e18452edb11455 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aldheeb_pytools-0.2.2-py3-none-any.whl.
File metadata
- Download URL: aldheeb_pytools-0.2.2-py3-none-any.whl
- Upload date:
- Size: 42.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7403369dd1995d8bf302dea71ada5c9ce291e92ca2a8964c3b1fc8799aa96892
|
|
| MD5 |
5a22184c09e63b33a5df4dc84b157ab0
|
|
| BLAKE2b-256 |
2b110046c991b43e0b734c9f322186368e7c4689b58fa08474cf47c0a306a18e
|
Provenance
The following attestation bundles were made for aldheeb_pytools-0.2.2-py3-none-any.whl:
Publisher:
pypi_release.yml on eeeob/aldheeb-pytools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aldheeb_pytools-0.2.2-py3-none-any.whl -
Subject digest:
7403369dd1995d8bf302dea71ada5c9ce291e92ca2a8964c3b1fc8799aa96892 - Sigstore transparency entry: 1799843254
- Sigstore integration time:
-
Permalink:
eeeob/aldheeb-pytools@3cfe2a650a3e2caa4df671d093e18452edb11455 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/eeeob
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_release.yml@3cfe2a650a3e2caa4df671d093e18452edb11455 -
Trigger Event:
push
-
Statement type: