pytrove 🛠️
pytrove 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 pytrove
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 |
Telegram automation |
imap |
aioimaplib |
IMAP email fetching |
bs4 |
beautifulsoup4 |
HTML email parsing |
typecheck |
typeguard |
Runtime type validation (validate_type) |
proxy |
wrapt |
Restricted object proxies (RestrictedProxy, WeakRestrictedProxy, AioThreadWorker.get_loop) |
locale |
babel |
Native-language country/language names (get_cname_native, get_clanguage_code, get_clanguage_name) |
full |
everything above | All features |
# Single feature
pip install "pytrove[crypto]"
# Multiple features
pip install "pytrove[crypto, mongo, phone]"
# Everything
pip install "pytrove[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.
Install the latest version from GitHub
To install directly from the main branch (ahead of the latest PyPI release):
pip install git+https://github.com/eeeob/pytrove.git --force-reinstall
🔹 Without Deps
pip install git+https://github.com/eeeob/pytrove.git --force-reinstall --no-deps
🚀 Quick Start
🔐 Encryption example
pip install "pytrove[crypto]"
from pytrove import encrypt, decrypt
key = "my-secure-key"
encrypted = encrypt("secret data", key)
print(encrypted)
decrypted = decrypt(encrypted, key)
print(decrypted)
🗄️ MongoDB example
pip install "pytrove[mongo]"
from pytrove import MongoIndex
index = MongoIndex.from_dict({"key": {"field": 1}})
🤖 Telegram example
pip install "pytrove[tg]"
from pytrove 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/pytrove.git
cd pytrove
pip install -e ".[full,dev]"
Running tests
pytest
Tests run in CI across every Python version listed in the classifiers above (3.10 through 3.14), both with the minimal (no-extras) install and with [full,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/pytrove
Metadata
Release files for pytrove 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytrove-1.1.0.tar.gz | 94.8 kB | With provenance | Details for pytrove-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytrove-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for pytrove-1.1.0-py3-none-any.whl |
Total release size: 197.6 kB
Release files / pytrove-1.1.0.tar.gz
| Download URL | pytrove-1.1.0.tar.gz |
|---|---|
| Size | 94.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab8ffdedd0348fc6e8c68bc1a5a951031702e3cb81a2d1080cc145dcf2cedcb2
|
|
BLAKE2b-256 checksum How to use checksums |
eaf7108d4ff94a30d7500c3764876892ec9da653d82cf02bc627d20c290b02e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.
Transparency logRelease files / pytrove-1.1.0-py3-none-any.whl
| Download URL | pytrove-1.1.0-py3-none-any.whl |
|---|---|
| Size | 102.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
121689603056eb1485b01b5d53c45ded318be671f7b52ff0eff27df29777f1cf
|
|
BLAKE2b-256 checksum How to use checksums |
b50847aadfd00a85d50d40c1aeffded064599c86b3c4ddf90335f53f0ef867e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.
Transparency logSecurity for pytrove 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pytrove-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.