Skip to main content

Consul Service Finder

I got a problem when I try to simulate multiple service register on Consul server and the client can find one of the services to use the API.

I can use below URL to get all services but that is not what I want.

curl http://localhost:8500/v1/agent/services

Ideas

* Consul Query to search service by service name

* Count the service be used

* Return min count of services by same service name

Example


    csf = ConsulServiceFinder()

    # create query by service name
    csf.createQueryByServiceName("microweb_microtalk", "q_test")

    # find one service and compose it's url
    csf.composeServiceUrl(csf.requestOneServiceByServiceName("microweb_microtalk"))

Metadata

Release files for consulservicefinder 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for consulservicefinder 0.0.4
File Size Uploaded
consulservicefinder-0.0.4.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for consulservicefinder 0.0.4
File Interpreter ABI Platform
consulservicefinder-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / consulservicefinder-0.0.4.tar.gz

Download URL consulservicefinder-0.0.4.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bffaa4bb485e32a6b4bf7695ba7c3c984bdd59549987a59a113eb7e4f9150c0e
BLAKE2b-256 checksum
How to use checksums
b1fcbc8ccf232fe2cfacb47e599779dab5cfc8e02726c72eaad9a83ca05e9c9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

Release files / consulservicefinder-0.0.4-py3-none-any.whl

Download URL consulservicefinder-0.0.4-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
268c6109ac0ce007e3e1c772c64b524b04bb98d891393ccd3d75f67a36918dc1
BLAKE2b-256 checksum
How to use checksums
5abb2049a780ee63b8e758a6797cc61e58a144506df76b02ad7d840299cc7230
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page