Metadata-Version: 2.4
Name: blackant-sdk
Version: 1.0.4
Summary: Python SDK for Docker operations with automatic authentication through BlackAnt platform
Author-email: Balázs Milán <milan.balazs@uni-obuda.hu>
Maintainer-email: BlackAnt Development Team <dev@blackant.app>
License: Proprietary - Óbudai Egyetem
Project-URL: Homepage, https://env.blackant.app/systemdevelopers/blackant_sdk
Project-URL: Documentation, https://docs.blackant.app
Project-URL: Repository, https://env.blackant.app/systemdevelopers/blackant_sdk
Project-URL: Bug Tracker, https://env.blackant.app/systemdevelopers/blackant_sdk/-/issues
Keywords: docker,sdk,authentication,blackant,container,orchestration,swarm
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Distributed Computing
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: flask>=2.3.2
Requires-Dist: flask-restful>=0.3.10
Requires-Dist: waitress>=2.1.2
Requires-Dist: minio>=6.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: docker>=4.4.3
Requires-Dist: urllib3<2.0
Requires-Dist: gunicorn>=21.2.0
Requires-Dist: colorama>=0.4.6
Requires-Dist: python-keycloak>=3.0.0
Requires-Dist: PyJWT>=2.8.0
Requires-Dist: click>=8.1.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: pytest-mock>=3.10.0; extra == "dev"
Requires-Dist: sphinx>=5.0.0; extra == "dev"
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest>=7.0.0; extra == "test"
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
Requires-Dist: pytest-mock>=3.10.0; extra == "test"
Provides-Extra: docs
Requires-Dist: sphinx>=5.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"

# 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

```bash
pip install blackant-sdk
```

## Quick Start

### Python API

```python
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)

```bash
# 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

<p align="center">
  <img src="https://nik.uni-obuda.hu/wp-content/uploads/2025/10/NIK_logo_header.png" alt="NIK Logo" width="300"/>
</p>

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 |
| Email | titkarsag@nik.uni-obuda.hu |
| Web | [nik.uni-obuda.hu](https://nik.uni-obuda.hu) |

## Support

For SDK issues and questions, contact the BlackAnt Development Team at dev@blackant.app
