Name | event-bridge-log-shared JSON |
Version |
1.0.4
JSON |
| download |
home_page | None |
Summary | Shared models and utilities for Event Bridge Log Analytics Platform |
upload_time | 2025-08-12 09:40:53 |
maintainer | None |
docs_url | None |
author | cblack2008 |
requires_python | >=3.13 |
license | MIT License
Copyright (c) 2024 Your Name
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
analytics
aws
eventbridge
microservices
shared
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Event Bridge Log Analytics - Shared Package
[](https://badge.fury.io/py/event-bridge-log-shared)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/psf/black)
> **Portfolio Project**: A production-grade shared library demonstrating enterprise-level Python packaging, automated CI/CD, and modern DevOps practices.
## 🎯 **Project Overview**
This package serves as the foundational shared library for a microservices-based Event Bridge Log Analytics Platform. It demonstrates advanced software engineering practices including:
- **Type-safe event modeling** with Pydantic v2
- **Automated release management** with semantic versioning
- **Modern CI/CD pipelines** with GitHub Actions
- **Secure PyPI publishing** using trusted publishers (OIDC)
- **Enterprise-grade code quality** with comprehensive testing and linting
## 🏗️ **Architecture & Design**
### **Event-Driven Architecture**
The package provides standardized event models for a distributed microservices architecture:
```python
from event_bridge_log_shared.models.events.user import UserRegisteredEvent
from event_bridge_log_shared.models.events.ecommerce import OrderCreatedEvent
# Type-safe event creation with automatic validation
user_event = UserRegisteredEvent(
user_id="user123",
email="user@example.com",
username="newuser",
registration_method="email",
terms_accepted=True,
source="user-service"
)
# Events include automatic timestamping, ID generation, and metadata
print(f"Event ID: {user_event.event_id}")
print(f"Timestamp: {user_event.timestamp}")
```
### **Type Safety & Validation**
All events extend `BaseEvent` with built-in features:
- **Automatic UUID generation** for event tracking
- **ISO 8601 timestamps** for precise timing
- **Environment context** (dev/staging/production)
- **Correlation IDs** for distributed tracing
- **Extensible metadata** system
- **AWS EventBridge compatibility**
### **Utility Functions**
Service-agnostic helpers for AWS resource management:
```python
from event_bridge_log_shared.utils import normalize_env, prefix_name, build_role_arn
env = normalize_env("development") # -> "dev"
bus_name = prefix_name(env, "event-bridge-log-bus") # -> "dev-event-bridge-log-bus"
role_arn = build_role_arn("123456789012", "MyExecutionRole")
```
## 🚀 **Technical Highlights**
### **Modern Python Packaging**
- **Python 3.13** with cutting-edge features
- **Hatchling** build backend for optimal package building
- **UV** for ultra-fast dependency management
- **Dynamic versioning** from single source
### **Production-Grade CI/CD**
- **Automated releases** with semantic version bumping
- **GitHub Actions workflows** with job orchestration
- **Repository dispatch** for cross-workflow communication
- **Trusted Publisher** PyPI deployment (no API keys required)
- **Comprehensive testing** with pytest and coverage reporting
### **Code Quality & Security**
- **100% type coverage** with mypy strict mode
- **Black** and **Ruff** for consistent code formatting
- **Pre-commit hooks** for automated quality checks
- **Security scanning** and dependency validation
- **Branch protection** and automated testing
## 📦 **Installation**
```bash
# From PyPI (recommended)
pip install event-bridge-log-shared
# From source (development)
pip install git+https://github.com/cblack2008/event-bridge-log-shared.git
```
## 🔧 **Development**
### **Quick Start**
```bash
git clone https://github.com/cblack2008/event-bridge-log-shared.git
cd event-bridge-log-shared
# One-command developer setup
make dev-setup
```
### **Available Commands**
```bash
make test # Run tests with coverage
make lint # Lint and type check
make format # Auto-format code
make coverage-html # Generate HTML coverage report
make clean # Remove build artifacts
```
### **Release Process**
The project features a fully automated release pipeline:
1. **Trigger Release**: Run "Release" GitHub Action
2. **Automatic PR**: Creates release branch with version bump
3. **Auto-merge**: PR automatically merges after CI passes
4. **Auto-tag**: Creates Git tag and GitHub Release
5. **Auto-deploy**: Publishes to PyPI via trusted publisher
## 🔒 **Security & Best Practices**
- **Zero secrets in code**: All sensitive data via environment variables
- **OIDC authentication**: Modern secure publishing without API keys
- **Input validation**: All data validated with Pydantic models
- **Type safety**: Full type hints prevent runtime errors
- **Dependency scanning**: Automated vulnerability detection
## 🛠️ **Technology Stack**
| Category | Technologies |
|----------|-------------|
| **Language** | Python 3.13 |
| **Packaging** | Hatchling, UV, PyPI |
| **Validation** | Pydantic v2, Type Hints |
| **Testing** | Pytest, Coverage.py, Pre-commit |
| **CI/CD** | GitHub Actions, Trusted Publishers |
| **Code Quality** | Black, Ruff, MyPy |
| **Infrastructure** | AWS EventBridge, IAM, CloudFormation |
## 📊 **Project Metrics**
- **Test Coverage**: 85%+ maintained
- **Type Coverage**: 100% with mypy strict mode
- **Code Quality**: A+ rating with comprehensive linting
- **Automation**: Fully automated release pipeline
- **Documentation**: Complete API and usage documentation
## 🎓 **Learning Outcomes**
This project demonstrates mastery of:
- **Enterprise Python Development** with modern tooling
- **CI/CD Pipeline Design** and workflow orchestration
- **Package Distribution** and dependency management
- **Type System Design** with advanced Pydantic usage
- **DevOps Automation** with GitHub Actions
- **Security Best Practices** in software delivery
## 📋 **Requirements**
- **Python**: 3.13+
- **Dependencies**: See `pyproject.toml` for complete list
- **Development**: UV package manager recommended
## 🤝 **Contributing**
1. Fork the repository
2. Create a feature branch: `git checkout -b feature/amazing-feature`
3. Make your changes and add tests
4. Ensure all checks pass: `make test lint`
5. Commit your changes: `git commit -m 'Add amazing feature'`
6. Push to the branch: `git push origin feature/amazing-feature`
7. Open a Pull Request
## 📄 **License**
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## 🔗 **Related Projects**
- [Event Bridge Log Analytics](https://github.com/cblack2008/event-bridge-log) - Main microservices platform
## 📞 **Contact**
- **Repository**: [GitHub](https://github.com/cblack2008/event-bridge-log-shared)
- **Issues**: [GitHub Issues](https://github.com/cblack2008/event-bridge-log-shared/issues)
- **Author**: cblack2008
---
*This is a portfolio project demonstrating enterprise-level software engineering practices and modern Python development workflows.*
Raw data
{
"_id": null,
"home_page": null,
"name": "event-bridge-log-shared",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.13",
"maintainer_email": null,
"keywords": "analytics, aws, eventbridge, microservices, shared",
"author": "cblack2008",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/ee/d0/cf8ad2f3b176029ad36c10914d27ded8f50c74af4a1c5762d2f910b6f34a/event_bridge_log_shared-1.0.4.tar.gz",
"platform": null,
"description": "# Event Bridge Log Analytics - Shared Package\n\n[](https://badge.fury.io/py/event-bridge-log-shared)\n[](https://www.python.org/downloads/)\n[](https://opensource.org/licenses/MIT)\n[](https://github.com/psf/black)\n\n> **Portfolio Project**: A production-grade shared library demonstrating enterprise-level Python packaging, automated CI/CD, and modern DevOps practices.\n\n## \ud83c\udfaf **Project Overview**\n\nThis package serves as the foundational shared library for a microservices-based Event Bridge Log Analytics Platform. It demonstrates advanced software engineering practices including:\n\n- **Type-safe event modeling** with Pydantic v2\n- **Automated release management** with semantic versioning\n- **Modern CI/CD pipelines** with GitHub Actions\n- **Secure PyPI publishing** using trusted publishers (OIDC)\n- **Enterprise-grade code quality** with comprehensive testing and linting\n\n## \ud83c\udfd7\ufe0f **Architecture & Design**\n\n### **Event-Driven Architecture**\nThe package provides standardized event models for a distributed microservices architecture:\n\n```python\nfrom event_bridge_log_shared.models.events.user import UserRegisteredEvent\nfrom event_bridge_log_shared.models.events.ecommerce import OrderCreatedEvent\n\n# Type-safe event creation with automatic validation\nuser_event = UserRegisteredEvent(\n user_id=\"user123\",\n email=\"user@example.com\",\n username=\"newuser\",\n registration_method=\"email\",\n terms_accepted=True,\n source=\"user-service\"\n)\n\n# Events include automatic timestamping, ID generation, and metadata\nprint(f\"Event ID: {user_event.event_id}\")\nprint(f\"Timestamp: {user_event.timestamp}\")\n```\n\n### **Type Safety & Validation**\nAll events extend `BaseEvent` with built-in features:\n\n- **Automatic UUID generation** for event tracking\n- **ISO 8601 timestamps** for precise timing\n- **Environment context** (dev/staging/production)\n- **Correlation IDs** for distributed tracing\n- **Extensible metadata** system\n- **AWS EventBridge compatibility**\n\n### **Utility Functions**\nService-agnostic helpers for AWS resource management:\n\n```python\nfrom event_bridge_log_shared.utils import normalize_env, prefix_name, build_role_arn\n\nenv = normalize_env(\"development\") # -> \"dev\"\nbus_name = prefix_name(env, \"event-bridge-log-bus\") # -> \"dev-event-bridge-log-bus\"\nrole_arn = build_role_arn(\"123456789012\", \"MyExecutionRole\")\n```\n\n## \ud83d\ude80 **Technical Highlights**\n\n### **Modern Python Packaging**\n- **Python 3.13** with cutting-edge features\n- **Hatchling** build backend for optimal package building\n- **UV** for ultra-fast dependency management\n- **Dynamic versioning** from single source\n\n### **Production-Grade CI/CD**\n- **Automated releases** with semantic version bumping\n- **GitHub Actions workflows** with job orchestration\n- **Repository dispatch** for cross-workflow communication\n- **Trusted Publisher** PyPI deployment (no API keys required)\n- **Comprehensive testing** with pytest and coverage reporting\n\n### **Code Quality & Security**\n- **100% type coverage** with mypy strict mode\n- **Black** and **Ruff** for consistent code formatting\n- **Pre-commit hooks** for automated quality checks\n- **Security scanning** and dependency validation\n- **Branch protection** and automated testing\n\n## \ud83d\udce6 **Installation**\n\n```bash\n# From PyPI (recommended)\npip install event-bridge-log-shared\n\n# From source (development)\npip install git+https://github.com/cblack2008/event-bridge-log-shared.git\n```\n\n## \ud83d\udd27 **Development**\n\n### **Quick Start**\n```bash\ngit clone https://github.com/cblack2008/event-bridge-log-shared.git\ncd event-bridge-log-shared\n\n# One-command developer setup\nmake dev-setup\n```\n\n### **Available Commands**\n```bash\nmake test # Run tests with coverage\nmake lint # Lint and type check\nmake format # Auto-format code\nmake coverage-html # Generate HTML coverage report\nmake clean # Remove build artifacts\n```\n\n### **Release Process**\nThe project features a fully automated release pipeline:\n\n1. **Trigger Release**: Run \"Release\" GitHub Action\n2. **Automatic PR**: Creates release branch with version bump\n3. **Auto-merge**: PR automatically merges after CI passes\n4. **Auto-tag**: Creates Git tag and GitHub Release\n5. **Auto-deploy**: Publishes to PyPI via trusted publisher\n\n## \ud83d\udd12 **Security & Best Practices**\n\n- **Zero secrets in code**: All sensitive data via environment variables\n- **OIDC authentication**: Modern secure publishing without API keys\n- **Input validation**: All data validated with Pydantic models\n- **Type safety**: Full type hints prevent runtime errors\n- **Dependency scanning**: Automated vulnerability detection\n\n## \ud83d\udee0\ufe0f **Technology Stack**\n\n| Category | Technologies |\n|----------|-------------|\n| **Language** | Python 3.13 |\n| **Packaging** | Hatchling, UV, PyPI |\n| **Validation** | Pydantic v2, Type Hints |\n| **Testing** | Pytest, Coverage.py, Pre-commit |\n| **CI/CD** | GitHub Actions, Trusted Publishers |\n| **Code Quality** | Black, Ruff, MyPy |\n| **Infrastructure** | AWS EventBridge, IAM, CloudFormation |\n\n## \ud83d\udcca **Project Metrics**\n\n- **Test Coverage**: 85%+ maintained\n- **Type Coverage**: 100% with mypy strict mode\n- **Code Quality**: A+ rating with comprehensive linting\n- **Automation**: Fully automated release pipeline\n- **Documentation**: Complete API and usage documentation\n\n## \ud83c\udf93 **Learning Outcomes**\n\nThis project demonstrates mastery of:\n\n- **Enterprise Python Development** with modern tooling\n- **CI/CD Pipeline Design** and workflow orchestration\n- **Package Distribution** and dependency management\n- **Type System Design** with advanced Pydantic usage\n- **DevOps Automation** with GitHub Actions\n- **Security Best Practices** in software delivery\n\n## \ud83d\udccb **Requirements**\n\n- **Python**: 3.13+\n- **Dependencies**: See `pyproject.toml` for complete list\n- **Development**: UV package manager recommended\n\n## \ud83e\udd1d **Contributing**\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/amazing-feature`\n3. Make your changes and add tests\n4. Ensure all checks pass: `make test lint`\n5. Commit your changes: `git commit -m 'Add amazing feature'`\n6. Push to the branch: `git push origin feature/amazing-feature`\n7. Open a Pull Request\n\n## \ud83d\udcc4 **License**\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\udd17 **Related Projects**\n\n- [Event Bridge Log Analytics](https://github.com/cblack2008/event-bridge-log) - Main microservices platform\n\n## \ud83d\udcde **Contact**\n\n- **Repository**: [GitHub](https://github.com/cblack2008/event-bridge-log-shared)\n- **Issues**: [GitHub Issues](https://github.com/cblack2008/event-bridge-log-shared/issues)\n- **Author**: cblack2008\n\n---\n\n*This is a portfolio project demonstrating enterprise-level software engineering practices and modern Python development workflows.*\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2024 Your Name\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "Shared models and utilities for Event Bridge Log Analytics Platform",
"version": "1.0.4",
"project_urls": {
"Changelog": "https://github.com/cblack2008/event-bridge-log-shared/blob/main/CHANGELOG.md",
"Documentation": "https://cblack2008.github.io/event-bridge-log-shared",
"Homepage": "https://github.com/cblack2008/event-bridge-log-shared",
"Issues": "https://github.com/cblack2008/event-bridge-log-shared/issues",
"Repository": "https://github.com/cblack2008/event-bridge-log-shared"
},
"split_keywords": [
"analytics",
" aws",
" eventbridge",
" microservices",
" shared"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "3c238983d82a019722e17baf8bba2643e15c4a4360c9c8fef93e32c15b31e946",
"md5": "d3bac4b56175793804fbae4c2447fb8d",
"sha256": "071279517987d027806fa37d54ec66752e0cbcbda3de344b5c28ecc7c3637600"
},
"downloads": -1,
"filename": "event_bridge_log_shared-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d3bac4b56175793804fbae4c2447fb8d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.13",
"size": 21567,
"upload_time": "2025-08-12T09:40:52",
"upload_time_iso_8601": "2025-08-12T09:40:52.450034Z",
"url": "https://files.pythonhosted.org/packages/3c/23/8983d82a019722e17baf8bba2643e15c4a4360c9c8fef93e32c15b31e946/event_bridge_log_shared-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "eed0cf8ad2f3b176029ad36c10914d27ded8f50c74af4a1c5762d2f910b6f34a",
"md5": "13fa92b7523a79bb39be77d228f45b2e",
"sha256": "d00beb94673c57e583a79f54fabe8317dca82396c84bcf2bb72319ed2fe32a07"
},
"downloads": -1,
"filename": "event_bridge_log_shared-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "13fa92b7523a79bb39be77d228f45b2e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.13",
"size": 17961,
"upload_time": "2025-08-12T09:40:53",
"upload_time_iso_8601": "2025-08-12T09:40:53.608879Z",
"url": "https://files.pythonhosted.org/packages/ee/d0/cf8ad2f3b176029ad36c10914d27ded8f50c74af4a1c5762d2f910b6f34a/event_bridge_log_shared-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-12 09:40:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cblack2008",
"github_project": "event-bridge-log-shared",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "event-bridge-log-shared"
}