Skip to main content

https://github.com/colin-nolan/python-shinobi-client

Project description

Build Status Code Coverage

Shinobi Python Client

A Python client for controlling Shinobi, an open-source video management solution.

About

This package contains an (very incomplete) set of tools for interacting with Shinobi using Python.

This library tries to use the (rather unique) documented API but it also uses undocumented endpoints (which may not be stable).

Installation

Install from PyPi:

pip install shinobi-client

Install with ability to start a Shinobi installation:

pip install shinobi-client[shinobi-controller]

Usage

User ORM

from shinobi_client import ShinobiUserOrm

user_orm = ShinobiUserOrm(host, port, super_user_token)

user = user_orm.get(email)

users = user_orm.get_all()

user = user_orm.create(email, password)

modified = user_orm.modify(email, password=new_password)

deleted = user_orm.delete(email)

Shinobi Controller

Starts/Stops a temporary containerised installation of Shinboi. Written for the purpose of testing but it is installable as an extra.

from shinobi_client import start_shinobi

with start_shinobi() as shinobi:
    print(shinobi.url)
    # Do things with a temporary Shinobi installation

or

from shinobi_client import ShinobiController

controller = ShinobiController()
shinobi = controller.start()
print(shinobi.url)
# Do things with a temporary Shinobi installation
controller.stop()

Development

Install with dev-dependencies:

poetry install --no-root --extras "shinobi-controller"

Run tests with:

python -m unittest discover -v -s shinobi/tests

Legal

AGPL v3.0. Copyright 2020 Colin Nolan.

I am not affiliated to the development of Shinobi project in any way. This work is in no way related to the company that I work for.

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

shinobi-client-0.1.1.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

shinobi_client-0.1.1-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file shinobi-client-0.1.1.tar.gz.

File metadata

  • Download URL: shinobi-client-0.1.1.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.2 Darwin/19.3.0

File hashes

Hashes for shinobi-client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0e9ddd890b50720dad36d92d93b30602b8d5fbd24c9d40e30e6c6a54991b8605
MD5 80f5b79f166149150b72df1337a3d517
BLAKE2b-256 ff037dc72a0acdd84e9d7e797ab4b138b044e80b3e6109440189dfaaf5a1ee7a

See more details on using hashes here.

File details

Details for the file shinobi_client-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: shinobi_client-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.2 Darwin/19.3.0

File hashes

Hashes for shinobi_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 70380a671a56b6b0d1914923c04ac05e8c8049385caacd2baa7a75eae808ab8a
MD5 ad518d0e8599c70ad57ee95ec44b7edd
BLAKE2b-256 af6df8f7dccac5f029acfe1b9e6eb5fb99c4f3a3e06dde3bf7f0c1397089095a

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