Skip to main content

Python SDK for Docker operations with automatic authentication through BlackAnt platform

Project description

Python REST API docker template

A simple template to implement REST APIs using Python Flask & docker.

Build arguments

INSTALL_DEBUG_TOOLS

If it's set to True, ptvsd is installed during build to be able to do live debugging.

Environment variables

CALCULATION_NAME

Name of the calculation. Mandatory parameter.

SERVER_PORT

Port which on the server runs. Default: 5000

DEBUG_MODE

A switch to select between debug and release mode. If it is set to True, a Flask server will be started in debug mode and a ptvsd server. Otherwise, it is served using gevent production server. Default: False

OBJECT_STORAGE_URL

Url for the object storage. Mandatory if the code uses object storage.

OBJECT_STORAGE_ACCESS_KEY

Public key for the object storage.

OBJECT_STORAGE_SECRET_KEY

Private key for the object storage.

SCHEDULER_URL

Callback url of the scheduler.

Commands

Build

docker-compose build

Run

docker-compose up

Create task

You can use the tools/send_request.py script to send a simple request to the calculation container.

Debug

If you use Visual Studio Code, there is a debug configuration called Python: Remote Attach which will start a debug session and connect to your running container.

Documentation

Full HTML and PDF documentation can be generated from any revision using the generate_documentation job in the CI. After the job have run successfully, the artifacts are stored for one day. If it's necessary it can be rerun any time.

......

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

blackant_sdk-1.0.3.tar.gz (121.5 kB view details)

Uploaded Source

Built Distribution

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

blackant_sdk-1.0.3-py3-none-any.whl (87.3 kB view details)

Uploaded Python 3

File details

Details for the file blackant_sdk-1.0.3.tar.gz.

File metadata

  • Download URL: blackant_sdk-1.0.3.tar.gz
  • Upload date:
  • Size: 121.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for blackant_sdk-1.0.3.tar.gz
Algorithm Hash digest
SHA256 0ea537bbf6a6e13f5d61eff6d7eef0ac3f721df64dc28fc74e4587603444d383
MD5 4585e11d22f445563cee0ed08bfedae6
BLAKE2b-256 061cbc4bd485011f5f7662ccc36a3cb62d877a6c956baf3ae7370440ecd97be3

See more details on using hashes here.

File details

Details for the file blackant_sdk-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: blackant_sdk-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 87.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for blackant_sdk-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cc3ff9f6412b72a923d3615541e71b9377f285e57d1919d962e079cd1a8b10bc
MD5 c6f15e70eed8092327571c29968aa9c5
BLAKE2b-256 f622b84290dcba33e6d7032109891de356af5f9770672d45bd7aedcc7fc7e0a1

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