Infrastructure components for HACS (Healthcare Agent Communication Standard) - DI container, configuration, and service management
Project description
HACS Infrastructure
Infrastructure components for HACS (Healthcare Agent Communication Standard) providing dependency injection, configuration management, service discovery, and monitoring capabilities.
Features
- Dependency Injection Container: Type-safe DI with singleton, transient, and scoped lifetimes
- Configuration Management: Environment-based configuration with validation
- Service Registry & Discovery: Service registration, health monitoring, and load balancing
- Event System: Pub/sub event bus with filtering and async handling
- Lifecycle Management: Graceful startup and shutdown orchestration
- Monitoring: Health checks, metrics collection, and performance monitoring
Installation
pip install hacs-infrastructure
Quick Start
from hacs_infrastructure import Container, Injectable, get_config
# Dependency Injection
@Injectable
class DatabaseService:
def __init__(self):
self.connection = "database_connection"
@Injectable
class UserService:
def __init__(self, db: DatabaseService):
self.db = db
container = Container()
container.register(DatabaseService)
container.register(UserService)
user_service = container.get(UserService)
# Configuration
config = get_config()
print(f"Environment: {config.environment}")
print(f"Debug mode: {config.debug}")
License
MIT License - see LICENSE file for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hacs_infrastructure-0.4.0.tar.gz.
File metadata
- Download URL: hacs_infrastructure-0.4.0.tar.gz
- Upload date:
- Size: 62.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
010718ebb94d38049aeaf8ef209ba3a78f7f9c7983e71fba5c0ffd2b387eb7cc
|
|
| MD5 |
a0e4ee76f3afa5bff29f9153f7870ffd
|
|
| BLAKE2b-256 |
79965590c7049aa16bd31f8e7637bdf9efa61e685e56bb343abf658eed5e70c8
|
File details
Details for the file hacs_infrastructure-0.4.0-py3-none-any.whl.
File metadata
- Download URL: hacs_infrastructure-0.4.0-py3-none-any.whl
- Upload date:
- Size: 69.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ad989e9f9bf79954dfe89b9ae48d6fbc50b5578c9fc724fa1b61d456c94d128
|
|
| MD5 |
61cf8aed72b5e19fc9d672d88e21a35c
|
|
| BLAKE2b-256 |
17480ed2fe833631e241efa9b9ffe1b65229a9b065bb3014349dbcb3dce05cf8
|