Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slurpit_sdk-0.9.133.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slurpit_sdk-0.9.133-py3-none-any.whl (42.3 kB view details)

Uploaded Python 3

File details

Details for the file slurpit_sdk-0.9.133.tar.gz.

File metadata

  • Download URL: slurpit_sdk-0.9.133.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.14.2 Linux/6.8.0-87-generic

File hashes

Hashes for slurpit_sdk-0.9.133.tar.gz
Algorithm Hash digest
SHA256 d482f87e7a90404ba1d3f4f473c06b1de3b1f91014c96d1ef5e8826353d42ecf
MD5 0f2eab0a7cb646767d434f65ca5f54b6
BLAKE2b-256 2ea9565164a45a8942433a17d73d61566e188b4b2b23bb1e4526e73cd1c6ba3e

See more details on using hashes here.

File details

Details for the file slurpit_sdk-0.9.133-py3-none-any.whl.

File metadata

  • Download URL: slurpit_sdk-0.9.133-py3-none-any.whl
  • Upload date:
  • Size: 42.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.14.2 Linux/6.8.0-87-generic

File hashes

Hashes for slurpit_sdk-0.9.133-py3-none-any.whl
Algorithm Hash digest
SHA256 7d602c2466e1bdd94fe3d5fb8fbc34b1cfa2fc53523462fc397a27ba3be0223c
MD5 631a6884d2489753918268efe69de005
BLAKE2b-256 46675f03c214be12a888237be03147e23cb37d20f8759c2e42f1a4c872b9c234

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page