Skip to main content

Client library for Foxglove Data Platform.

Project description

Python Client Library for Foxglove Data Platform

This library provides a convenient python client for Foxglove's Data Platform.

In order to use the client you will first have to create an API token for your organization on your organization's settings page.

Sample Usage

import datetime
import io
import time
from datetime import datetime, timedelta, timezone

from foxglove.data_platform.client import Client

token = "<YOUR API TOKEN HERE>"
device_id = "<YOUR DEVICE ID>"
client = Client(token=token)

event = client.create_event(
    device_id=device_id,
    time=datetime.now(),
    duration=0,
    metadata={"message": "Hi from python!"},
)
print(event)

download = client.download_data(
    device_id=device_id,
    start=datetime.now() - timedelta(hours=3),
    end=datetime.now() - timedelta(hours=1),
)
print("download", download.read())

events = client.list_events()
print(events)

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

foxglove-data-platform-0.0.5.tar.gz (8.4 kB view hashes)

Uploaded Source

Built Distribution

foxglove_data_platform-0.0.5-py3-none-any.whl (9.3 kB view hashes)

Uploaded Python 3

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