A python package that works to provide service registration and discovery for http://microhackaton.github.io/2014/
Project description
Python library to interact with other microservices at http://microhackaton.github.io/2014/
Installation
You can get it from https://pypi.python.org/pypi/microhackaton-service-discovery-py
$ pip install microhackaton-service-discovery-py
Usage
from service_discovery import ServiceDiscovery
sd = ServiceDiscovery('/pl/pl/microhackaton', 'zookeeper.microhackathon.pl:2181')
How to register your service?
instance_id = sd.register('something-collector', '12.34.56.78', 8080)
How to find instances of other service?
urls_as_list = sd.get_instances('blog-collector')
How to find random service instance?
url_as_str = sd.get_instances('blog-collector')
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
File details
Details for the file microhackaton-service-discovery-py-0.0.4.tar.gz
.
File metadata
- Download URL: microhackaton-service-discovery-py-0.0.4.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | caf5bcdfd11f899029b8d3ad03eb3dac85f46e8ce99742eab44f64892ce3da9e |
|
MD5 | 31970722e3f2f15807b43ed19644c5a1 |
|
BLAKE2b-256 | 70b792fcff72697580c7ade08412317f9bf2570dca0092197a156af1a7ccbd36 |