oguild


Nameoguild JSON
Version 0.1.12 PyPI version JSON
download
home_pagehttps://github.com/OpsGuild/guildpack
SummaryOGuild utilities — reusable logging and helpers for Python projects
upload_time2025-10-07 08:41:33
maintainerNone
docs_urlNone
authorHordunlarmy
requires_python>=3.9
licenseMIT
keywords utilities oguild helpers python opsguild logging
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <img src="static/images/logo.png" alt="OpsGuild Logo" width="100%">
</div>

                    🚀 Multi-Language Utilities Pack 🚀
                    🐍 Python • 🔷 Node.js • 🦀 Rust • 🐹 Go
                    ☕ Java • 🔵 C# • 🐘 PHP • 🦎 Python
                    📦 Configuration • 🔍 Monitoring • 🛠️ Operations

# OpsGuild Utilities Pack

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
[![Poetry](https://img.shields.io/badge/Poetry-1.0+-blue.svg)](https://python-poetry.org/)

A comprehensive multi-language utilities pack providing essential tools and helper functions for modern software development. Currently featuring Python utilities with plans to expand to multiple programming languages.

## 🚀 What is OpsGuild Pack?

OpsGuild Pack is a collection of utility libraries designed to solve common development challenges across different programming languages and platforms. Think of it as your Swiss Army knife for software development operations.

### Current Components

- **🐍 [Python Logger Package](python/oguild/logs/README.md)** - Enhanced logging, helpers, and utilities
- **🛡️ [Python Response Package](python/oguild/response/README.md)** - Universal response handling and error management
- **🔧 [Python Utils Package](python/oguild/utils/README.md)** - Data processing, encoding, and sanitization utilities
- **🔮 More Coming Soon** - Go, Rust, and other language support planned

## 📦 Installation

### Prerequisites

- Python 3.9 or higher
- Poetry (recommended) or pip

### Using Poetry (Recommended)

```bash
poetry add oguild
```

### Using pip

```bash
pip install oguild
```

## 🎯 Quick Start

### Python Logger

```python
# You can import from either singular or plural forms:
from oguild.logs import logger  # or from oguild.log import logger

# Simple logging
logger.info("Hello, World!")
logger.debug("Debug information")

# The logger automatically detects the module name
# Output: INFO: (your_module_name) == Hello, World! [timestamp]
```

**📖 [Full Python Logger Documentation](python/oguild/logs/README.md)**

### Python Response Handling

```python
# You can import from either singular or plural forms:
from oguild.response import Ok, Error, police  # or from oguild.responses import Ok, Error, police

# Success response
def get_user(user_id: int):
    user = {"id": user_id, "name": "John Doe"}
    return Ok("User retrieved successfully", user, status_code=200)

# Error handling with decorator
@police(default_msg="Failed to process request", default_code=500)
def process_data(data):
    # Your function logic here
    return processed_data
```

**📖 [Full Python Response Documentation](python/oguild/response/README.md)**

### Python Utils

```python
from oguild.utils import encode_json_fields, sanitize_fields

# JSON field processing
data = [{"id": 1, "metadata": {"key": "value"}}]
encoded = await encode_json_fields(data, ["metadata"])

# Data sanitization
clean_data = await sanitize_fields({
    "id": 1, "name": "John", "email": "", "age": None
})
# Result: {"id": 1, "name": "John"} - empty values removed
```

**📖 [Full Python Utils Documentation](python/oguild/utils/README.md)**

## 🔄 Flexible Import Options

OGuild provides flexible import options to accommodate different coding preferences:

### Logger Imports
```python
# Both of these work identically:
from oguild.logs import Logger, logger      # Original plural form
from oguild.log import Logger, logger       # New singular form
```

### Response Imports
```python
# Both of these work identically:
from oguild.response import Ok, Error, police        # Original singular form
from oguild.responses import Ok, Error, police       # New plural form
```

This flexibility ensures that users can import using their preferred naming convention while maintaining full backward compatibility.

## 🤝 Contributing

We welcome contributions across all planned languages! Please follow these steps:

1. Fork the repository
2. Create a 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

### Development Setup

```bash
# Clone and setup
git clone https://github.com/OpsGuild/guildpack.git
cd guildpack

# Install development dependencies
poetry install --with dev

# Run tests
poetry run pytest
```

### Contributing to New Languages

When contributing utilities for new languages:

1. Create a new directory for the language (e.g., `javascript/`, `go/`, `rust/`)
2. Follow the established project structure
3. Include comprehensive tests
4. Create a dedicated README.md for the package
5. Update this main README with links to the new package
6. Ensure consistent API design across languages

## 📄 License

This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.

## 🆘 Support

- **Issues**: [GitHub Issues](https://github.com/OpsGuild/guildpack/issues)
- **Documentation**: [GitHub README](https://github.com/OpsGuild/guildpack#readme)
- **Team**: OpsGuild <Hordunlarmy@gmail.com>

## 🔄 Changelog

### Version 0.2.1

- **🔄 Flexible Import Options** - Added support for both singular and plural import forms
  - `oguild.logs` and `oguild.log` - both work identically for logger imports
  - `oguild.response` and `oguild.responses` - both work identically for response imports
  - Full backward compatibility maintained
  - Enhanced developer experience with preferred naming conventions

### Version 0.2.0

- **🛡️ Response Module** - Universal response handling and error management
  - Framework-agnostic error handling (FastAPI, Django, Flask, Starlette)
  - Smart error classification with specialized handlers
  - Async/sync support with automatic context detection
  - Comprehensive logging and stack trace capture
  - `@police` decorator for automatic error handling
- **🔧 Utils Module** - Data processing and sanitization utilities
  - JSON field encoding/decoding for database operations
  - Advanced data sanitization with customizable rules
  - Pydantic model integration
  - Type-safe async operations
  - Flexible field processors and mapping

### Version 0.1.4

- Initial release with Python logging utilities
- Smart logger with automatic formatting
- Logstash integration support
- Multi-output logging (console, file, logstash)
- Automatic module detection
- Foundation for multi-language utilities pack

## 🌟 Why OpsGuild Pack?

OpsGuild Pack is designed to solve common development challenges across multiple programming languages:

- **Multi-Language Support** - Consistent utilities across different tech stacks
- **Production Ready** - Built with enterprise needs in mind
- **Developer Friendly** - Automatic configuration and intelligent defaults
- **Extensible** - Easy to customize and extend for specific use cases
- **Performance** - Efficient utilities with minimal overhead
- **Standards Compliant** - Follows best practices for each language
- **Unified Experience** - Consistent API design across all supported languages

## 🎯 Use Cases

- **Microservices Architecture** - Consistent logging, error handling, and data processing across services
- **Web API Development** - Universal response handling and error management for any Python framework
- **Data Processing Pipelines** - JSON encoding/decoding and data sanitization for ETL operations
- **Polyglot Teams** - Unified utilities regardless of language choice
- **DevOps & SRE** - Standardized operational tools across infrastructure
- **Enterprise Development** - Consistent patterns for large-scale applications with robust error handling
- **Database Operations** - JSON field processing and data normalization for database interactions
- **Open Source Projects** - Reusable utilities for community projects

---

**Made with ❤️ by the OpsGuild team**

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OpsGuild/guildpack",
    "name": "oguild",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "utilities, oguild, helpers, python, opsguild, logging",
    "author": "Hordunlarmy",
    "author_email": "Hordunlarmy@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/16/13/3357776303fc495c03d4c1e3dd2949189970b3a5370a64363544c0d19607/oguild-0.1.12.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <img src=\"static/images/logo.png\" alt=\"OpsGuild Logo\" width=\"100%\">\n</div>\n\n                    \ud83d\ude80 Multi-Language Utilities Pack \ud83d\ude80\n                    \ud83d\udc0d Python \u2022 \ud83d\udd37 Node.js \u2022 \ud83e\udd80 Rust \u2022 \ud83d\udc39 Go\n                    \u2615 Java \u2022 \ud83d\udd35 C# \u2022 \ud83d\udc18 PHP \u2022 \ud83e\udd8e Python\n                    \ud83d\udce6 Configuration \u2022 \ud83d\udd0d Monitoring \u2022 \ud83d\udee0\ufe0f Operations\n\n# OpsGuild Utilities Pack\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)\n[![Poetry](https://img.shields.io/badge/Poetry-1.0+-blue.svg)](https://python-poetry.org/)\n\nA comprehensive multi-language utilities pack providing essential tools and helper functions for modern software development. Currently featuring Python utilities with plans to expand to multiple programming languages.\n\n## \ud83d\ude80 What is OpsGuild Pack?\n\nOpsGuild Pack is a collection of utility libraries designed to solve common development challenges across different programming languages and platforms. Think of it as your Swiss Army knife for software development operations.\n\n### Current Components\n\n- **\ud83d\udc0d [Python Logger Package](python/oguild/logs/README.md)** - Enhanced logging, helpers, and utilities\n- **\ud83d\udee1\ufe0f [Python Response Package](python/oguild/response/README.md)** - Universal response handling and error management\n- **\ud83d\udd27 [Python Utils Package](python/oguild/utils/README.md)** - Data processing, encoding, and sanitization utilities\n- **\ud83d\udd2e More Coming Soon** - Go, Rust, and other language support planned\n\n## \ud83d\udce6 Installation\n\n### Prerequisites\n\n- Python 3.9 or higher\n- Poetry (recommended) or pip\n\n### Using Poetry (Recommended)\n\n```bash\npoetry add oguild\n```\n\n### Using pip\n\n```bash\npip install oguild\n```\n\n## \ud83c\udfaf Quick Start\n\n### Python Logger\n\n```python\n# You can import from either singular or plural forms:\nfrom oguild.logs import logger  # or from oguild.log import logger\n\n# Simple logging\nlogger.info(\"Hello, World!\")\nlogger.debug(\"Debug information\")\n\n# The logger automatically detects the module name\n# Output: INFO: (your_module_name) == Hello, World! [timestamp]\n```\n\n**\ud83d\udcd6 [Full Python Logger Documentation](python/oguild/logs/README.md)**\n\n### Python Response Handling\n\n```python\n# You can import from either singular or plural forms:\nfrom oguild.response import Ok, Error, police  # or from oguild.responses import Ok, Error, police\n\n# Success response\ndef get_user(user_id: int):\n    user = {\"id\": user_id, \"name\": \"John Doe\"}\n    return Ok(\"User retrieved successfully\", user, status_code=200)\n\n# Error handling with decorator\n@police(default_msg=\"Failed to process request\", default_code=500)\ndef process_data(data):\n    # Your function logic here\n    return processed_data\n```\n\n**\ud83d\udcd6 [Full Python Response Documentation](python/oguild/response/README.md)**\n\n### Python Utils\n\n```python\nfrom oguild.utils import encode_json_fields, sanitize_fields\n\n# JSON field processing\ndata = [{\"id\": 1, \"metadata\": {\"key\": \"value\"}}]\nencoded = await encode_json_fields(data, [\"metadata\"])\n\n# Data sanitization\nclean_data = await sanitize_fields({\n    \"id\": 1, \"name\": \"John\", \"email\": \"\", \"age\": None\n})\n# Result: {\"id\": 1, \"name\": \"John\"} - empty values removed\n```\n\n**\ud83d\udcd6 [Full Python Utils Documentation](python/oguild/utils/README.md)**\n\n## \ud83d\udd04 Flexible Import Options\n\nOGuild provides flexible import options to accommodate different coding preferences:\n\n### Logger Imports\n```python\n# Both of these work identically:\nfrom oguild.logs import Logger, logger      # Original plural form\nfrom oguild.log import Logger, logger       # New singular form\n```\n\n### Response Imports\n```python\n# Both of these work identically:\nfrom oguild.response import Ok, Error, police        # Original singular form\nfrom oguild.responses import Ok, Error, police       # New plural form\n```\n\nThis flexibility ensures that users can import using their preferred naming convention while maintaining full backward compatibility.\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions across all planned languages! Please follow these steps:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### Development Setup\n\n```bash\n# Clone and setup\ngit clone https://github.com/OpsGuild/guildpack.git\ncd guildpack\n\n# Install development dependencies\npoetry install --with dev\n\n# Run tests\npoetry run pytest\n```\n\n### Contributing to New Languages\n\nWhen contributing utilities for new languages:\n\n1. Create a new directory for the language (e.g., `javascript/`, `go/`, `rust/`)\n2. Follow the established project structure\n3. Include comprehensive tests\n4. Create a dedicated README.md for the package\n5. Update this main README with links to the new package\n6. Ensure consistent API design across languages\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.\n\n## \ud83c\udd98 Support\n\n- **Issues**: [GitHub Issues](https://github.com/OpsGuild/guildpack/issues)\n- **Documentation**: [GitHub README](https://github.com/OpsGuild/guildpack#readme)\n- **Team**: OpsGuild <Hordunlarmy@gmail.com>\n\n## \ud83d\udd04 Changelog\n\n### Version 0.2.1\n\n- **\ud83d\udd04 Flexible Import Options** - Added support for both singular and plural import forms\n  - `oguild.logs` and `oguild.log` - both work identically for logger imports\n  - `oguild.response` and `oguild.responses` - both work identically for response imports\n  - Full backward compatibility maintained\n  - Enhanced developer experience with preferred naming conventions\n\n### Version 0.2.0\n\n- **\ud83d\udee1\ufe0f Response Module** - Universal response handling and error management\n  - Framework-agnostic error handling (FastAPI, Django, Flask, Starlette)\n  - Smart error classification with specialized handlers\n  - Async/sync support with automatic context detection\n  - Comprehensive logging and stack trace capture\n  - `@police` decorator for automatic error handling\n- **\ud83d\udd27 Utils Module** - Data processing and sanitization utilities\n  - JSON field encoding/decoding for database operations\n  - Advanced data sanitization with customizable rules\n  - Pydantic model integration\n  - Type-safe async operations\n  - Flexible field processors and mapping\n\n### Version 0.1.4\n\n- Initial release with Python logging utilities\n- Smart logger with automatic formatting\n- Logstash integration support\n- Multi-output logging (console, file, logstash)\n- Automatic module detection\n- Foundation for multi-language utilities pack\n\n## \ud83c\udf1f Why OpsGuild Pack?\n\nOpsGuild Pack is designed to solve common development challenges across multiple programming languages:\n\n- **Multi-Language Support** - Consistent utilities across different tech stacks\n- **Production Ready** - Built with enterprise needs in mind\n- **Developer Friendly** - Automatic configuration and intelligent defaults\n- **Extensible** - Easy to customize and extend for specific use cases\n- **Performance** - Efficient utilities with minimal overhead\n- **Standards Compliant** - Follows best practices for each language\n- **Unified Experience** - Consistent API design across all supported languages\n\n## \ud83c\udfaf Use Cases\n\n- **Microservices Architecture** - Consistent logging, error handling, and data processing across services\n- **Web API Development** - Universal response handling and error management for any Python framework\n- **Data Processing Pipelines** - JSON encoding/decoding and data sanitization for ETL operations\n- **Polyglot Teams** - Unified utilities regardless of language choice\n- **DevOps & SRE** - Standardized operational tools across infrastructure\n- **Enterprise Development** - Consistent patterns for large-scale applications with robust error handling\n- **Database Operations** - JSON field processing and data normalization for database interactions\n- **Open Source Projects** - Reusable utilities for community projects\n\n---\n\n**Made with \u2764\ufe0f by the OpsGuild team**\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "OGuild utilities \u2014 reusable logging and helpers for Python projects",
    "version": "0.1.12",
    "project_urls": {
        "Documentation": "https://github.com/OpsGuild/guildpack#readme",
        "Homepage": "https://github.com/OpsGuild/guildpack",
        "Repository": "https://github.com/OpsGuild/guildpack"
    },
    "split_keywords": [
        "utilities",
        " oguild",
        " helpers",
        " python",
        " opsguild",
        " logging"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b2c871f77cebfab60beabd147356ae1907e5fd3d102f95905482f12388daba60",
                "md5": "2a646b77dedd6f197d13c6be706130e8",
                "sha256": "38c99e8e413e292d4d9c94af26f9d0891acb85cd381ebbc7488cd34b5adf20b3"
            },
            "downloads": -1,
            "filename": "oguild-0.1.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2a646b77dedd6f197d13c6be706130e8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 52618,
            "upload_time": "2025-10-07T08:41:32",
            "upload_time_iso_8601": "2025-10-07T08:41:32.050250Z",
            "url": "https://files.pythonhosted.org/packages/b2/c8/71f77cebfab60beabd147356ae1907e5fd3d102f95905482f12388daba60/oguild-0.1.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16133357776303fc495c03d4c1e3dd2949189970b3a5370a64363544c0d19607",
                "md5": "89ffef1c7ed7afd61881422cc0a5f079",
                "sha256": "c40825f41a6a253e34f749f9028a6e5332bb10c7317cce67b23471f46737686d"
            },
            "downloads": -1,
            "filename": "oguild-0.1.12.tar.gz",
            "has_sig": false,
            "md5_digest": "89ffef1c7ed7afd61881422cc0a5f079",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 44882,
            "upload_time": "2025-10-07T08:41:33",
            "upload_time_iso_8601": "2025-10-07T08:41:33.319157Z",
            "url": "https://files.pythonhosted.org/packages/16/13/3357776303fc495c03d4c1e3dd2949189970b3a5370a64363544c0d19607/oguild-0.1.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-07 08:41:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OpsGuild",
    "github_project": "guildpack",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "oguild"
}
        
Elapsed time: 1.42184s