Skip to main content

Eureka client library for flask

Project description

flask-eureka

Flask Eureka Integration

How to

Install package using:

pip install flask-eureka-client

And then, in your python project:

from flask import Flask
from flask_eureka import Eureka

app = Flask(__name__)

# do 

eureka = Eureka(app)
eureka.register_service(name="my-flask-service")

app.run()

In addition to this, the Eureka defaul blueprint eureka_bp offered by the library must be added to your application:

from flask_eureka.eureka import eureka_bp

app.register_blueprint(eureka_bp)

Open your eureka discovery service, and the application will be shown as my-flask-service.

Configuration

The flask-eureka library integrate with flask's configuration mechanism. The following (environment) variables are used:

  • SERVICE_NAME = Service name is used as the application ID towards Eureka
  • EUREKA_SERVICE_URL= The Eureka service endpoint used for registration
  • EUREKA_SERVICE_PATH = The path of eureka service end point. Default to eureka/apps
  • EUREKA_INSTANCE_HOSTNAME = The hostname used for registration on eureka.
  • EUREKA_HOME_PAGE_URL = The home page url of the app.
  • EUREKA_INSTANCE_PORT = The port number used for the instance
  • EUREKA_HEARTBEAT = Number of seconds used for updating registration status towards Eureka. Default is 90 seconds

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

flask-eureka-client-1.0.2.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

flask_eureka_client-1.0.2-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file flask-eureka-client-1.0.2.tar.gz.

File metadata

  • Download URL: flask-eureka-client-1.0.2.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9

File hashes

Hashes for flask-eureka-client-1.0.2.tar.gz
Algorithm Hash digest
SHA256 5efb8e205c7a35738d9fa12e0132b7d93c169fb1997fa575ffe15ac31dbc691b
MD5 762f5c86bce513b280c6e61e326826a7
BLAKE2b-256 1a43c342a1b703ce0f0829750ac000c0166b0e594f396de067e59842178ef9c4

See more details on using hashes here.

File details

Details for the file flask_eureka_client-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: flask_eureka_client-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9

File hashes

Hashes for flask_eureka_client-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 34e1a47bb723f5e164cc6a38d1d7c9c287c52664d8831a2f2e82f16e55c9307b
MD5 23ed0ebbc1aaacad1ff4ec029e5cf228
BLAKE2b-256 fb4608bc187cfadade29ced6b441af85398e1842664d818d18b7b99ab5ccdac1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page