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.41.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

basking_sdk-0.9.41-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file basking-sdk-0.9.41.tar.gz.

File metadata

  • Download URL: basking-sdk-0.9.41.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.16

File hashes

Hashes for basking-sdk-0.9.41.tar.gz
Algorithm Hash digest
SHA256 043fd3c60592291fc4c64dd73a9245174dc4b5702f26f83e5bec90cc2a981b18
MD5 175627b65fe4ff1e8169a31d14ce8477
BLAKE2b-256 da31c3735705c5953d628e386e9ca1a289830709e0dad81c873ef3778c75c357

See more details on using hashes here.

File details

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

File metadata

  • Download URL: basking_sdk-0.9.41-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.16

File hashes

Hashes for basking_sdk-0.9.41-py3-none-any.whl
Algorithm Hash digest
SHA256 e42f0c0cee86acb5f02ade3c1463d175abcc4d8b7da23cc530de19bb43d8ec9f
MD5 6fb21e050f152a703a52cf6f77d2bebc
BLAKE2b-256 06616758299ee11033ee42bdf69f5f1cad69261c7f27c375266abaf9ee063ef4

See more details on using hashes here.

Supported by

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