Skip to main content

Python Paranoid Zookeeper SDK

Project description

Paranoid Zookeeper SDK

Installation

Install the package using pip:

pip install paranoid_zookeeper

Usage

Example

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.

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

paranoid_zookeeper-1.0.5.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

paranoid_zookeeper-1.0.5-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file paranoid_zookeeper-1.0.5.tar.gz.

File metadata

  • Download URL: paranoid_zookeeper-1.0.5.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.17

File hashes

Hashes for paranoid_zookeeper-1.0.5.tar.gz
Algorithm Hash digest
SHA256 dec01051b1e8850bccce9f4be5cc4976ac253048060d8db974df3938b8f03c79
MD5 749acc1c137dedba5163a55b4db63558
BLAKE2b-256 221b6a68e1a61be52d01238ca0572822e1e3d194f19c12220b6707b7e0496b62

See more details on using hashes here.

File details

Details for the file paranoid_zookeeper-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for paranoid_zookeeper-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d6ab00932268f965e1aa66fc4f6c17d03f21372fdf4ad98e182ba34e2502f721
MD5 0372ebb74c65d3308e3da86b0ee5dd41
BLAKE2b-256 b92f394baeda818059688f50d0a745bb6ced9f74115c25d361461acab4d322c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page