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.142.tar.gz (27.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.142-py3-none-any.whl (48.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slurpit_sdk-0.9.142.tar.gz
  • Upload date:
  • Size: 27.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.0 CPython/3.14.4 Linux/6.8.0-101-generic

File hashes

Hashes for slurpit_sdk-0.9.142.tar.gz
Algorithm Hash digest
SHA256 92863531043ecfdf8005789214d38c070c282886876bc608f282659cff2f9841
MD5 63f17cf252969a03a0c4573e2083e430
BLAKE2b-256 149fdeee7fa0c0fa863414f2f1be9583d514ddea2d0385e76fd6958f2a8c36f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slurpit_sdk-0.9.142-py3-none-any.whl
  • Upload date:
  • Size: 48.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.0 CPython/3.14.4 Linux/6.8.0-101-generic

File hashes

Hashes for slurpit_sdk-0.9.142-py3-none-any.whl
Algorithm Hash digest
SHA256 82831507dceaf793e35a4bed239c5121dac5262738ab4dabfde1cab4e341df89
MD5 7a1215218bb35de21f2c0b58f55f2983
BLAKE2b-256 c4dbaf14eb688465e4fec6277853cd85291c87ee2e35b21d69e794bcd3f6eb59

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