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
- python >=3.7 (current tested version: 3.9)
- pipenv
- A basking.io account
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 toeu-central-1) - Optional:
BASKING_API_URL: the url of the Basking API you would like to query. (Defaults toapi.basking.io)
from basking.basking_sdk import Basking
logger.info('initialize the SDK. See constructor documentation for parameter overrides')
basking = Basking()
logger.info('List sites the current user has access to')
sites = basking.location.get_user_buildings(pandify=False)
logger.info('Select a site from the list of sites')
site_id = sites[0]['id']
organization_id = sites[0]['organizationId']
start_date_obj = date(2025, 1, 1)
end_date_obj = date(2025, 1, 14)
logger.info('get site meta data')
site_meta_data = basking.location.get_building(
building_id=site_id
)
logger.info('get building daily occupancy statistics')
df_daily = basking.occupancy.get_building_occupancy_stats_daily(
building_id=site_id,
start_date=start_date_obj,
end_date=end_date_obj,
pandify=True,
# floor_ids=[site_meta_data['data']['getBuilding']['floors'][0]['id']]
)
logger.info('metadata for all site areas')
areas_meta_data = basking.location.get_floor_areas_for_building(
building_id=site_id
)
logger.info('get the density of the last 7 days')
density_last_week = basking.occupancy.get_density_for_building_last_days(
building_id=site_id,
days=7
)
logger.info('Frequency of Visits at Site Level')
df_freq_of_visits = basking.occupancy.get_location_frequency_of_visits(
building_id=site_id,
start_date=start_date_obj,
end_date=end_date_obj,
pandify=True
)
logger.info('Duration of Visits at Site Level')
df_duration_of_visits = basking.occupancy.get_location_duration_of_visits(
building_id=site_id,
start_date=start_date_obj,
end_date=end_date_obj,
pandify=True
)
logger.info('Popular Visitation days at Site Level')
df_preferred_visit_day = basking.occupancy.get_location_popular_days_of_visits(
building_id=site_id,
start_date=start_date_obj,
end_date=end_date_obj,
pandify=True
)
For more examples, see basking.api_usage_example, or contact us
Metadata
Release files for basking-sdk 0.9.59
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| basking_sdk-0.9.59.tar.gz | 19.2 kB | Without provenance | Details for basking_sdk-0.9.59.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| basking_sdk-0.9.59-py3-none-any.whl | Python 3 | none | any | Details for basking_sdk-0.9.59-py3-none-any.whl |
Total release size: 43.6 kB
Release files / basking_sdk-0.9.59.tar.gz
| Download URL | basking_sdk-0.9.59.tar.gz |
|---|---|
| Size | 19.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1fccb274668d16f6c55f6e38a8da028fff00d65b12ad7e36f26d80548ead009b
|
|
BLAKE2b-256 checksum How to use checksums |
c24335f8cfd433ead6fc0599a1b88ed43e48e7b7ccae75b7341605e95e7645ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.16
|
Release files / basking_sdk-0.9.59-py3-none-any.whl
| Download URL | basking_sdk-0.9.59-py3-none-any.whl |
|---|---|
| Size | 24.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb6f1819bd8397ef7c81b5a5598fd978c77d45c385644dfa7539335cba1e0bdb
|
|
BLAKE2b-256 checksum How to use checksums |
67b51a4fb46b51f0be31179e43b5fde04749062c76a3772329dab067d299da18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.16
|
Security for basking-sdk 0.9.59
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.