Skip to main content

Python Tools library for some services

Project description

aldheeb-pytools 🛠️

PyPI version Python versions License: MIT

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 asyncio applications
  • 🗄️ 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 Telegram automation
aiologic aiologic aio 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 ImportError with 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

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

aldheeb_pytools-0.2.4.tar.gz (33.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aldheeb_pytools-0.2.4-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

Details for the file aldheeb_pytools-0.2.4.tar.gz.

File metadata

  • Download URL: aldheeb_pytools-0.2.4.tar.gz
  • Upload date:
  • Size: 33.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aldheeb_pytools-0.2.4.tar.gz
Algorithm Hash digest
SHA256 d7ce6de73d3abb46a71f79520e263dc39fb1e9aafe1cd60eb60a7be9c22c8bb1
MD5 3165aad739b690bff550e796a7637e25
BLAKE2b-256 3a90ebd337072090854d960ec56382ef55ba639e65f255bc15ffd99e550bcc7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for aldheeb_pytools-0.2.4.tar.gz:

Publisher: pypi_release.yml on eeeob/aldheeb-pytools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aldheeb_pytools-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: aldheeb_pytools-0.2.4-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

Hashes for aldheeb_pytools-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 36c4e9db725c8b83b189ef7c18ed054f5c1510da6ad39b8cd3701c5aad7b6806
MD5 94d85b7044e6fc53e9d8f4c788f586a5
BLAKE2b-256 3cac8f33ad4a6067613ce38b8d965e9261f5e536a2d68a2e3d8ae54bcff8170c

See more details on using hashes here.

Provenance

The following attestation bundles were made for aldheeb_pytools-0.2.4-py3-none-any.whl:

Publisher: pypi_release.yml on eeeob/aldheeb-pytools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page