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
Release history Release notifications | RSS feed
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.1.tar.gz
(10.1 kB
view details)
Built Distribution
File details
Details for the file flask-eureka-client-1.0.1.tar.gz
.
File metadata
- Download URL: flask-eureka-client-1.0.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | c055334953b5355fcff28457da1cf0bf33803fde9602563fe07e1f5109c34d12 |
|
MD5 | 891b87f8c42f04cf610f85fa768bca33 |
|
BLAKE2b-256 | 91f3cb4c55d0935799482b5060b2bbcb418f15090863a68d55e0f0afe0d092e8 |
File details
Details for the file flask_eureka_client-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: flask_eureka_client-1.0.1-py3-none-any.whl
- Upload date:
- Size: 10.9 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fc080411e59f7cde1fc1ac9f673363ed9a74efb9498d190aaeb8924cb085e25 |
|
MD5 | df1a749c79d27db3effc7372a60771d7 |
|
BLAKE2b-256 | aa75ee4738ca48a1f6eca5cab8341c9976c0440a49f4e41595737dd0a187b9e7 |