Skip to main content

SDK for Searpent Classy API

Project description

Python SDK for Searpent Classy API

Simplify your calls to Searpent Classy API in Python.

Installation

You can install the Searpent Python SDK from PyPI:

pip install searpent-classy-sdk

The SDK is supported on Python 3.6 to 3.10.

How to use

  1. Before you begin, make sure you have the API token and you know the name of your organization in the Classy API, e.g. 'dev.cz'.

  2. Store your API_URL and API_TOKEN in local environment variables and run:

from classy_sdk import ClassySDK

client = ClassySDK('dev.cz')

or pass them as arguments to the class:

client = ClassySDK(source='dev.cz', api_url='some_url', api_token='your_token')

you can also specify a timeout (in seconds):

client = ClassySDK(source='dev.cz', timeout=10)
  1. Use your client to make API calls. For instance:
client.list_cases(from_time='2021-09-01T13:00:00.000Z',
                  to_time='2021-10-02T13:00:00.000Z')
client.get_case('ce4c0299-6518-441b-b43d-1eeae666db36')
new_name = client.create_case('test_case')
client.update_case(new_name, 'test_case_updated')
client.upload_photo_from_file(new_name, 'tests/data/test_image.jpg',
                              'test_image', 'test_image')
  1. These are the methods that are currently available:
  • list_cases: Retrieves a list of cases within an indicated time period.
  • get_case: Retrieves one particular case.
  • create_case: Creates a new case.
  • update_case: Updates the case name as displayed in the Classy interface.
  • delete_case: Marks the case to be deleted after a defined period.
  • cancel_delete_case: Cancels the case deletion.
  • postpone_delete_case: Postpones the case deletion to a requested timepoint.
  • upload_photo: Uploads a photo in base64 format to the case.
  • upload_photo_from_file: Uploads a photo file to the case.
  • list_exports: Retrieves a list of performed exports.
  • get_export: Retrieves one particular export.
  • get_export_csv: Retrieves a csv file with requested export.
  • get_export_download_url: Retrieves a csv download url for the requested export.
  • list_inspections: Retrieves a list of performed inspections.
  • create_inspection: Creates a new inspection.
  • delete_inspection: Marks the inspection to be deleted after a defined period.
  • cancel_delete_inspection: Cancels the inspection deletion.
  • postpone_delete_inspection: Postpones the inspection deletion to a requested timepoint.

API documentation

See the complete API documentation: searpentclassy.docs.apiary.io.

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

searpent-classy-sdk-0.0.5.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

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

searpent_classy_sdk-0.0.5-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file searpent-classy-sdk-0.0.5.tar.gz.

File metadata

  • Download URL: searpent-classy-sdk-0.0.5.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for searpent-classy-sdk-0.0.5.tar.gz
Algorithm Hash digest
SHA256 7da2542b31e5c52e3ee694a400b19877ff6ca5f7112bdf730be3b5b425b44f50
MD5 0dda5c4369578826d17d0e682e7f5647
BLAKE2b-256 d294dce159200cbbbd9a29b26a3cdd887cd78d46b9f2393f8af3d3e71f6eb7c3

See more details on using hashes here.

File details

Details for the file searpent_classy_sdk-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: searpent_classy_sdk-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for searpent_classy_sdk-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3477ac64a4fd40e3eb70654349cc78c063e8db4f410dd8e239cf8cece90ececc
MD5 8ef0702532aa72002bff9eacccacd153
BLAKE2b-256 76cd525b55d3fca21df983a7029e72878e0fd05b700493587ce105422b685832

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