Skip to main content

A boilerplate utility package

Project description

Happy Core

Python Version MIT License PyPI version Documentation

Happy Core Logo

A comprehensive utility toolkit designed for Python developers seeking clean, efficient, and maintainable solutions.

Documentation | PyPI Package | Issue Tracker


🚀 Quick Start

pip install happy_core
from happy_core.toolkits import simple_debugger
from happy_core.collections import Directory

# Quick example
simple_debugger("Starting application...")
work_dir = Directory("./workspace")

📋 Table of Contents

✨ Features

  • 🛡 Robust Error Handling

    • Comprehensive exception hierarchy
    • Custom exception classes
    • Error recovery mechanisms
  • 📝 Advanced Logging

    • Built on top of loguru
    • Configurable logging strategies
    • Console and file logging support
  • 🔧 Developer Tools

    • Performance profiling
    • Debugging utilities
    • Type checking helpers
    • Retry mechanisms
  • ⚡ High Performance

    • Optimized collections
    • Efficient file operations
    • Smart caching capabilities

📦 Installation

Prerequisites

  • Python 3.7 or higher
  • pip or poetry (recommended)
# Using pip
pip install happy_core

# Using poetry
poetry add happy_core

# From source
git clone https://github.com/alaamer12/happy.git
cd happy_core
pip install -r requirements.txt

📚 Documentation

Comprehensive documentation is available in multiple formats:

🔍 Module Overview

Core Components

# File Operations
from happy_core.collections import File, Directory
workspace = Directory("./workspace")

# Performance Monitoring
from happy_core.toolkits import profile
@profile
def expensive_operation():
    pass

Available Modules

  • collections: File system operations and data structures
  • exceptions: Comprehensive error handling
  • log: Advanced logging capabilities
  • toolkits: Developer utilities and helpers
  • types: Type definitions and validation
  • time: Time manipulation utilities

🚀 Usage Examples

Error Handling

from happy_core.collections import File
import logging

logger = logging.getLogger(__name__)

def read_secure_file(path: str) -> str:
    try:
        file = File(path)
        return file.read_text()
    except FileNotFoundError as e:
        logger.error(f"File not found: {e}")
        return ""

Performance Monitoring

from happy_core.toolkits import monitor

@monitor
def process_data(items: list):
    for item in items:
        # Processing logic here
        pass

🤝 Contributing

We welcome contributions! Here's how you can help:

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

Development Setup

# Clone repository
git clone https://github.com/alaamer12/happy.git
cd happy_core

# Install dependencies with poetry
poetry install

# Run tests
poetry run pytest

📝 License

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


Made with ❤️ by Happy Core Team

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

python_happy_cor-0.1.1.tar.gz (50.4 kB view details)

Uploaded Source

Built Distribution

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

python_happy_cor-0.1.1-py3-none-any.whl (53.6 kB view details)

Uploaded Python 3

File details

Details for the file python_happy_cor-0.1.1.tar.gz.

File metadata

  • Download URL: python_happy_cor-0.1.1.tar.gz
  • Upload date:
  • Size: 50.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.6

File hashes

Hashes for python_happy_cor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f7ccd40efebce6ff28d410e0bd7cfdb9bbd1bac656a7ea24123116d77bb7ec15
MD5 0b236c4006b82dc9e5ba7a931063b44d
BLAKE2b-256 fac35a6252ae8280723f8297052fe91043162c4205c033ae9698f25f1b88bf26

See more details on using hashes here.

File details

Details for the file python_happy_cor-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_happy_cor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6bb3c74acbc26a164ccfd1e4b2474bb8a911e874d3e501fb803ac1ac1e3e414d
MD5 034c82150dc3b16b82646bad4dc8ed93
BLAKE2b-256 d90ee1ed97ce494c49399f1e03dc8ab40e0f4ce36dcef9eda5a2b229801d2f68

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