Skip to main content

Python package to interface with Snip Lab Notebook

Project description

Snip

PyPI - Version Documentation Status

Python Package of quality of life and helper functions to interface with the Snip Lab Book. Allows to create and upload snippets with relative ease. Store and retrieve api tokens, and more.

Features

  • Token management: Store and retrieve api tokens in a secure keyring or in a configuration files.
  • Python API: Python API to create and upload snippets to your lab books.
  • CLI: Command line interface to interact with the Snip API.

Quickstart

Snip-Lab is distributed on PyPI. To use the package:

  1. Install the package using pip:
pip install snip-python
  1. Use the snip command line interface (CLI) to interact with your lab books. For example, you can use the snip token command to store and retrieve your API tokens.
snip token --help
  1. Create and upload snippets to your lab books programmatically using the Python API.
from snip.snippets import ImageSnip

snip = ImageSnip.from_path("path/to/image.png", book_id="[YOUR_BOOK_ID]")

# show a preview of the snippet
snip.preview()

If you need help figuring out where to find the book id, please have a look here.

# upload the snippet
snip.upload()

The upload will automatically search your tokens in the keyring or in the configuration file and use the correct token to upload the snippet.

For more information, visit documentation.

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_python-0.2.0.tar.gz (322.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snip_python-0.2.0-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file snip_python-0.2.0.tar.gz.

File metadata

  • Download URL: snip_python-0.2.0.tar.gz
  • Upload date:
  • Size: 322.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.10

File hashes

Hashes for snip_python-0.2.0.tar.gz
Algorithm Hash digest
SHA256 16c734cd959bc8568214da843e8e8da225ad136ff9f1aac2eeea92a0245eefeb
MD5 3b4927a5839cef7fae27d3a429f6f239
BLAKE2b-256 8ac24a2166a165a3d425a59760702089fbb057f66111c6df48ba326469d78970

See more details on using hashes here.

File details

Details for the file snip_python-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: snip_python-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 30.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.10

File hashes

Hashes for snip_python-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f11934ec2ff51c3171da9dcb364e86a3e50c4a744a1ebd2ef34a0b8b04d99ab4
MD5 03e36a2a1dd35a0c0cdf94fd4353816f
BLAKE2b-256 9f7b2ed09d2d09f275e9defb59699ba2623bc621a3d04af6ef23733519fc8854

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page