snipepy
Python wrapper for the SnipeIT REST API. SnipeIT Python API.
Installation
python -m pip install snipepy
Pre-release versions
This package is currently in alpha. Pre-release builds are published to TestPyPI and can be installed by pointing pip at the test index:
pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
snipepy
Quick Start
from snipepy import Snipepy
client = Snipepy.from_env()
# Query an asset
asset = client.assets.get(124)
print(asset.name, asset.asset_tag)
# List and filter
assets = client.assets.list(location_id=3, limit=50)
for a in assets.rows:
print(a.asset_tag, a.status_label.name if a.status_label else "")
# Checkout to a user
client.assets.checkout(124, checkout_to_type="user", assigned_user=11)
# Checkout to a location
client.assets.checkout(124, checkout_to_type="location", assigned_location=5)
# Checkin
client.assets.checkin(124, note="Returned after repair")
# Create an asset
new_asset = client.assets.create(
asset_tag="T00000999",
status_id=1,
model_id=3,
name="Office Laptop",
)
# Error handling
from snipepy import SnipepyNotFoundError, SnipepyAuthError, SnipepyValidationError
try:
asset = client.assets.get(999)
except SnipepyNotFoundError:
print("Asset not found")
except SnipepyAuthError:
print("Invalid API token")
except SnipepyValidationError as e:
print(f"Validation failed: {e}")
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
SNIPEPY_URL |
Yes | : | SnipeIT instance URL |
SNIPEPY_API_TOKEN |
Yes | : | API token |
SNIPEPY_TIMEOUT |
No | 30 |
HTTP request timeout (seconds) |
SNIPEPY_VERIFY_SSL |
No | false |
SSL verification (true/false/1/0/yes) |
cp .env.example .env
# Edit .env and fill in SNIPEPY_URL and SNIPEPY_API_TOKEN
Disclaimer
This software is provided as-is without warranty of any kind. The authors are not responsible for any damages or data loss arising from its use. Always test against a non-production SnipeIT instance before relying on this library in critical workflows.
License
Apache 2.0
Metadata
Release files for snipepy 0.1.0
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 | |
|---|---|---|---|---|
| snipepy-0.1.0.tar.gz | 301.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| snipepy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 353.6 kB
Release files / snipepy-0.1.0.tar.gz
| Download URL | snipepy-0.1.0.tar.gz |
|---|---|
| Size | 301.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c37c686dd952b337c8a8f81a6c6bd98cceaf30820417ee00bce0d3982b434e8c
|
|
BLAKE2b-256 checksum How to use checksums |
c2e17f34dd4b80a5018f64c8fe7cde2974fa449c166b99dc6ec699e8602c4280
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 23, 2026.
Transparency logRelease files / snipepy-0.1.0-py3-none-any.whl
| Download URL | snipepy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 52.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
261eeee01c318d1f81029a1c06e9ac4f513fc195e6999a94505ca9f603a809b5
|
|
BLAKE2b-256 checksum How to use checksums |
3fda95b57278f8218c907c89bb9e725283af103b788f078c19ed789558060eee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 23, 2026.
Transparency logSecurity for snipepy 0.1.0
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 snipepy-0.1.0.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 Aug 23, 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.