Skip to main content

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

  1. Increment the version number in setup.py
  2. Activate your virtual environment.
  3. Run the release.sh script.

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

tai_core_flask-0.7.6.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tai_core_flask-0.7.6-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file tai_core_flask-0.7.6.tar.gz.

File metadata

  • Download URL: tai_core_flask-0.7.6.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for tai_core_flask-0.7.6.tar.gz
Algorithm Hash digest
SHA256 8c75f7c4c830a49ce8c330bf4ff46fbaf4f52c07fafd3d9a9878a17ff0153de6
MD5 bc1b5921d046a21edbcbdfad246645d3
BLAKE2b-256 2136adda3802001e3def6a461d4a80fcfa1dd4d871f5f48f60402d954f2261f2

See more details on using hashes here.

File details

Details for the file tai_core_flask-0.7.6-py3-none-any.whl.

File metadata

  • Download URL: tai_core_flask-0.7.6-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

Hashes for tai_core_flask-0.7.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3f5951054162fa360f60c301acdae1d8300ed27cd3a1de4e0a42e60b635fc942
MD5 215fec2087775a18db5154f4c0d2801d
BLAKE2b-256 a6aa6011a0e52b687d3e6ab2138075b7f6de18088a376cd85a6c145e2d4676e6

See more details on using hashes here.

Supported by

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