Slurpit SDK
The Slurpit SDK is a Python package for interacting with the Slurpit API, enabling developers to easily manage devices and planning resources. It is designed for simplicity and flexibility, offering methods for listing devices, retrieving planning data, and exporting information to CSV format.
Installation
Install the SDK:
pip install slurpit_sdk
To run the examples, install dependencies using Poetry (recommended):
poetry install
Alternatively, use pip:
pip install -r requirements.txt
To build from source:
cd src
python setup.py install
Quick Start
To quickly test the examples, copy .env.example to .env (includes default sandbox credentials):
# From the examples/ folder run:
cp .env.example .env
Working with Devices
Retrieve and print the hostnames of all devices:
devices = api.device.get_devices()
for device in devices:
print(device.hostname)
Exporting Data to CSV
To export planning data to a CSV file:
plannings_csvdata = api.planning.get_plannings(export_csv=True)
result = api.device.save_csv_bytes(plannings_csvdata, "csv/plannings.csv")
Exporting Data as Pandas DataFrame
To export planning data as a pandas dataframe
plannings_df = api.planning.get_plannings(export_df=True)
Pagination
Handle large sets of devices with pagination:
devices = api.device.get_devices(offset=100, limit=1000)
for device in devices:
print(device.hostname)
Release files for slurpit_sdk 0.9.154
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| slurpit_sdk-0.9.154.tar.gz | 34.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| slurpit_sdk-0.9.154-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 92.2 kB
Release files / slurpit_sdk-0.9.154.tar.gz
| Download URL | slurpit_sdk-0.9.154.tar.gz |
|---|---|
| Size | 34.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8a672199b0ff02351896e138aa10e2f4ed4672bfb9b996bf88bd55a88594c24
|
|
BLAKE2b-256 checksum How to use checksums |
f9a6cfba709e27b2f271d74048d6a431ff6b92b49f064fd4c47948692cd2c85d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.14.7 Linux/6.8.0-139-generic
|
Release files / slurpit_sdk-0.9.154-py3-none-any.whl
| Download URL | slurpit_sdk-0.9.154-py3-none-any.whl |
|---|---|
| Size | 58.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9345f228191fe74b7475a3f94d54c463fdd700717d768dd4decb5f3a6274470
|
|
BLAKE2b-256 checksum How to use checksums |
da6084c37cfc631ef27c5473801fd7e9e92342d9b81c995ed10ce15252a0867b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.14.7 Linux/6.8.0-139-generic
|