Trustworthy AI Core Flask Wrapper
Project description
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 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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tai_core_flask-0.7.8.tar.gz.
File metadata
- Download URL: tai_core_flask-0.7.8.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eca96a2125d71614d8071872c3af7a3a0f4db3bbcb2c49a67201c141f66802db
|
|
| MD5 |
1a7e1a7cf53354a26e7c9d86f0fccbb5
|
|
| BLAKE2b-256 |
d7c0c3967267e693c7b3466724e3cf1d17ac1b6ca115fc731a213059efa2f308
|
File details
Details for the file tai_core_flask-0.7.8-py3-none-any.whl.
File metadata
- Download URL: tai_core_flask-0.7.8-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8c2dbfbe5a59c622864d9ebe317d8e178177e9451f0208fc91f33a5b746c207
|
|
| MD5 |
52ebe470a5741b7f8116847be48b8f66
|
|
| BLAKE2b-256 |
40fbc4778c11c977f2a453354991bdad9e465243c935046db3533999577af667
|