al360_tai_core_flask
Provide environment detection for enabling Flask server without configuring at instantiation. Environments are implemented as classes that will either return None if the environment check fails, or return an object with all the appropriate environment settings if the check passes. The flask service can then use it to build out urls, attach required headers, and render inline visualizations with the correct methods.
Installation
pip install -e .
Usage
from al360_tai_core_flask import FlaskHelper
flask_service = FlaskHelper(ip=<ip-to-listen-on>, port=<port-to-listen-on>)
If ip is not specified then it listens on localhost by default.
If port is not specified then it finds an open port in the range 8704 to 8993
and listens on it.
To register a function to listen on an route:
@flask_service.app.route("/your-api-route/<int:param_name>", methods=["GET", "POST"])
def my_func(param_name):
return something
Release Process
- Increment the version number in
setup.py - Activate your virtual environment.
- Run the
release.shscript.
Metadata
Release files for al360-tai-core-flask 0.7.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| al360_tai_core_flask-0.7.6.tar.gz | 10.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| al360_tai_core_flask-0.7.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.1 kB
Release files / al360_tai_core_flask-0.7.6.tar.gz
| Download URL | al360_tai_core_flask-0.7.6.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4459fad7f409bcbb139c7679a41b029d83cb3c8c5b17602b13fe0a93f1ec41ba
|
|
BLAKE2b-256 checksum How to use checksums |
d3e0844efb6a5484d41b1d9163e439184fee4205da90602775374571542b6b02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.7
|
Release files / al360_tai_core_flask-0.7.6-py3-none-any.whl
| Download URL | al360_tai_core_flask-0.7.6-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
695ccd3fc85eda24dd9bcf0a39938f69fa74a15fc6a1ed3f231255027768b3bb
|
|
BLAKE2b-256 checksum How to use checksums |
94f99b4e04c43b48c43ca9dc6b3596086ff9cd70840e2ab0b5292f9524e8d38e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.7
|