Skip to main content

Lightweight bob3 client utilities

Project description

bob3 client for python

This is a python client for the bob3 API endpoints. It is lightweight utility to provide easier access to the API endpoints.

Installation

pip install bob3client

Usage

To authenticate against the API you must have a private RSA key file available. This key file is used to sign the JWT token that is used to authenticate against the API.

Authentication works in such a way that you first register app in the workspace and provide permissions to it in bob3. There you will need to provide public key of the RSA key pair that you will use to sign the JWT token. There you also acquire app_id that you will use.

To make easier authentication bob3client provides a function get_auth_token that will do all authentication job for you and return already a token that you can use to authenticate to bob3 API. You will not need to sign JWT token yourself or call POST /auth endpoint.

import bob3client

# Acquire an authorization token
# workspace: the workspace name to authorize against
# app_id: the application id that was created in the workspace (see bob3 documentation)
# private_rsa_key_path: the path to the private RSA key file
# Token will expire in 60 minutes by default, to change this use the expire parameter
token = bob3client.get_auth_token('workspace', 'app_id', 'private_rsa_key_path')

# Now you must provide the token in Authorization header to access the API endpoints
# Example using requests library
import requests
headers = {"Authorization": token}
# Get all projects in the workspace where the app is authorized
response = requests.get(bob3client.BOB3_PROD_URL + 'projects', headers=headers)
print(response.json())

To get API documentation fetch simply bob3client.BOB3_PROD_URL path in your favorite browser.

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

bob3client-0.0.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

bob3client-0.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file bob3client-0.0.1.tar.gz.

File metadata

  • Download URL: bob3client-0.0.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for bob3client-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6e03849673c8e4a797a94012a0a6b8da0de1bf8c2a01caff8d4ce84db9d7fd71
MD5 11e0962fbf59d41b81f3b3b833c90385
BLAKE2b-256 1c66ffec8110307496c0fae6268f3947c747055ab161fce29b95cad6110eee54

See more details on using hashes here.

File details

Details for the file bob3client-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: bob3client-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for bob3client-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 10d375b2d9cc8f56c235ae02d7011234d6c6fc1368d957d179f013965c33fcae
MD5 f93dfb19ca3f4de6c513dba57a10c410
BLAKE2b-256 d1141d968fefa2b5c4ba6ce62e17691ddca6dc29d760fe5f256bf006b774be7a

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