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
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 blackant_sdk-1.0.2.tar.gz.
File metadata
- Download URL: blackant_sdk-1.0.2.tar.gz
- Upload date:
- Size: 119.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4af6ff0f236fc707994df50c85a9c1645503bacec63d944f696065ddd40c7053
|
|
| MD5 |
c4da6d6ddce165723078a26a71fc18ea
|
|
| BLAKE2b-256 |
799d74e355a0b491e5847f5685bcb63631e1f009bb949f836f69616e35d77693
|
File details
Details for the file blackant_sdk-1.0.2-py3-none-any.whl.
File metadata
- Download URL: blackant_sdk-1.0.2-py3-none-any.whl
- Upload date:
- Size: 84.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f21c70f45199abcd8ee9268faf3e75751ed71ca5199beae0080d81f4c02261e0
|
|
| MD5 |
ae3941ab9657eb5807071825327b8ff8
|
|
| BLAKE2b-256 |
9be85d8378b4f55e884fe56131d42e35e3cc91cea5d371876851f14d4766c272
|