A Python client for the Bacalhau public API - https://github.com/bacalhau-project/bacalhau/tree/main/clients/python
Project description
swagger-client
This page is the reference of the Bacalhau REST API. Project docs are available at https://docs.bacalhau.org/. Find more information about Bacalhau at https://github.com/bacalhau-project/bacalhau.
This Python package is automatically generated by the Swagger Codegen project:
- API version: 0.3.24.post8
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen For more information, please visit https://github.com/bacalhau-project/bacalhau
Requirements.
Python 3.6+
Installation & Usage
pip install
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import swagger_client
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import swagger_client
Getting Started
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.HealthApi(swagger_client.ApiClient(configuration))
try:
# Returns debug information on what the current node is doing.
api_response = api_instance.api_serverdebug()
pprint(api_response)
except ApiException as e:
print("Exception when calling HealthApi->api_serverdebug: %s\n" % e)
# create an instance of the API class
api_instance = swagger_client.HealthApi(swagger_client.ApiClient(configuration))
try:
# Returns debug information on what the current node is doing.
api_response = api_instance.debug()
pprint(api_response)
except ApiException as e:
print("Exception when calling HealthApi->debug: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to http://bootstrap.production.bacalhau.org:1234/
Class | Method | HTTP request | Description |
---|---|---|---|
HealthApi | api_serverdebug | GET /debug | Returns debug information on what the current node is doing. |
HealthApi | debug | GET /requester/debug | Returns debug information on what the current node is doing. |
JobApi | cancel | POST /requester/cancel | Cancels the job with the job-id specified in the body payload. |
JobApi | events | POST /requester/events | Returns the events related to the job-id passed in the body payload. Useful for troubleshooting. |
JobApi | list | POST /requester/list | Simply lists jobs. |
JobApi | results | POST /requester/results | Returns the results of the job-id specified in the body payload. |
JobApi | states | POST /requester/states | Returns the state of the job-id specified in the body payload. |
JobApi | submit | POST /requester/submit | Submits a new job to the network. |
MiscApi | api_serverversion | POST /version | Returns the build version running on the server. |
UtilsApi | healthz | GET /healthz | |
UtilsApi | id | GET /id | Returns the id of the host node. |
UtilsApi | livez | GET /livez | |
UtilsApi | logz | GET /logz | |
UtilsApi | node_info | GET /node_info | Returns the info of the node. |
UtilsApi | peers | GET /peers | Returns the peers connected to the host via the transport layer. |
UtilsApi | readyz | GET /readyz | |
UtilsApi | varz | GET /varz |
Documentation For Models
- AllOfExecutionStateRunOutput
- AllOfExecutionStateState
- AllOfJobSpec
- AllOfJobSpecLanguageJobContext
- AllOfJobSpecWasmEntryModule
- AllOfJobStateState
- AllOfJobWithInfoJob
- AllOfJobWithInfoState
- AllOfLabelSelectorRequirementOperator
- AllOfSpecDeal
- AllOfSpecDocker
- AllOfSpecEngine
- AllOfSpecNetwork
- AllOfSpecPublisher
- AllOfSpecResources
- AllOfStorageSpecStorageSource
- AllOfcancelRequestPayload
- BuildVersionInfo
- CancelRequest
- CancelResponse
- ComputeNodeInfo
- Deal
- Engine
- EventsRequest
- EventsResponse
- ExecutionState
- ExecutionStateType
- FreeSpace
- HealthInfo
- Job
- JobCancelPayload
- JobHistory
- JobHistoryType
- JobRequester
- JobSpecDocker
- JobSpecLanguage
- JobSpecWasm
- JobState
- JobStateType
- JobWithInfo
- LabelSelectorRequirement
- ListRequest
- ListResponse
- Metadata
- MountStatus
- Network
- NetworkConfig
- NodeInfo
- NodeType
- PeerAddrInfo
- PublishedResult
- Publisher
- ResourceUsageConfig
- ResourceUsageData
- ResultsResponse
- RunCommandResult
- SelectionOperator
- Spec
- StateChangeExecutionStateType
- StateChangeJobStateType
- StateRequest
- StateResponse
- StorageSourceType
- StorageSpec
- SubmitRequest
- SubmitResponse
- VerificationResult
- Verifier
- VersionRequest
- VersionResponse
Documentation For Authorization
All endpoints do not require authorization.
Author
Project details
Release history Release notifications | RSS feed
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
Hashes for bacalhau_apiclient-0.3.24.post8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c56fddced0e80b9aca2c607c8d4f3475606f156600f08b03c0b5cb3bbfd3a2e8 |
|
MD5 | ac56ae59c146475430b8a0ca4b87275a |
|
BLAKE2b-256 | 1d174b82cafef70142bc35b3b1ec4e1a5a18338c9c568f44729ec59e8e4c747d |
Hashes for bacalhau_apiclient-0.3.24.post8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cea645300199c3b884c6304988d473943e573f3ff9295855dc74fc5f2e2bae4e |
|
MD5 | f358c5ae69a1dfc5f99a2ea1fd0a4f35 |
|
BLAKE2b-256 | 3acc9563678c0328e01b57693d02334d38dc62919a7ee07c967f74b8335e7dbf |