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 /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 logs POST /requester/logs Displays the logs for a current job/execution
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
DefaultApi api_serverapprover GET /approve Approves a job to be run on this compute node.

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.0.2.tar.gz (62.1 kB view details)

Uploaded Source

Built Distribution

bacalhau_apiclient-1.0.2-py3-none-any.whl (146.6 kB view details)

Uploaded Python 3

File details

Details for the file bacalhau_apiclient-1.0.2.tar.gz.

File metadata

  • Download URL: bacalhau_apiclient-1.0.2.tar.gz
  • Upload date:
  • Size: 62.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for bacalhau_apiclient-1.0.2.tar.gz
Algorithm Hash digest
SHA256 af689cfca827554b8e62850bdd6c1c595ea0aa836f065e2f6aff6380d7ead3e9
MD5 a2b74136b8d9a9fb27b83bbbfa7b3eb6
BLAKE2b-256 fd5c5ec981b0f26f6b1fb6a4ac7638ace948e3f090fb06da98b14d4cf4ea9b63

See more details on using hashes here.

File details

Details for the file bacalhau_apiclient-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for bacalhau_apiclient-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b2bf482f13b42b461566456c615d8772d8943357c398b9ba0fab837bdc0851f9
MD5 2b9e2d4e1a86cd5600487c0b6ca5542c
BLAKE2b-256 04d263bcd5efe40c47c650d16ed22b1f9f3a02102520855e1059b1d44e3b080c

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