Skip to main content

A Python SDK for interacting with Harbor Scale ingestion endpoints.

Project description

Harbor Scale Python SDK

PyPI Python Versions Downloads License

Made with Python Stars

The Easiest Way to Visualize Python Data 🚀

Stop managing InfluxDB and Grafana containers.

The Harbor Scale SDK lets you send telemetry from any Python application (Raspberry Pi, Servers, Desktop scripts) to a fully managed Grafana dashboard in 1 line of code.

  • ⚡ Instant Visualization: Data appears on your hosted Grafana dashboard in milliseconds.
  • 💾 Infinite Storage: We handle the time-series database for you.
  • 🔌 Zero Config: No Docker, no ports, no firewall rules. Just pip install.

👉 Get your Free API Key at harborscale.com


Installation

pip install harborscalesdk

30-Second Quickstart

  1. Get a Key: Sign up at harborscale.com (Free Tier includes 3M data points).
  2. Run this script:
from harborscalesdk import HarborClient, GeneralReading

# 1. Initialize (Replace with your actual ID and Key)
client = HarborClient(
    endpoint="https://harborscale.com/api/v2/ingest/YOUR_HARBOR_ID",
    api_key="sk_live_..."
)

# 2. Send Data (No database schema required)
client.send(GeneralReading(
    ship_id="raspberry-pi-4",    # Your Device Name
    cargo_id="temperature",      # Your Metric Name
    value=42.5
))

print("Data sent! Check your Grafana dashboard.")

Advanced Usage

Sending Batches (Faster)

If you have high-frequency data, use send_batch to upload multiple readings in one HTTP request.

batch = [
    GeneralReading(ship_id="sensor-1", cargo_id="temp", value=22.5),
    GeneralReading(ship_id="sensor-1", cargo_id="humidity", value=60.1),
    GeneralReading(ship_id="sensor-1", cargo_id="voltage", value=3.3),
]

client.send_batch(batch)

Logging GPS Data

Harbor Scale automatically groups GPS data for map visualizations. Send latitude and longitude as separate metrics with the same timestamp.

# The SDK handles the timestamps automatically if you don't provide one
client.send_batch([
    GeneralReading(ship_id="truck-01", cargo_id="latitude", value=41.123),
    GeneralReading(ship_id="truck-01", cargo_id="longitude", value=29.456)
])

Pro Tip: In Grafana, use the "Geomap" panel to visualize this instantly.


Features

  • Pydantic Validation: Never send bad data again.
  • Auto-Retry: Built-in exponential backoff for flaky networks (perfect for IoT/Edge).
  • Async Ready: Designed for high-throughput logging.
  • Type Hinting: Full support for modern Python IDEs.

Need Help?

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

harborscalesdk-0.1.9.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

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

harborscalesdk-0.1.9-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file harborscalesdk-0.1.9.tar.gz.

File metadata

  • Download URL: harborscalesdk-0.1.9.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for harborscalesdk-0.1.9.tar.gz
Algorithm Hash digest
SHA256 6f72b1ad3f063c938b6e884965b1d7a3e1e8f74264e99dc274a6961a415832ae
MD5 aabb30dd7cf0de3f980a6f09c41cc816
BLAKE2b-256 2cb8f4686dcf4c5dd4b0cbff51c777b7a20c1bf8c70be2cb2c372d260d5226a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for harborscalesdk-0.1.9.tar.gz:

Publisher: publish-to-pypi.yml on HarborScale/harbor-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file harborscalesdk-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: harborscalesdk-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for harborscalesdk-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 afe2cb0c28f3fe69d0177bcdfc11c1637774721c7ffcf9aad22fa39da3da1662
MD5 c4de78881fd398f1bb8da68ff084448c
BLAKE2b-256 7ae06d279ae6b04790bf51ddc344a99ca4b52f22245720eb71df55e06438bb83

See more details on using hashes here.

Provenance

The following attestation bundles were made for harborscalesdk-0.1.9-py3-none-any.whl:

Publisher: publish-to-pypi.yml on HarborScale/harbor-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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