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.3.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.3.1-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pepperpy_core-0.3.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.3.1.tar.gz
Algorithm Hash digest
SHA256 a622048e63865fff3444f85e453569934c3aff11950080ea77647faac3e476fe
MD5 de8d2a9112192c7aff5b0ceb00cedcb0
BLAKE2b-256 d2a99b8fcd7329900fc8ba2a5212cb71e9c3514ce655e86e5cb80a9f69244ff4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pepperpy_core-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 36.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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2dab5ce0d44289ed846032b7409f95966105cd02341e26ffc9d82a0ab5b36338
MD5 f0c6243024629537ffbbf71b8ef6cf9f
BLAKE2b-256 ae6e31a22cb6ee0557008a7076d7741a8be9144c0f06e57609d98b8799dfad3b

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