blackant-sdk 1.0.3__py3-none-any.whl → 1.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- blackant/cli.py +1 -1
- blackant_sdk-1.0.4.dist-info/METADATA +196 -0
- {blackant_sdk-1.0.3.dist-info → blackant_sdk-1.0.4.dist-info}/RECORD +6 -6
- blackant_sdk-1.0.3.dist-info/METADATA +0 -118
- {blackant_sdk-1.0.3.dist-info → blackant_sdk-1.0.4.dist-info}/WHEEL +0 -0
- {blackant_sdk-1.0.3.dist-info → blackant_sdk-1.0.4.dist-info}/entry_points.txt +0 -0
- {blackant_sdk-1.0.3.dist-info → blackant_sdk-1.0.4.dist-info}/top_level.txt +0 -0
blackant/cli.py
CHANGED
|
@@ -61,7 +61,7 @@ def get_client(user: Optional[str] = None, password: Optional[str] = None,
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
@click.group()
|
|
64
|
-
@click.version_option(version="1.0.
|
|
64
|
+
@click.version_option(version="1.0.4", prog_name="blackant")
|
|
65
65
|
def main():
|
|
66
66
|
"""BlackAnt SDK - Command Line Interface
|
|
67
67
|
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: blackant-sdk
|
|
3
|
+
Version: 1.0.4
|
|
4
|
+
Summary: Python SDK for Docker operations with automatic authentication through BlackAnt platform
|
|
5
|
+
Author-email: Balázs Milán <milan.balazs@uni-obuda.hu>
|
|
6
|
+
Maintainer-email: BlackAnt Development Team <dev@blackant.app>
|
|
7
|
+
License: Proprietary - Óbudai Egyetem
|
|
8
|
+
Project-URL: Homepage, https://env.blackant.app/systemdevelopers/blackant_sdk
|
|
9
|
+
Project-URL: Documentation, https://docs.blackant.app
|
|
10
|
+
Project-URL: Repository, https://env.blackant.app/systemdevelopers/blackant_sdk
|
|
11
|
+
Project-URL: Bug Tracker, https://env.blackant.app/systemdevelopers/blackant_sdk/-/issues
|
|
12
|
+
Keywords: docker,sdk,authentication,blackant,container,orchestration,swarm
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
|
+
Classifier: Topic :: System :: Distributed Computing
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Operating System :: OS Independent
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
Requires-Dist: flask>=2.3.2
|
|
24
|
+
Requires-Dist: flask-restful>=0.3.10
|
|
25
|
+
Requires-Dist: waitress>=2.1.2
|
|
26
|
+
Requires-Dist: minio>=6.0.0
|
|
27
|
+
Requires-Dist: requests>=2.31.0
|
|
28
|
+
Requires-Dist: docker>=4.4.3
|
|
29
|
+
Requires-Dist: urllib3<2.0
|
|
30
|
+
Requires-Dist: gunicorn>=21.2.0
|
|
31
|
+
Requires-Dist: colorama>=0.4.6
|
|
32
|
+
Requires-Dist: python-keycloak>=3.0.0
|
|
33
|
+
Requires-Dist: PyJWT>=2.8.0
|
|
34
|
+
Requires-Dist: click>=8.1.0
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-mock>=3.10.0; extra == "dev"
|
|
39
|
+
Requires-Dist: sphinx>=5.0.0; extra == "dev"
|
|
40
|
+
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "dev"
|
|
41
|
+
Provides-Extra: test
|
|
42
|
+
Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
43
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
|
|
44
|
+
Requires-Dist: pytest-mock>=3.10.0; extra == "test"
|
|
45
|
+
Provides-Extra: docs
|
|
46
|
+
Requires-Dist: sphinx>=5.0.0; extra == "docs"
|
|
47
|
+
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
|
|
48
|
+
|
|
49
|
+
# BlackAnt SDK
|
|
50
|
+
|
|
51
|
+
Python SDK for Docker operations with automatic authentication through the BlackAnt platform.
|
|
52
|
+
|
|
53
|
+
## Features
|
|
54
|
+
|
|
55
|
+
- Automatic authentication with BlackAnt platform
|
|
56
|
+
- Build Docker images on remote daemon
|
|
57
|
+
- Push images to private registry
|
|
58
|
+
- Service management (list, status, delete)
|
|
59
|
+
- Both Python API and CLI interface
|
|
60
|
+
|
|
61
|
+
## Installation
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install blackant-sdk
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Quick Start
|
|
68
|
+
|
|
69
|
+
### Python API
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
from blackant import BlackAntClient
|
|
73
|
+
|
|
74
|
+
# Initialize client
|
|
75
|
+
client = BlackAntClient(
|
|
76
|
+
user="your-username",
|
|
77
|
+
password="your-password",
|
|
78
|
+
base_url="https://your-blackant-instance.com"
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
# Authenticate
|
|
82
|
+
if client.authenticate():
|
|
83
|
+
print("Connected to BlackAnt!")
|
|
84
|
+
|
|
85
|
+
# Build and push a service
|
|
86
|
+
result = client.build_service(
|
|
87
|
+
service_name="my-calculation",
|
|
88
|
+
impl_path="./src/calculation/impl",
|
|
89
|
+
tag="v1.0.0",
|
|
90
|
+
push=True
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
print(f"Image: {result['full_image']}")
|
|
94
|
+
|
|
95
|
+
# List services
|
|
96
|
+
services = client.list_services()
|
|
97
|
+
for svc in services:
|
|
98
|
+
print(f" - {svc['name']}: {svc['status']}")
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Command Line Interface (CLI)
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Set credentials via environment variables
|
|
105
|
+
export BLACKANT_USER=your-username
|
|
106
|
+
export BLACKANT_PASSWORD=your-password
|
|
107
|
+
export BLACKANT_URL=https://your-blackant-instance.com
|
|
108
|
+
|
|
109
|
+
# Test connection
|
|
110
|
+
blackant login
|
|
111
|
+
|
|
112
|
+
# Build and push
|
|
113
|
+
blackant build --name my-calculation --path ./src/calculation/impl --tag v1.0.0
|
|
114
|
+
|
|
115
|
+
# List services
|
|
116
|
+
blackant list
|
|
117
|
+
|
|
118
|
+
# Get service status
|
|
119
|
+
blackant status my-calculation
|
|
120
|
+
|
|
121
|
+
# Delete service
|
|
122
|
+
blackant delete my-calculation
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Environment Variables
|
|
126
|
+
|
|
127
|
+
| Variable | Description | Default |
|
|
128
|
+
|----------|-------------|---------|
|
|
129
|
+
| `BLACKANT_USER` | Username for authentication | - |
|
|
130
|
+
| `BLACKANT_PASSWORD` | Password for authentication | - |
|
|
131
|
+
| `BLACKANT_URL` | BlackAnt platform base URL | `https://dev.blackant.app` |
|
|
132
|
+
|
|
133
|
+
## API Reference
|
|
134
|
+
|
|
135
|
+
### BlackAntClient
|
|
136
|
+
|
|
137
|
+
The main client class providing all SDK functionality.
|
|
138
|
+
|
|
139
|
+
#### Methods
|
|
140
|
+
|
|
141
|
+
| Method | Description |
|
|
142
|
+
|--------|-------------|
|
|
143
|
+
| `authenticate()` | Authenticate with BlackAnt platform |
|
|
144
|
+
| `test_connection()` | Test if connection is working |
|
|
145
|
+
| `build_service(...)` | Build Docker image and optionally push |
|
|
146
|
+
| `list_services()` | List all registered services |
|
|
147
|
+
| `get_service(name)` | Get service details |
|
|
148
|
+
| `get_service_status(name)` | Get service status |
|
|
149
|
+
| `delete_service(name)` | Delete a service |
|
|
150
|
+
|
|
151
|
+
### CLI Commands
|
|
152
|
+
|
|
153
|
+
| Command | Description |
|
|
154
|
+
|---------|-------------|
|
|
155
|
+
| `blackant login` | Test connection and authenticate |
|
|
156
|
+
| `blackant build` | Build Docker image and push to registry |
|
|
157
|
+
| `blackant list` | List all registered services |
|
|
158
|
+
| `blackant status <name>` | Get status of a service |
|
|
159
|
+
| `blackant info <name>` | Get detailed service information |
|
|
160
|
+
| `blackant delete <name>` | Delete a service |
|
|
161
|
+
|
|
162
|
+
Use `blackant <command> --help` for detailed options.
|
|
163
|
+
|
|
164
|
+
## Requirements
|
|
165
|
+
|
|
166
|
+
- Python 3.11+
|
|
167
|
+
- Access to a BlackAnt platform instance
|
|
168
|
+
- Valid BlackAnt credentials
|
|
169
|
+
|
|
170
|
+
## License
|
|
171
|
+
|
|
172
|
+
Proprietary - Obuda University, John von Neumann Faculty of Informatics
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## About
|
|
177
|
+
|
|
178
|
+
<p align="center">
|
|
179
|
+
<img src="https://nik.uni-obuda.hu/wp-content/uploads/2025/10/NIK_logo_header.png" alt="NIK Logo" width="300"/>
|
|
180
|
+
</p>
|
|
181
|
+
|
|
182
|
+
This SDK is developed and maintained by the **BlackAnt Development Team** at:
|
|
183
|
+
|
|
184
|
+
**Obuda University - John von Neumann Faculty of Informatics**
|
|
185
|
+
*(Óbudai Egyetem - Neumann János Informatikai Kar)*
|
|
186
|
+
|
|
187
|
+
| | |
|
|
188
|
+
|---|---|
|
|
189
|
+
| Address | 1034 Budapest, Bécsi út 96/B, Hungary |
|
|
190
|
+
| Phone | +36 1 666 5520 |
|
|
191
|
+
| Email | titkarsag@nik.uni-obuda.hu |
|
|
192
|
+
| Web | [nik.uni-obuda.hu](https://nik.uni-obuda.hu) |
|
|
193
|
+
|
|
194
|
+
## Support
|
|
195
|
+
|
|
196
|
+
For SDK issues and questions, contact the BlackAnt Development Team at dev@blackant.app
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
blackant/__init__.py,sha256=THZWaFP_eIFEDVsIQC5HSCY9k2nGeR1TQ3rNhdlScEM,746
|
|
2
|
-
blackant/cli.py,sha256=
|
|
2
|
+
blackant/cli.py,sha256=Ksnh2rGusb1MbDcFpnMgTbePaDG9JIcv1OIquPD4zNc,10284
|
|
3
3
|
blackant/client.py,sha256=dsF-vPDzhv8Bx_OoakP4NC5dnbYRfkB4MHXcIAsIr9I,15180
|
|
4
4
|
blackant/exceptions.py,sha256=6y9FwBlO_ntYmVyJfrhKVUUnAHaA0wkyJx2WtddU1Ts,2845
|
|
5
5
|
blackant/auth/__init__.py,sha256=Ax1FqQsZNucr4CEUCqeZkrnbWN8Fx72IHFg3PZzbd2A,289
|
|
@@ -65,8 +65,8 @@ task/states/ready.py,sha256=kMpC6qY_IGkLc1JpaH_jf_NcZgC4vyLzoEZhYMDOwZA,1967
|
|
|
65
65
|
task/states/running.py,sha256=HVkkZlC7xOV5M3NnJAf4SWyVE5JqT2LhZokIbRyskbQ,773
|
|
66
66
|
task/states/set_up.py,sha256=NsoEGKVL_E3hQFIm3p3Bv6uC7J0DOPzTc8UZrMEVR1g,1634
|
|
67
67
|
task/states/tear_down.py,sha256=xq6xSC2Q_Yuky047kRP4fSwM992PILIOYBZbOl1RIDA,1050
|
|
68
|
-
blackant_sdk-1.0.
|
|
69
|
-
blackant_sdk-1.0.
|
|
70
|
-
blackant_sdk-1.0.
|
|
71
|
-
blackant_sdk-1.0.
|
|
72
|
-
blackant_sdk-1.0.
|
|
68
|
+
blackant_sdk-1.0.4.dist-info/METADATA,sha256=bRKLI5GYD4a2inCI8Xs9OPtQ0nkHaOSMQIRt335CWJQ,5723
|
|
69
|
+
blackant_sdk-1.0.4.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
70
|
+
blackant_sdk-1.0.4.dist-info/entry_points.txt,sha256=_0tArMbYqVL7laiHsKiwsfx2Lh-QyD24xHrRMLpg0ig,47
|
|
71
|
+
blackant_sdk-1.0.4.dist-info/top_level.txt,sha256=MZZ_UBTnah0fs9yzTmlavd4Z0HuJDD3alhfGlB79ZIE,48
|
|
72
|
+
blackant_sdk-1.0.4.dist-info/RECORD,,
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: blackant-sdk
|
|
3
|
-
Version: 1.0.3
|
|
4
|
-
Summary: Python SDK for Docker operations with automatic authentication through BlackAnt platform
|
|
5
|
-
Author-email: Balázs Milán <milan.balazs@uni-obuda.hu>
|
|
6
|
-
Maintainer-email: BlackAnt Development Team <dev@blackant.app>
|
|
7
|
-
License: Proprietary - Óbudai Egyetem
|
|
8
|
-
Project-URL: Homepage, https://env.blackant.app/systemdevelopers/blackant_sdk
|
|
9
|
-
Project-URL: Documentation, https://docs.blackant.app
|
|
10
|
-
Project-URL: Repository, https://env.blackant.app/systemdevelopers/blackant_sdk
|
|
11
|
-
Project-URL: Bug Tracker, https://env.blackant.app/systemdevelopers/blackant_sdk/-/issues
|
|
12
|
-
Keywords: docker,sdk,authentication,blackant,container,orchestration,swarm
|
|
13
|
-
Classifier: Development Status :: 4 - Beta
|
|
14
|
-
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
|
-
Classifier: Topic :: System :: Distributed Computing
|
|
17
|
-
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
-
Classifier: Operating System :: OS Independent
|
|
21
|
-
Requires-Python: >=3.11
|
|
22
|
-
Description-Content-Type: text/markdown
|
|
23
|
-
Requires-Dist: flask>=2.3.2
|
|
24
|
-
Requires-Dist: flask-restful>=0.3.10
|
|
25
|
-
Requires-Dist: waitress>=2.1.2
|
|
26
|
-
Requires-Dist: minio>=6.0.0
|
|
27
|
-
Requires-Dist: requests>=2.31.0
|
|
28
|
-
Requires-Dist: docker>=4.4.3
|
|
29
|
-
Requires-Dist: urllib3<2.0
|
|
30
|
-
Requires-Dist: gunicorn>=21.2.0
|
|
31
|
-
Requires-Dist: colorama>=0.4.6
|
|
32
|
-
Requires-Dist: python-keycloak>=3.0.0
|
|
33
|
-
Requires-Dist: PyJWT>=2.8.0
|
|
34
|
-
Requires-Dist: click>=8.1.0
|
|
35
|
-
Provides-Extra: dev
|
|
36
|
-
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
37
|
-
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
38
|
-
Requires-Dist: pytest-mock>=3.10.0; extra == "dev"
|
|
39
|
-
Requires-Dist: sphinx>=5.0.0; extra == "dev"
|
|
40
|
-
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "dev"
|
|
41
|
-
Provides-Extra: test
|
|
42
|
-
Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
43
|
-
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
|
|
44
|
-
Requires-Dist: pytest-mock>=3.10.0; extra == "test"
|
|
45
|
-
Provides-Extra: docs
|
|
46
|
-
Requires-Dist: sphinx>=5.0.0; extra == "docs"
|
|
47
|
-
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
|
|
48
|
-
|
|
49
|
-
# Python REST API docker template
|
|
50
|
-
|
|
51
|
-
A simple template to implement REST APIs using Python Flask & docker.
|
|
52
|
-
|
|
53
|
-
## Build arguments
|
|
54
|
-
|
|
55
|
-
### INSTALL_DEBUG_TOOLS
|
|
56
|
-
|
|
57
|
-
If it's set to True, ptvsd is installed during build to be able to do live debugging.
|
|
58
|
-
|
|
59
|
-
## Environment variables
|
|
60
|
-
|
|
61
|
-
### CALCULATION_NAME
|
|
62
|
-
|
|
63
|
-
Name of the calculation. Mandatory parameter.
|
|
64
|
-
|
|
65
|
-
### SERVER_PORT
|
|
66
|
-
|
|
67
|
-
Port which on the server runs. Default: 5000
|
|
68
|
-
|
|
69
|
-
### DEBUG_MODE
|
|
70
|
-
|
|
71
|
-
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
|
|
72
|
-
|
|
73
|
-
### OBJECT_STORAGE_URL
|
|
74
|
-
|
|
75
|
-
Url for the object storage. Mandatory if the code uses object storage.
|
|
76
|
-
|
|
77
|
-
### OBJECT_STORAGE_ACCESS_KEY
|
|
78
|
-
|
|
79
|
-
Public key for the object storage.
|
|
80
|
-
|
|
81
|
-
### OBJECT_STORAGE_SECRET_KEY
|
|
82
|
-
|
|
83
|
-
Private key for the object storage.
|
|
84
|
-
|
|
85
|
-
### SCHEDULER_URL
|
|
86
|
-
|
|
87
|
-
Callback url of the scheduler.
|
|
88
|
-
|
|
89
|
-
## Commands
|
|
90
|
-
|
|
91
|
-
### Build
|
|
92
|
-
|
|
93
|
-
```sh
|
|
94
|
-
docker-compose build
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Run
|
|
98
|
-
|
|
99
|
-
```sh
|
|
100
|
-
docker-compose up
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Create task
|
|
104
|
-
|
|
105
|
-
You can use the tools/send_request.py script to send a simple request to the calculation container.
|
|
106
|
-
|
|
107
|
-
### Debug
|
|
108
|
-
|
|
109
|
-
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.
|
|
110
|
-
|
|
111
|
-
## Documentation
|
|
112
|
-
|
|
113
|
-
Full HTML and PDF documentation can be generated from any revision using the generate_documentation job in the CI.
|
|
114
|
-
After the job have run successfully, the artifacts are stored for one day.
|
|
115
|
-
If it's necessary it can be rerun any time.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
......
|
|
File without changes
|
|
File without changes
|
|
File without changes
|