Skip to main content

Python client for the meow meow scratch API — build APIs and send data from your Raspberry Pi!

Project description

meow meow scratch

Python SDK for the meow meow scratch API

Build your own APIs and send data from your Raspberry Pi, Arduino, or any Python project.

PyPI Python License

Docs · Getting Started · API Reference · CLI Reference


Install

pip install meow-sdk

30-second quickstart

from meow_sdk import Meow

# 1. Connect with your API key
api = Meow(api_key="mms_your_key_here")

# 2. Send data
api.send("weather-station", "readings", {
    "temperature": 22.5,
    "humidity": 65,
})

# 3. Read it back
data = api.records("weather-station", "readings")
print(data["results"])

Get your API key at meowmeowscratch.com under Account > Platform Tokens.

Read public data (no key needed)

Anyone can read public endpoints using a username:

api = Meow(username="jake")

data = api.get("weather-station", "readings")
print(data)

Your public API lives at: https://meowmeowscratch.com/api/v1/<username>/<app>/<endpoint>/

Raspberry Pi

Read a sensor and send data every 10 seconds:

import time
import adafruit_dht
import board
from meow_sdk import Meow

sensor = adafruit_dht.DHT22(board.D4)
api = Meow(api_key="mms_your_key_here")

while True:
    try:
        api.send("my-pi", "sensors", {
            "temperature": sensor.temperature,
            "humidity": sensor.humidity,
        })
        print(f"{sensor.temperature}°C, {sensor.humidity}%")
    except Exception as e:
        print(f"Sensor error: {e}")

    time.sleep(10)

See the Raspberry Pi guide for more examples (buttons, LEDs, camera, systemd).

Control panels

Build real-time dashboards with interactive widgets:

api = Meow(api_key="mms_your_key_here")

# Create a dashboard
api.create_dashboard("My Room", "my-room")

# Add a light switch
api.create_dashboard_widget(
    "my-room", "endpoint-uuid",
    "lights_on", "toggle", "Bedroom Lights"
)

# Toggle it from your Pi
api.dashboard_patch("my-room", "endpoint-uuid", "lights_on", True)

Widget types: toggle, slider, color, number, text, select, display.

CLI

The SDK includes a full CLI. Configure it once:

export MEOW_API_KEY=mms_your_key_here
export MEOW_USERNAME=jake

Then use it:

# Send data
meow send weather-station readings temperature=22.5 humidity=65

# Read data
meow get weather-station readings

# List your apps
meow apps

# Export as CSV
meow csv weather-station readings

# Manage dashboards
meow dashboards
meow dashboard-data my-room
meow dashboard-patch my-room endpoint-uuid lights_on true

See the CLI reference for all 40+ commands.

Error handling

from meow_sdk import Meow, AuthError, NotFoundError, MeowError

api = Meow(api_key="mms_your_key_here")

try:
    api.send("my-app", "readings", {"value": 42})
except AuthError:
    print("Bad API key")
except NotFoundError:
    print("App or endpoint doesn't exist")
except MeowError as e:
    print(f"API error {e.status_code}: {e}")

What you can do

Feature SDK CLI
Send & read records api.send() meow send
Manage apps & endpoints api.create_app() meow create-app
Define field schemas api.create_field() meow create-field
Static payloads api.set_payload() meow payload-set
Proxy endpoints api.set_proxy() meow proxy-set
Control panel dashboards api.dashboard_patch() meow dashboard-patch
Webhooks api.create_webhook() meow webhook-create
Encryption api.enable_encryption() meow encrypt-enable
Request logs api.request_logs() meow logs
CSV export api.export_csv() meow csv
Aggregations api.aggregate() meow aggregate
API keys api.create_app_key() meow key-create
Platform tokens api.create_platform_token() meow platform-token-create
Billing api.billing_status() meow billing-status

Links

License

MIT

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

meow_sdk-0.6.0.tar.gz (43.2 kB view details)

Uploaded Source

Built Distribution

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

meow_sdk-0.6.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file meow_sdk-0.6.0.tar.gz.

File metadata

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

File hashes

Hashes for meow_sdk-0.6.0.tar.gz
Algorithm Hash digest
SHA256 8ac957cd5dcc28538e713e0a7b701e3574cc618a21ac5795baeb12a1dd18e321
MD5 5540ac313792e89f1ae1c3ba5ef59c72
BLAKE2b-256 947cc7d29f8f4dbef900795784d7d71859cf6590a4f85f61aaf15d187936c9d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for meow_sdk-0.6.0.tar.gz:

Publisher: publish.yml on meowmeowscratch/meow-sdk

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

File details

Details for the file meow_sdk-0.6.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for meow_sdk-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7059409602a01e50c7a284f2b59a5c2b89db7dbfa18560da0a9aad52e818373
MD5 c35ef4947cd786052522abf51708bffa
BLAKE2b-256 80524d95a646be7edbe22282a75e99adbe9c9df5894e8a3f04bc2508f9cecb8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for meow_sdk-0.6.0-py3-none-any.whl:

Publisher: publish.yml on meowmeowscratch/meow-sdk

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