A python package that works to provide service registration and discovery for http://microhackaton.github.io/2014/
Project description
service-discovery-py
====================
Python library to interact with other miocroservices at http://microhackaton.github.io/2014/
Installation
++++++++++++
```bash
$ pip install microhackaton-service-discovery-py
```
Usage
+++++
```python
from service_discovery import ServiceDiscovery
sd = ServiceDiscovery('/pl/pl/microhackaton', 'zookeeper.microhackathon.pl:2181')
```
How to register your service?
-----------------------------
```python
instance_id = sd.register('something-collector', '12.34.56.78', 8080)
```
How to find instances of other service?
---------------------------------------
```python
urls_as_list = sd.get_instances('blog-collector')
```
How to find random service instance?
-------------------------------------
```python
url_as_str = sd.get_instances('blog-collector')
```
====================
Python library to interact with other miocroservices at http://microhackaton.github.io/2014/
Installation
++++++++++++
```bash
$ pip install microhackaton-service-discovery-py
```
Usage
+++++
```python
from service_discovery import ServiceDiscovery
sd = ServiceDiscovery('/pl/pl/microhackaton', 'zookeeper.microhackathon.pl:2181')
```
How to register your service?
-----------------------------
```python
instance_id = sd.register('something-collector', '12.34.56.78', 8080)
```
How to find instances of other service?
---------------------------------------
```python
urls_as_list = sd.get_instances('blog-collector')
```
How to find random service instance?
-------------------------------------
```python
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
Close
Hashes for microhackaton-service-discovery-py-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 129b48d3b5a4843f59e2b60f190eb9505aee21529ab0f46310c424e9d2937092 |
|
MD5 | d0bc8c641afd2fa45fb119a110552520 |
|
BLAKE2b-256 | 8410bf9c17e8084b274ef99af0deb6660ea49fea9df4b33ffa9562dd05c4e24a |