Skip to main content

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:

  1. Tests pass: pytest
  2. Code is formatted: black src/ tests/
  3. Types are checked: mypy src/xlibrary
  4. Linting passes: flake8 src/ tests/

Support

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

xlib_pillars-1.0.0.tar.gz (228.4 kB view details)

Uploaded Source

Built Distribution

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

xlib_pillars-1.0.0-py3-none-any.whl (283.5 kB view details)

Uploaded Python 3

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

Hashes for xlib_pillars-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8a0f4100520857b9bbef18b2414c53b74131321b63e3225fdb7419758d014946
MD5 caf2f9d368b803930c9a3ca8e75fbf38
BLAKE2b-256 68c02ed088e617d24c45a64f34b63d706c5f357a6866a495f1d202007b3c1ba5

See more details on using hashes here.

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

Hashes for xlib_pillars-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e702689d231e86463d2d267d3addfca698da4e179823eb99305d3ad605df0bd2
MD5 2aef1d8cb7770ee84147c07a6b6ae345
BLAKE2b-256 ce6e63bf328295aa0d4a3eae7dbdf0229901e581b0f4079e5b5f57e1302fc7ff

See more details on using hashes here.

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