Sniptide Python SDK
Use Sniptide from Python scripts, command-line tools, and server applications. The official SDK provides access to code snippets, collections, environment variable groups, and account usage through the Sniptide REST API.
The client is synchronous, uses the Python standard library, and has no runtime dependencies. Requires Python 3.9 or later.
Install
python -m pip install sniptide
Connect your account
Create a personal API token in Sniptide Settings with the scopes your application needs. Read operations require read; creating or changing data requires write. Keep tokens out of source control and logs.
import os
from sniptide import SniptideClient
client = SniptideClient(os.environ["SNIPTIDE_TOKEN"])
page = client.list_pastes(limit=20)
created = client.create_paste({
"title": "Hello from the Python SDK",
"files": [{"name": "hello.py", "content": 'print("hello")'}],
})
paste = created["paste"]
Available operations
| Area | Methods |
|---|---|
| Snippets | list_pastes, read_paste, create_paste, update_paste, update_settings, trash_paste |
| Collections | list_collections, create_collection, collection_pastes |
| Environment variables | list_env_groups, read_env_group, write_env_group, delete_env_group |
| Account | me, usage |
Methods return the API's JSON envelopes as Python dictionaries. For example, read_paste returns a dictionary containing paste. list_pastes and collection_pastes return pages with a nextCursor when more results are available.
if page["nextCursor"]:
next_page = client.list_pastes(cursor=page["nextCursor"], limit=20)
write_env_group replaces a group's variables. Environment group reads and writes return values that may contain secrets. Listing groups returns counts without exposing values.
Self-hosted instances
Set base_url to your instance URL. A path prefix is supported.
client = SniptideClient(
os.environ["SNIPTIDE_TOKEN"],
base_url="https://snippets.example.com",
timeout=30,
max_response_bytes=64 * 1024 * 1024,
)
HTTPS is required except on loopback addresses. Redirects are rejected. The default request timeout is 30 seconds. The response-size limit defaults to 64 MiB; max_response_bytes must be a positive integer.
Errors and retries
from sniptide import SniptideError
try:
client.me()
except SniptideError as error:
print(error.status, error.code, error.retry_after)
raise
The SDK does not retry requests automatically. create_paste and create_collection accept an optional idempotency_key argument. Servers with idempotency support use that key to prevent duplicate creates; older instances may ignore it. Other mutations do not gain an automatic retry guarantee.
See the API documentation and source repository for more details.
License
This package is licensed under the MIT License.
Metadata
Release files for sniptide 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sniptide-0.1.1.tar.gz | 6.3 kB | With provenance | Details for sniptide-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sniptide-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for sniptide-0.1.1-py3-none-any.whl |
Total release size: 11.7 kB
Release files / sniptide-0.1.1.tar.gz
| Download URL | sniptide-0.1.1.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21c1bf6858ccb6308e70c6d7e81dfcbe5fc8513920e3f9977091bf9ecfe05c37
|
|
BLAKE2b-256 checksum How to use checksums |
c6fd78e66457066c34278ddcec784a091561ea2ff511d226e1cfe11624b7f541
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / sniptide-0.1.1-py3-none-any.whl
| Download URL | sniptide-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e852d8e130ecfb38516f44b559e56765f40085aaf1ab91c80b0742d1b1d7c626
|
|
BLAKE2b-256 checksum How to use checksums |
5bf348e8f246576f37d93d42eb472d29ff481fe2225bd2c2d09b5fbc887b8458
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logSecurity for sniptide 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for sniptide-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.