Python package to interface with Snip Lab Notebook
Project description
Snip
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:
- Install the package using pip:
pip install snip-python
- Use the
snip
command line interface (CLI) to interact with your lab books. For example, you can use thesnip token
command to store and retrieve your API tokens.
snip token --help
- Create and upload snippets to your lab books programmatically using the Python API.
from snip.snippets import ImageSnip
snip = ImageSnip("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
Built Distribution
File details
Details for the file snip_python-0.1.0.tar.gz
.
File metadata
- Download URL: snip_python-0.1.0.tar.gz
- Upload date:
- Size: 284.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 385a54e5f333504eab93f6f9d9035b6f6368f491aadfce87f06953c2b9bf6017 |
|
MD5 | a3d638815ffc0dc02083a8999eeb4c75 |
|
BLAKE2b-256 | 62e3f525f5fdcb806a7cf1d374558f0d1db2447165dc2b1b13a9d833da9d7a85 |
File details
Details for the file snip_python-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: snip_python-0.1.0-py3-none-any.whl
- Upload date:
- Size: 41.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f44886f78c1a8739a46bc36dd67a2ca36612f6e67cc81a84f82ed2e33e9fc32f |
|
MD5 | 2122034efb3579a5c82c0ed67f687aec |
|
BLAKE2b-256 | d9b40edefb8eec9759bacee3ceba09b9e50554001d1e63fbaa56d7d97a299f60 |