Skip to main content

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

Metadata

Release files for python-happy-cor 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-happy-cor 0.1.1
File Size Uploaded
python_happy_cor-0.1.1.tar.gz 50.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-happy-cor 0.1.1
File Interpreter ABI Platform
python_happy_cor-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 104.0 kB

Release files / python_happy_cor-0.1.1.tar.gz

Download URL python_happy_cor-0.1.1.tar.gz
Size 50.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f7ccd40efebce6ff28d410e0bd7cfdb9bbd1bac656a7ea24123116d77bb7ec15
BLAKE2b-256 checksum
How to use checksums
fac35a6252ae8280723f8297052fe91043162c4205c033ae9698f25f1b88bf26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.6

Release files / python_happy_cor-0.1.1-py3-none-any.whl

Download URL python_happy_cor-0.1.1-py3-none-any.whl
Size 53.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6bb3c74acbc26a164ccfd1e4b2474bb8a911e874d3e501fb803ac1ac1e3e414d
BLAKE2b-256 checksum
How to use checksums
d90ee1ed97ce494c49399f1e03dc8ab40e0f4ce36dcef9eda5a2b229801d2f68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page