A robust Python SDK for slurpit
Project description
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)
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slurpit_sdk-0.9.136.tar.gz.
File metadata
- Download URL: slurpit_sdk-0.9.136.tar.gz
- Upload date:
- Size: 26.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.14.3 Linux/6.8.0-101-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1a5882d0fae071c76fc311ad5481efa20dd2d77a285190212c403c489ee6d3b
|
|
| MD5 |
e0f4ab7c6e451a8707d0acae3096b52b
|
|
| BLAKE2b-256 |
b7aa7601bbe0da3597f2d7f8f7d13f5900791b1fd38c7a59ef24f7c949078b31
|
File details
Details for the file slurpit_sdk-0.9.136-py3-none-any.whl.
File metadata
- Download URL: slurpit_sdk-0.9.136-py3-none-any.whl
- Upload date:
- Size: 44.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.14.3 Linux/6.8.0-101-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3729ee2679245814e3eca88c08ad079b60d14b75e23ccd616ab2bbf79153b1f8
|
|
| MD5 |
6d407d57fcc2e218f9406de4ddc8640d
|
|
| BLAKE2b-256 |
0c2587d8c258975535b32e218042b229181309e5349d24afb814309e4740ce20
|