Skip to main content

A Python client for the Bacalhau public API - https://github.com/bacalhau-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/bacalhau-project/bacalhau.

This Python package is automatically generated by the Swagger Codegen project:

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)

# 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.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 /api/v1/compute/debug Returns debug information on what the current node is doing.
HealthApi debug GET /api/v1/requester/debug Returns debug information on what the current node is doing.
JobApi cancel POST /api/v1/requester/cancel Cancels the job with the job-id specified in the body payload.
JobApi events POST /api/v1/requester/events Returns the events related to the job-id passed in the body payload. Useful for troubleshooting.
JobApi list POST /api/v1/requester/list Simply lists jobs.
JobApi logs POST /api/v1/requester/logs Displays the logs for a current job/execution
JobApi results POST /api/v1/requester/results Returns the results of the job-id specified in the body payload.
JobApi states POST /api/v1/requester/states Returns the state of the job-id specified in the body payload.
JobApi submit POST /api/v1/requester/submit Submits a new job to the network.
MiscApi api_serverversion POST /api/v1/version Returns the build version running on the server.
OpsApi agentalive GET /api/v1/agent/alive
OpsApi agentnode GET /api/v1/agent/node Returns the info of the node.
OpsApi agentversion GET /api/v1/agent/version Returns the build version running on the server.
UtilsApi healthz GET /api/v1/healthz
UtilsApi id GET /api/v1/id Returns the id of the host node.
UtilsApi livez GET /api/v1/livez
UtilsApi node_info GET /api/v1/node_info Returns the info of the node.
UtilsApi peers GET /api/v1/peers Returns the peers connected to the host via the transport layer.
DefaultApi api_serverapprover GET /api/v1/compute/approve Approves a job to be run on this compute node.
DefaultApi nodes GET /api/v1/requester/nodes Displays the nodes that this requester knows about

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

team@bacalhau.org

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

bacalhau_apiclient-1.1.0.dev0.tar.gz (62.1 kB view details)

Uploaded Source

Built Distribution

bacalhau_apiclient-1.1.0.dev0-py3-none-any.whl (155.2 kB view details)

Uploaded Python 3

File details

Details for the file bacalhau_apiclient-1.1.0.dev0.tar.gz.

File metadata

File hashes

Hashes for bacalhau_apiclient-1.1.0.dev0.tar.gz
Algorithm Hash digest
SHA256 86ac63a09b21ce65c227b841621e9a8b47e94c43623cb682c8ce9c24668f3465
MD5 83a52210d8ab26aa4fab108e4593e34d
BLAKE2b-256 bb0cd48df230016dfc78a5cf8ab02dbd14fb6571b668cf31b0bbd95f3ba3b6c4

See more details on using hashes here.

File details

Details for the file bacalhau_apiclient-1.1.0.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for bacalhau_apiclient-1.1.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 58e8fa5162d2901db91f8c1267daeb8f6f0aaae8197a42a65e629f49c1a9fa2c
MD5 4035035c98b3d958f22a400a44773353
BLAKE2b-256 fca2621c7379bc2da2b0fc71231b7d5a0985b62bcea56cd1861c0eebbafe8589

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page