๐ Multi-Language Utilities Pack ๐
๐ Python โข ๐ท Node.js โข ๐ฆ Rust โข ๐น Go
โ Java โข ๐ต C# โข ๐ PHP โข ๐ฆ Python
๐ฆ Configuration โข ๐ Monitoring โข ๐ ๏ธ Operations
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.
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.
- ๐ Python Logger Package - Enhanced logging, helpers, and utilities
- ๐ก๏ธ Python Response Package - Universal response handling and error management
- ๐ง Python Utils Package - Data processing, encoding, and sanitization utilities
- ๐ฎ More Coming Soon - Go, Rust, and other language support planned
- Python 3.9 or higher
- Poetry (recommended) or pip
poetry add oguildpip install oguild# 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
# 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
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
OGuild provides flexible import options to accommodate different coding preferences:
# Both of these work identically:
from oguild.logs import Logger, logger # Original plural form
from oguild.log import Logger, logger # New singular form# Both of these work identically:
from oguild.response import Ok, Error, police # Original singular form
from oguild.responses import Ok, Error, police # New plural formThis flexibility ensures that users can import using their preferred naming convention while maintaining full backward compatibility.
We welcome contributions across all planned languages! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Clone and setup
git clone https://github.com/OpsGuild/guildpack.git
cd guildpack
# Install development dependencies
poetry install --with dev
# Run tests
poetry run pytestWhen contributing utilities for new languages:
- Create a new directory for the language (e.g.,
javascript/,go/,rust/) - Follow the established project structure
- Include comprehensive tests
- Create a dedicated README.md for the package
- Update this main README with links to the new package
- Ensure consistent API design across languages
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
- Issues: GitHub Issues
- Documentation: GitHub README
- Team: OpsGuild Hordunlarmy@gmail.com
- ๐ Flexible Import Options - Added support for both singular and plural import forms
oguild.logsandoguild.log- both work identically for logger importsoguild.responseandoguild.responses- both work identically for response imports- Full backward compatibility maintained
- Enhanced developer experience with preferred naming conventions
- ๐ก๏ธ 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
@policedecorator 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
- 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
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
- 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
