Python SDK for Docker operations with automatic authentication through BlackAnt platform
Project description
BlackAnt SDK
Python SDK for Docker operations with automatic authentication through the BlackAnt platform.
Features
- Automatic authentication with BlackAnt platform
- Build Docker images on remote daemon
- Push images to private registry
- Service management (list, status, delete)
- Both Python API and CLI interface
Installation
pip install blackant-sdk
Quick Start
Python API
from blackant import BlackAntClient
# Initialize client
client = BlackAntClient(
user="your-username",
password="your-password",
base_url="https://your-blackant-instance.com"
)
# Authenticate
if client.authenticate():
print("Connected to BlackAnt!")
# Build and push a service
result = client.build_service(
service_name="my-calculation",
impl_path="./src/calculation/impl",
tag="v1.0.0",
push=True
)
print(f"Image: {result['full_image']}")
# List services
services = client.list_services()
for svc in services:
print(f" - {svc['name']}: {svc['status']}")
Command Line Interface (CLI)
# Set credentials via environment variables
export BLACKANT_USER=your-username
export BLACKANT_PASSWORD=your-password
export BLACKANT_URL=https://your-blackant-instance.com
# Test connection
blackant login
# Build and push
blackant build --name my-calculation --path ./src/calculation/impl --tag v1.0.0
# List services
blackant list
# Get service status
blackant status my-calculation
# Delete service
blackant delete my-calculation
Environment Variables
| Variable | Description | Default |
|---|---|---|
BLACKANT_USER |
Username for authentication | - |
BLACKANT_PASSWORD |
Password for authentication | - |
BLACKANT_URL |
BlackAnt platform base URL | https://dev.blackant.app |
API Reference
BlackAntClient
The main client class providing all SDK functionality.
Methods
| Method | Description |
|---|---|
authenticate() |
Authenticate with BlackAnt platform |
test_connection() |
Test if connection is working |
build_service(...) |
Build Docker image and optionally push |
list_services() |
List all registered services |
get_service(name) |
Get service details |
get_service_status(name) |
Get service status |
delete_service(name) |
Delete a service |
CLI Commands
| Command | Description |
|---|---|
blackant login |
Test connection and authenticate |
blackant build |
Build Docker image and push to registry |
blackant list |
List all registered services |
blackant status <name> |
Get status of a service |
blackant info <name> |
Get detailed service information |
blackant delete <name> |
Delete a service |
Use blackant <command> --help for detailed options.
Requirements
- Python 3.11+
- Access to a BlackAnt platform instance
- Valid BlackAnt credentials
License
Proprietary - Obuda University, John von Neumann Faculty of Informatics
About
This SDK is developed and maintained by the BlackAnt Development Team at:
Obuda University - John von Neumann Faculty of Informatics (Óbudai Egyetem - Neumann János Informatikai Kar)
| Address | 1034 Budapest, Bécsi út 96/B, Hungary |
| Phone | +36 1 666 5520 |
| titkarsag@nik.uni-obuda.hu | |
| Web | nik.uni-obuda.hu |
Support
For SDK issues and questions, contact the BlackAnt Development Team at dev@blackant.app
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.4.tar.gz.
File metadata
- Download URL: blackant_sdk-1.0.4.tar.gz
- Upload date:
- Size: 122.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc004832a40cd2262986adff178ef889429033e7a52a4765b2a0eeb2cedc9a63
|
|
| MD5 |
2a46819b1fd4621988a1d73dcb400de5
|
|
| BLAKE2b-256 |
f8ae6696e7ea159fc690dd9a21a126e6b6448733a3502b955b2257510e7b4bb4
|
File details
Details for the file blackant_sdk-1.0.4-py3-none-any.whl.
File metadata
- Download URL: blackant_sdk-1.0.4-py3-none-any.whl
- Upload date:
- Size: 88.0 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 |
a6a01d7351216ad207988655414e79d5eacc0e017bc8474b441535a1f601796a
|
|
| MD5 |
9e58ac8008969965ded47a264673c8e9
|
|
| BLAKE2b-256 |
d05c7ccaa0f927b40ecead8334bfeef34b9c63595d5c27fcbf864338d23ea2d9
|