WASP Eureka
Asynchronous Naive Eureka client for the Netflix OSS/Spring Cloud bundled eureka stack.
Installation
Note: this supports Python 3.5+
$ pip install wasp-eureka
If you want to just run it standalone, include those dependencies:
$ pip install wasp-eureka[standalone]
Usage
The surface area of this module is pretty small, effectively you just need to care about the wasp_eureka.EurekaClient class and its methods:
import asyncio
from wasp_eureka import EurekaClient
# no spaces or underscores, this needs to be url-friendly
app_name = 'test-app'
port = 8080
# This needs to be an IP accessible by anyone that
# may want to discover, connect and/or use your service.
ip = '127.0.0.1'
my_eureka_url = 'https://service-discovery.mycompany.com/eureka'
loop = asyncio.get_event_loop()
eureka = EurekaClient(app_name, port, ip, eureka_url=my_eureka_url,
loop=loop)
async def main():
# Presuming you want your service to be available via eureka
result = await eureka.register()
assert result, 'Unable to register'
# You need to provide a heartbeat to renew the lease,
# otherwise the eureka server will expel the service.
# The default is 90s, so any time <90s is ok
while True:
await asyncio.sleep(67)
await eureka.renew()
loop.run_until_complete(main(loop=loop))
Creating a Release
Bumpversion provides a simplified way to manage versioning, to check the dry run before running it:
$ bumpversion [patch,minor,major] --dry-run --verbose
$ bumpversion patch
Metadata
Release files for wasp-eureka 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wasp-eureka-1.1.1.tar.gz | 7.1 kB | Without provenance | Details for wasp-eureka-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wasp_eureka-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for wasp_eureka-1.1.1-py3-none-any.whl |
Total release size: 18.1 kB
Release files / wasp-eureka-1.1.1.tar.gz
| Download URL | wasp-eureka-1.1.1.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93f9afe536858a876e83e1a769b36730c8246e3bc28c26224ff21a2cef0acfda
|
|
BLAKE2b-256 checksum How to use checksums |
93b921710e72e93970b83d15c7d78a668d453d3e47e25b9f6aee0b87ed0c41bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / wasp_eureka-1.1.1-py3-none-any.whl
| Download URL | wasp_eureka-1.1.1-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b572365feb6a5065ffb07b03a2427c0afdcf2d0dcd3ed1fd708c8b88e11682c8
|
|
BLAKE2b-256 checksum How to use checksums |
f4801ea078334d4cb65e6203b63a5d6f74c924ab651295a177466a71e1a71b3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for wasp-eureka 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.