Skip to main content

Placeholder for the snip package

Project description

Snip

Package to interact with the Snip API. Allows to create and upload snips with relative ease. Store and retrieve api tokens, and more.

Features:

  • Token storage and retrieval in secure keyring

Getting started

Install the package via pip:

pip install snip-lab

Usage

Using the cli you may add, remove and interact with tokens. The tokens are stored in a secure keyring.

snip-lab token --help

Alternatively you may also add an .sniprc file to your home directory or working directory to store the tokens. The file should look like this and should be automatically loaded.

[my_token_name]
book_id = YOUR_BOOK_ID
token =  YOUR_TOKEN

[another_token]
book_id = ANOTHER_BOOK_ID
token =  ANOTHER_TOKEN
deployment = https://snip.roentgen.physik.uni-goettingen.de

You may check if the tokens can be read correctly by trying to list them.

snip-lab token list

Troubleshooting

Problems with keyring

It is possible that a token add command does not work as expected and tokens do not appear in the list if the NULL keyring backend is selected. This can be fixed by setting the keyring backend via the -k or using the env variable PYTHON_KEYRING_BACKEND. For example:

export PYTHON_KEYRING_BACKEND=keyring.backends.chainer.ChainerBackend

Using the -k flag:

snip-lab token add -k keyring.backends.chainer.ChainerBackend

General problems

You may be able to get more information about the problem by setting the log level to debug. For example by setting the verbosity flag.

snip-lab -v token list

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

snip_lab-0.0.2.tar.gz (55.0 kB view hashes)

Uploaded Source

Built Distribution

snip_lab-0.0.2-py3-none-any.whl (21.5 kB view hashes)

Uploaded Python 3

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