xlib-pillars: A comprehensive library ecosystem with modular pillars for modern Python development
Project description
xlibrary
A comprehensive Python library ecosystem with modular "pillars" that provide specialized functionality for modern development needs.
Overview
xlibrary is designed with a pillar-based architecture where each pillar is independently installable and has its own dependencies. This allows you to install only the functionality you need while maintaining a clean, modular codebase.
Available Pillars
๐ค AI Pillar
Multi-provider AI abstraction layer supporting:
- Claude (Anthropic)
- OpenAI (GPT models)
- DeepSeek
- Mock Provider (for testing)
Features: conversation management, metrics, health monitoring, rate limiting, structured logging.
โ๏ธ Config Pillar
Configuration management with:
- TOML support with interpolation
- Environment variable integration
- Encrypted configuration values
- Schema validation
๐ฅ Download Pillar
Advanced download manager supporting:
- Multi-content downloads
- Progress tracking
- Resume capability
- Rich terminal output
- Async operations
๐ฌ Media Pillar
Media processing capabilities:
- Video processing with MoviePy
- Image processing with Pillow
- Watermarking engine
- Animation support
- OpenCV integration
๐ Encryption Pillar
Security and encryption utilities:
- Modern cryptographic operations
- Secure key management
- Data encryption/decryption
๐ Files Pillar
File and directory management:
- Advanced file operations
- Magic number detection
- Compression utilities
- Deduplication
๐ฆ Imports Pillar
File import management system:
- Pattern matching
- File watching
- Import processing
- Type detection
๐ Pipeline Pillar
Universal pipeline management:
- Data processing pipelines
- Stage management
- Error handling
- Progress tracking
๐ป CLI Pillar
Professional command-line interface framework:
- Rich terminal output
- Interactive menus
- Progress indicators
- Keyboard navigation
๐ก Communication Pillar
Communication utilities:
- Email integration
- Message handling
- Provider abstraction
Installation
Install Specific Pillars
# Install just the AI pillar
pip install xlibrary[ai]
# Install configuration management
pip install xlibrary[config]
# Install media processing
pip install xlibrary[media]
# Install download manager
pip install xlibrary[download]
Install Multiple Pillars
# Install AI and config pillars
pip install xlibrary[ai,config]
# Install all pillars
pip install xlibrary[all]
Development Installation
pip install xlibrary[dev]
Quick Start
AI Pillar Example
from xlibrary.ai import AIManager
# Initialize with your preferred provider
ai = AIManager(provider="claude", api_key="your-api-key")
# Simple request
response = ai.request("Hello, how are you?")
print(response.content)
# Streaming response
for chunk in ai.stream("Tell me a story"):
print(chunk.content, end="")
Config Pillar Example
from xlibrary.config import ConfigManager
# Load and manage configuration
config = ConfigManager("config.toml")
database_url = config.get("database.url")
api_key = config.get("api.key", encrypted=True)
Download Pillar Example
from xlibrary.download import DownloadManager
# Download with progress tracking
downloader = DownloadManager()
result = downloader.download(
"https://example.com/file.zip",
destination="./downloads/"
)
Features
- Modular Architecture: Install only what you need
- Type Safety: Comprehensive type hints throughout
- Async Support: Built-in async operations where applicable
- Rich Logging: Structured logging with configurable levels
- Testing: Comprehensive test suite with 95%+ coverage
- Documentation: Extensive documentation and examples
Requirements
- Python 3.8+
- Individual pillar dependencies as needed
Development
Building
./scripts/build.sh
Testing
pytest
Code Quality
black src/ tests/ # Format code
mypy src/xlibrary # Type checking
flake8 src/ tests/ # Linting
Project Structure
xlibrary/
โโโ src/xlibrary/ # Main package
โ โโโ ai/ # AI pillar
โ โโโ config/ # Config pillar
โ โโโ download/ # Download pillar
โ โโโ media/ # Media pillar
โ โโโ encryption/ # Encryption pillar
โ โโโ files/ # Files pillar
โ โโโ imports/ # Imports pillar
โ โโโ pipeline/ # Pipeline pillar
โ โโโ cli/ # CLI pillar
โ โโโ communication/ # Communication pillar
โโโ tests/ # Test suite
โโโ scripts/ # Build and utility scripts
โโโ pyproject.toml # Project configuration
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please ensure:
- Tests pass:
pytest - Code is formatted:
black src/ tests/ - Types are checked:
mypy src/xlibrary - Linting passes:
flake8 src/ tests/
Support
- Documentation: GitHub Repository
- Issues: GitHub Issues
- Repository: GitHub
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 xlib_pillars-1.0.0.tar.gz.
File metadata
- Download URL: xlib_pillars-1.0.0.tar.gz
- Upload date:
- Size: 228.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a0f4100520857b9bbef18b2414c53b74131321b63e3225fdb7419758d014946
|
|
| MD5 |
caf2f9d368b803930c9a3ca8e75fbf38
|
|
| BLAKE2b-256 |
68c02ed088e617d24c45a64f34b63d706c5f357a6866a495f1d202007b3c1ba5
|
File details
Details for the file xlib_pillars-1.0.0-py3-none-any.whl.
File metadata
- Download URL: xlib_pillars-1.0.0-py3-none-any.whl
- Upload date:
- Size: 283.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e702689d231e86463d2d267d3addfca698da4e179823eb99305d3ad605df0bd2
|
|
| MD5 |
2aef1d8cb7770ee84147c07a6b6ae345
|
|
| BLAKE2b-256 |
ce6e63bf328295aa0d4a3eae7dbdf0229901e581b0f4079e5b5f57e1302fc7ff
|