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-2.0.0.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-2.0.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: paranoid_zookeeper-2.0.0.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-2.0.0.tar.gz
Algorithm Hash digest
SHA256 9b7cfff81b205e4ab584a360720a4eecebf856ca3299a1c4ec353e9d0a609829
MD5 4e82c5614161fe69dd30103a3a39fced
BLAKE2b-256 f9fdc2ee540da24dcb3bf66a0694e395698d4546364f40731771317d54a6c202

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for paranoid_zookeeper-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5e3b515efc6570bea16f2d38168ebb76d45d0b13f9738b0122c5b415c14b4b3
MD5 3b4dcb8dc7c6bf94202dbfd7a7a3cae6
BLAKE2b-256 a1ec03da33cc99b122c69aab3ae9e836ba6bf97e34581db9dc23715ab38dd715

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