A Python client for the Bacalhau public API - https://github.com/filecoin-project/bacalhau/tree/main/clients/python
Project description
bacalhau_apiclient
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/filecoin-project/bacalhau.
This Python package is automatically generated by the Swagger Codegen project:
- API version: 0.3.18.post3
- Package version: 0.3.18.post3
- Build package: io.swagger.codegen.languages.PythonClientCodegen For more information, please visit https://github.com/filecoin-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 bacalhau_apiclient
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 bacalhau_apiclient
Getting Started
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import bacalhau_apiclient
from bacalhau_apiclient.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = bacalhau_apiclient.HealthApi(bacalhau_apiclient.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)
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 | pkgrequesterdebug | GET /requester/debug | Returns debug information on what the current node is doing. |
JobApi | pkgrequesterevents | POST /requester/events | Returns the events related to the job-id passed in the body payload. Useful for troubleshooting. |
JobApi | pkgrequesterlist | POST /requester/list | Simply lists jobs. |
JobApi | pkgrequesterlocal_events | POST /requester/local_events | Returns the node's local events related to the job-id passed in the body payload. Useful for troubleshooting. |
JobApi | pkgrequesterresults | POST /requester/results | Returns the results of the job-id specified in the body payload. |
JobApi | pkgrequesterstates | POST /requester/states | Returns the state of the job-id specified in the body payload. |
JobApi | pkgrequestersubmit | 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
- BuildVersionInfo
- ComputeNodeInfo
- Deal
- Engine
- EventsRequest
- EventsResponse
- FreeSpace
- HealthInfo
- Job
- JobEvent
- JobEventDeal
- JobEventJobExecutionPlan
- JobEventRunOutput
- JobEventType
- JobExecutionPlan
- JobLocalEvent
- JobLocalEventType
- JobNodeState
- JobRequester
- JobShardState
- JobShardStateState
- JobShardingConfig
- JobSpec
- JobSpecDocker
- JobSpecLanguage
- JobSpecLanguageJobContext
- JobSpecWasm
- JobSpecWasmEntryModule
- JobState
- JobStateType
- JobStatus
- JobStatusJobState
- LabelSelectorRequirement
- LabelSelectorRequirementOperator
- ListRequest
- ListResponse
- LocalEventsRequest
- LocalEventsResponse
- Metadata
- MountStatus
- Network
- NetworkConfig
- NodeInfo
- NodeType
- PeerAddrInfo
- PublishedResult
- Publisher
- ResourceUsageConfig
- ResourceUsageData
- ResultsResponse
- RunCommandResult
- SelectionOperator
- Spec
- SpecDeal
- SpecDocker
- SpecEngine
- SpecExecutionPlan
- SpecNetwork
- SpecPublisher
- SpecResources
- SpecSharding
- StateRequest
- StateResponse
- StorageSourceType
- StorageSpec
- StorageSpecStorageSource
- 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.18.post3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42ad1a13a4df68732d4d4ea5afbc53bc9d9c057230b737f97a517438eebd1770 |
|
MD5 | e795387d9172134ef34e2d93a47feb17 |
|
BLAKE2b-256 | 8f307b03fe699403d3c694d4ab687ba7bdcbe07f02e51172bbcc640f11e78912 |
Hashes for bacalhau_apiclient-0.3.18.post3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56d74514d5b6543c210c31ce641b1baf8ae7db6eab283fbbe60a4e7f27851cf4 |
|
MD5 | 5b8633dc13a5a20158a68cf428a5de53 |
|
BLAKE2b-256 | d2a47f1885742eb4872003bce0689715944d4871e135f9364c2a9df362bb8e11 |