Onboarding Python enabler for Zowe API Mediation Layer
This is the onboarding Python enabler for Zowe API Mediation Layer (part of Zowe) that allows to register a Python based service to the API Mediation Layer Discovery Service. It uses py-eureka-client.
Installation
Install the package using pip:
pip install zowe-apiml-onboarding-enabler-python
How to use
-
Import the Enabler in Your Python Service. Add the following code block to register your service with Eureka:
Example:
from fastapi import FastAPI from zowe_apiml_onboarding_enabler_python.registration import PythonEnabler app = FastAPI() enabler = PythonEnabler(config_file="service-configuration.yml") @app.on_event("startup") def register_service(): enabler.register()
To make sure that your application will automatically unregister from Eureka once shut down, you can use the
unregister()function, like shown in the example below.@app.on_event("shutdown") def unregister_service(): enabler.unregister()
-
Create a yaml file named
service-configuration.yml, add the configuration properties and place the yaml file inside a/configdirectory at the same level of yourapp.py. Below is an example of the configuration.Example:
eureka: ssl: true host: localhost ipAddress: 127.0.0.1 port: 10011 servicePath: '/eureka' maxRetries: 30 requestRetryDelay: 1000 registryFetchInterval: 5 instance: app: pythonservice scheme: https vipAddress: pythonservice instanceId: localhost:pythonservice:10018 homePageUrl: https://localhost:10018/pythonservice hostName: 'localhost' ipAddr: '127.0.0.1' port: 10018 securePort: 10018 secureVipAddress: pythonservice statusPageUrl: https://localhost:10018/pythonservice/application/info healthCheckUrl: https://localhost:10018/pythonservice/application/health nonSecurePortEnabled': false securePortEnabled: true metadata: apiml.catalog.tile.id: 'cademoapps' apiml.catalog.tile.title: 'Sample Python Hello World' apiml.catalog.tile.description: 'Applications Hello' apiml.routes.api_v1.gatewayUrl: "api/v1" apiml.routes.api_v1.serviceUrl: "/pythonservice" apiml.apiInfo.0.apiId: org.zowe.pythonservice apiml.apiInfo.0.gatewayUrl: "api/v1" apiml.apiInfo.0.swaggerUrl: https://localhost:10018/pythonservice/apidoc apiml.apiInfo.0.version: 1.0.0 apiml.service.title: 'Zowe Sample Python Service' apiml.service.description: 'Sample API services to demonstrate Python Onboarding Enabler' ssl: certificate: ../keystore/localhost/localhost.keystore.cer keystore: ../keystore/localhost/localhost.keystore.key caFile: ../keystore/localhost/localhost.pem keyPassword: password
-
Start your Python service and verify that it registers to the Zowe API Mediation Layer.
Metadata
Release files for zowe-apiml-onboarding-enabler-python 3.2.4
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 |
|---|---|---|---|---|
| zowe_apiml_onboarding_enabler_python-3.2.4.tar.gz | 52.5 kB | Without provenance | Details for zowe_apiml_onboarding_enabler_python-3.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zowe_apiml_onboarding_enabler_python-3.2.4-py3-none-any.whl | Python 3 | none | any | Details for zowe_apiml_onboarding_enabler_python-3.2.4-py3-none-any.whl |
Total release size: 70.1 kB
Release files / zowe_apiml_onboarding_enabler_python-3.2.4.tar.gz
| Download URL | zowe_apiml_onboarding_enabler_python-3.2.4.tar.gz |
|---|---|
| Size | 52.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
afb914f81e89616163d5ea2ca105df25f2096ec36206b0a8184d51fd598ceed9
|
|
BLAKE2b-256 checksum How to use checksums |
227d68a576ab1065a20ebc11fa7c4fa4f8c2d94f52187b9000346bb14fb0ead7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / zowe_apiml_onboarding_enabler_python-3.2.4-py3-none-any.whl
| Download URL | zowe_apiml_onboarding_enabler_python-3.2.4-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
853bd8c9d02e78253239df38c830d92d73309cd54aa7a5d5dd5ccad879558360
|
|
BLAKE2b-256 checksum How to use checksums |
37d5c8d835954980871ca57859acd74977ddf28fedb41e137b72cebf1a114525
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for zowe-apiml-onboarding-enabler-python 3.2.4
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.