Skip to main content

Bindings to interact with the Berkeley Tree Database Admin API using gRPC.

Project description

btrdb-admin-python

This package contains a quick and dirty Python3 implementation of the BTRDB administrative API.

Note: At the moment only the ACL and Core API calls are available

Note: due to the quick/informal nature of this codebase, the tests ONLY include integration tests that expect to connect to a REAL btrdb server. A dotenv file or ENV config is required to run the tests

Usage

Install the API bindings with pip (using Python 3.6 or later):

$ pip install btrdb-admin

Then, obtain a connection to the database using a valid username and password that is able to use the admin API. Then you can execute admin methods directly off of the object.

from btrdb_admin import connect

db = connect("brtrdb.example.net:4411", username="marmaduke", password="usiB6iUsRLyn")
users = db.get_all_users()

JupyterHub Integration

The btrdb_admin library provides support for JupyterHub authentication using the BTrDB IDP. To use with JupyterHub, simply pip install -U btrdb-admin then in your jupyterhub_config.py add the following line:

c.JupyterHub.authenticator_class = 'btrdb'

Note that you should see a comment above the default position of this configuration that btrdb is one of the installed authenticators for use.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for btrdb-admin, version 5.7.1
Filename, size File type Python version Upload date Hashes
Filename, size btrdb_admin-5.7.1-py3-none-any.whl (47.6 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size btrdb_admin-5.7.1.tar.gz (45.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page