semvec/pypi-packages huggingface dataset:
paranoid-zookeeper 2.0.0
Python Paranoid Zookeeper SDK
License: MIT
Requires Python: >=3.6

# Paranoid Zookeeper SDK

## Installation

Install the package using pip:

```bash
pip install paranoid_zookeeper
```

## Usage

### Example

```python
from paranoid_zookeeper import ZookeeperServiceContext, Artifact, HttpHealthCheck, Zookeeper

# Set up the service context
settings = {
    'id': 'my-service',
    'baseEndpoint': 'http://localhost:8080/zookeeper',
    'headers': {
        'Authorization': 'Bearer abc123'
    }
}
context = ZookeeperServiceContext(settings)

# Create the health check and artifact
health_check = HttpHealthCheck(url='/health', port_number=8080)
artifact = Artifact(
    id='artifact-1',
    name='My Service',
    description='A demo microservice',
    id_address='192.168.1.10',
    http_health_check=health_check,
    type='Service',
    depends_on=[],
    tags=['demo', 'microservice']
)

# Register the artifact
zk = Zookeeper(context)
result = zk.check_in(artifact)

if result.success:
    print("Check-in successful")
else:
    print("Check-in failed:", result.serviceResponse)
```

## Requirements

- Python 3.6 or higher
- `requests` library

## License

This project is licensed under the MIT License.