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_core 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/        # 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.2.1.tar.gz (28.5 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.2.1-py3-none-any.whl (36.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pepperpy_core-0.2.1.tar.gz
  • Upload date:
  • Size: 28.5 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.2.1.tar.gz
Algorithm Hash digest
SHA256 61743f823174e72c77b3206c905d3826586ebb7fcf11b736b1b91526363e2629
MD5 1637e4c98db207525b2c3a3454fef73e
BLAKE2b-256 bd9e6fbbb8baa196ba798b8c0f6cbc2886facbcaf462d444e5832251d0f526a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pepperpy_core-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 36.6 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65ff07e987c7de47e76102fa7037d08adf5ab3b9bf3f8e6a3fa86122ca5a432b
MD5 dbfa9d6b7c9e8d6f3151b4029c3dd2de
BLAKE2b-256 7afd703b7d4dc0e707606532ff0c44116d515ed62cc5544656b34ffec68aa916

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