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.0.tar.gz (36.0 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.0-py3-none-any.whl (45.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pepperpy_core-0.5.0.tar.gz
  • Upload date:
  • Size: 36.0 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.0.tar.gz
Algorithm Hash digest
SHA256 cc2c5a6c22d9aa264fedb1f350b7529d20adbded7bd80d6185f17d850a282fc9
MD5 22fdea2fb05407f963c6ecebe4c407d8
BLAKE2b-256 496a0eeeb4c67eb85b4c467ac8de2450d39c5b0dfe9fcd5561f8c7e2d33d3908

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pepperpy_core-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 45.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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 452ff96cf0332f37f8c2cde8e700614d8fee5d1697e9ba78a46634f922650350
MD5 4ecef443a6408cf11eb06e5fc42831eb
BLAKE2b-256 8df8aa13ea1a977d1de33298809376d6bbb21b5a9bf17035d957100dd6a5a2f0

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