Skip to main content

Basking.io python SDK

Project description

Basking.io SDK

Integrate your data with the Basking API, customize the reports & experience, and join the community of developers building with workplace software apps together with Basking.

Basking.io is a cloud based workplace occupancy platform. More Information about Basking can be found here: https://basking.io

Basking uses a GraphQL API. The following Python SDK is a wrapper around the production API designed for our customers that require to access to data programmatically.

Requirements

Getting started

set the following environment variables:

  • BASKING_USERNAME: Your username (usually your email)
  • BASKING_USER_PASSWORD: Your password for Basking.
  • Optional: BASKING_AWS_REGION: the aws region where your Basking.io instance is hosted. (Defaults to eu-central-1)
  • Optional: BASKING_API_URL: the url of the Basking API you would like to query. (Defaults to api.basking.io)
import logging
from basking.basking_sdk import Basking

# set the default logging
logging.basicConfig()

# mofify the required level of logging for Basking
logging.getLogger('Basking').setLevel(logging.INFO)
logging.getLogger('botocore').setLevel(logging.INFO)

# initialize the SDK and set general query parameters
basking_client = Basking()

# list buildings the current user has access to
df_buildings = basking_client.location.get_user_buildings(pandify=True)

# get building meta data
building_meta_data = basking_client.location.get_building(
building_id=building_id
)
tz_str = building_meta_data['data']['getBuilding']['timeZone']


# get building daily occupancy statistics
df_daily = basking_client.occupancy.get_building_occupancy_stats_daily(
building_id=building_id,
start_obj_tz_unaware=start_date_obj,
end_obj_tz_unaware=end_date_obj,
pandify=True
)
df_daily.to_csv('./df_daily.csv')

For more examples, see basking.api_usage_example, or contact us

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

basking_sdk-0.9.58.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

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

basking_sdk-0.9.58-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file basking_sdk-0.9.58.tar.gz.

File metadata

  • Download URL: basking_sdk-0.9.58.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.16

File hashes

Hashes for basking_sdk-0.9.58.tar.gz
Algorithm Hash digest
SHA256 5f155c2e2445598b053d0a6019ab2cd7e64703c699e9dc457fde4de5c5dc1d22
MD5 b11cedda5aa7de09902cf60685ca2f21
BLAKE2b-256 1b19d171583031c2cc34bb05b038d9bab21463a0c326c1d6285465d06a4d663f

See more details on using hashes here.

File details

Details for the file basking_sdk-0.9.58-py3-none-any.whl.

File metadata

  • Download URL: basking_sdk-0.9.58-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.16

File hashes

Hashes for basking_sdk-0.9.58-py3-none-any.whl
Algorithm Hash digest
SHA256 e62f05bc7b67cd140dbff7f63ba0601e0aa976df0df701f964fe1d3804521492
MD5 ee71f78e51127f987701d66a5dd3674b
BLAKE2b-256 14a13a26528bc822b420d2cc22c6a4915b7e81ea4ea179430d9feb85b0c5aa1c

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