Skip to main content

Core package for PepperPy Framework

Project description

PepperPy Core

PepperPy Core is a comprehensive Python utility library designed to accelerate development by providing essential core capabilities. It offers a robust foundation for building scalable, maintainable, and secure Python applications.

Features

  • Task Management: Asynchronous task execution with priority queuing
  • Event System: Flexible event-driven architecture
  • Plugin System: Extensible plugin architecture
  • Security: Built-in security features and validation
  • Logging: Advanced structured logging
  • Configuration: Flexible configuration management
  • I/O Operations: Async-first I/O utilities
  • Network Operations: Robust networking capabilities
  • Resource Management: Efficient resource handling
  • Telemetry: Built-in monitoring capabilities
  • Type Safety: Full type hints support

Installation

pip install pepperpy-core

Or with Poetry (recommended):

poetry add pepperpy-core

Quick Start

from pepperpy import Task, Event, Logger

# Configure logging
logger = Logger("my_app")
logger.info("Starting application")

# Create and execute a task
@Task.register
async def process_data(data: dict) -> dict:
    logger.debug("Processing data", data=data)
    # Process your data
    return processed_data

# Execute the task
result = await process_data.execute({"input": "data"})

# Emit an event
event = Event("data_processed", {"status": "success"})
await event_bus.emit(event)

Core Modules

Task System

Asynchronous task management with features like:

  • Priority-based execution
  • Task cancellation
  • Worker pools
  • Task chaining

Event System

Event-driven architecture supporting:

  • Event emission and handling
  • Priority-based listeners
  • Event metadata
  • Async event processing

Plugin System

Extensible plugin architecture with:

  • Dynamic plugin loading
  • Plugin lifecycle management
  • Plugin configuration
  • Hook system

Security System

Comprehensive security features including:

  • Authentication
  • Input validation
  • Security contexts
  • Validation chains

Logging System

Advanced logging capabilities with:

  • Structured logging
  • Multiple handlers
  • Log levels
  • Context-aware logging

Configuration System

Flexible configuration management with:

  • Hierarchical configuration
  • Configuration validation
  • Environment-based settings
  • Dynamic updates

I/O Operations

Async-first I/O utilities supporting:

  • File operations
  • Multiple formats
  • Streaming
  • Resource management

Network Operations

Robust networking capabilities including:

  • Async TCP/IP communication
  • Connection pooling
  • Retry handling
  • Load balancing

Development

Prerequisites

  • Python 3.12+
  • Poetry for dependency management

Setup

  1. Clone the repository:
git clone https://github.com/felipepimentel/pepperpy-core.git
cd pepperpy-core
  1. Install dependencies:
poetry install
  1. Run tests:
poetry run pytest

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project Structure

pepperpy-core/
├── pepperpy/        # Core package
│   ├── task.py          # Task management
│   ├── event.py         # Event system
│   ├── plugin.py        # Plugin system
│   ├── security.py      # Security features
│   ├── logging.py       # Logging system
│   ├── config.py        # Configuration system
│   ├── io.py           # I/O operations
│   ├── network.py      # Network operations
│   └── ...
├── tests/               # Test suite
├── docs/                # Documentation
│   └── modules/         # Module documentation
├── examples/            # Usage examples
└── scripts/             # Development scripts

Best Practices

  • Use type hints consistently
  • Write comprehensive tests
  • Follow PEP 8 guidelines
  • Document your code
  • Handle errors gracefully

Support

Acknowledgments

  • The Python community
  • All contributors who have helped shape this project
  • Open source projects that have inspired this work

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

pepperpy_core-0.4.0.tar.gz (32.1 kB view details)

Uploaded Source

Built Distribution

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

pepperpy_core-0.4.0-py3-none-any.whl (41.3 kB view details)

Uploaded Python 3

File details

Details for the file pepperpy_core-0.4.0.tar.gz.

File metadata

  • Download URL: pepperpy_core-0.4.0.tar.gz
  • Upload date:
  • Size: 32.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.8 Linux/6.5.0-1025-azure

File hashes

Hashes for pepperpy_core-0.4.0.tar.gz
Algorithm Hash digest
SHA256 071b958eef08aedc0ee3b3cbc1a52acc755a88f1603339e02fb6a1e3b06cf32e
MD5 dbae9e80fa7abe72b37571983482e6fe
BLAKE2b-256 7fd195f123d9e5f933881ec8d8e9ffda12dd65e1a9900c02f70432cb1344db4d

See more details on using hashes here.

File details

Details for the file pepperpy_core-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: pepperpy_core-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 41.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.8 Linux/6.5.0-1025-azure

File hashes

Hashes for pepperpy_core-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c31e44aa63837e7f0f780d09e5a2ff2c3297b60b683b296738344f5167515c3
MD5 fcb4f8d285c594acaa82dc89ce53872f
BLAKE2b-256 a5a48062d34e177911f0562febdc4c10a28c6ac7d14559d45a2fcaf97cca1cf2

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