Metadata-Version: 2.1
Name: btrdb-admin
Version: 5.7.1
Summary: Bindings to interact with the Berkeley Tree Database Admin API using gRPC.
Home-page: http://btrdb.io/
Author: Allen Leis
Author-email: allen@pingthings.io
Maintainer: Allen Leis
Maintainer-email: allen@pingthings.io
License: BSD-3-Clause
Download-URL: https://github.com/BTrDB/btrdb-admin-python/tarball/v5.7.1
Project-URL: Documentation, https://btrdb.readthedocs.io/en/latest/
Project-URL: Download, https://github.com/BTrDB/btrdb-admin-python/tarball/v5.7.1
Project-URL: Source, https://github.com/BTrDB/btrdb-admin-python
Project-URL: Tracker, https://github.com/BTrDB/btrdb-admin-python/issues
Keywords: btrdb,berkeley,timeseries,database,bindings,admin,gRPC
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.6, <4
Description-Content-Type: text/markdown
Requires-Dist: PyYAML (==5.1.2)
Requires-Dist: grpcio (==1.16.1)
Requires-Dist: grpcio-tools (==1.16.1)

# 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.


