Skip to main content

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.
  • API Wrappers: Wrappers for the Snip API to make requests and handle responses.

Quickstart

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

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.4.0.tar.gz (572.3 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.4.0-py3-none-any.whl (34.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: snip_python-0.4.0.tar.gz
  • Upload date:
  • Size: 572.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for snip_python-0.4.0.tar.gz
Algorithm Hash digest
SHA256 e58a1e322773539087014740014fa244d633e639ed6c5ae77f69606b02d35513
MD5 335a23132fa0ddbcb153220375178024
BLAKE2b-256 9927c579e18107ad88f7502e5af9905bb9ce8400eb6e23c2b41bdd338abf806e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: snip_python-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 34.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for snip_python-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7140c5937d9001d5c5e2a16b8f407397aef3efe5855d53f9b4747c3bfb83e9e8
MD5 0e058515dedf99b7eefbede346752214
BLAKE2b-256 e6592c04fcd86048a44d5e29b4c4e2741fe49be64b93e5fd48aa222cf9a798a4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.0

2 files

0.1.0

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page