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.5.2.tar.gz (22.6 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.5.2-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pepperpy_core-0.5.2.tar.gz
  • Upload date:
  • Size: 22.6 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.5.2.tar.gz
Algorithm Hash digest
SHA256 d3faca6e912902e922ef5de30580da0f12ea38fa8e55eb1b4ec630668d628a2e
MD5 b7c73f7ae6638fdec0e79ce20e3e6abe
BLAKE2b-256 e7b04ef69dd42d4994b71b8670ae512edf025a5f543ef63307f35841defcf53a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pepperpy_core-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 31.9 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.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 37ed962ece2a346b80afe1b241e6177327564a256b0e4896d633403f04d07ad7
MD5 037bd3ff5cf993976320cf61dcdc3948
BLAKE2b-256 2ff447d7ee9674dbe1104b61ffeaeef75a4302d7b17a1a8bbd158d88ee578728

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