Rite is a modern Python utility library targeting Python 3.10+ with zero external runtime dependencies. This guide will help you get started quickly.
pip install ritepoetry add ritefrom rite.text.slug import slug_is_valid
from rite.crypto.hash import hash_sha256
from rite.filesystem.file import file_copy
# Validate a slug
is_valid = slug_is_valid("my-awesome-slug") # True
# Hash a string
hashed = hash_sha256("secret")
# Copy a file
file_copy("source.txt", "destination.txt")Rite is organized into functional modules:
- uuid: UUID generation and validation
- hash: Hashing functions (SHA256, MD5, etc.)
- cipher: Encryption and decryption utilities
- file: File operations (copy, move, read, write)
- folder: Directory operations
- path: Path manipulation utilities
- slug: URL-friendly slug generation and validation
- case: Case conversion (camelCase, snake_case, etc.)
- sanitize: Text sanitization and cleaning
- random: Random string generation
- buffer: Circular buffers, ring buffers
- cache: LRU, LFU, TTL caches
- queue: Priority queues, double-ended queues
- tree: Tree data structures
- Type conversion utilities
- Data format conversions
- Mathematical utilities
- Number formatting and parsing
- Date and time utilities
- Timezone handling
- Python >=3.10, <4.0
- No external runtime dependencies
Rite is released under the MIT License. See LICENSE for details.