Skip to main content

Meow Meow Scratch

MicroPython SDK for the Meow Meow Scratch® API

Send sensor data and read/write dashboard controls from an ESP32, Raspberry Pi Pico W, or any other MicroPython board.

PyPI Release License

Docs · Getting Started · Boards · API Reference


This is a lean, device-focused SDK — a single file (meow.py) with no external dependencies, talking HTTP(S) directly over usocket/ussl. It covers reading and writing data from a running board. Managing apps, endpoints, fields, dashboards, and webhooks is a one-time setup step best done from the web app or the full Python SDK (meow-sdk) on your computer.

Install

Simplest: copy the file. Take meow.py from this repo and copy it onto your board with Thonny, mpremote, or ampy — however you already move files to your board.

mpremote cp meow.py :meow.py

Or with mip (MicroPython's package manager), once connected to Wi-Fi on-device:

import mip
mip.install("github:meowmeowscratch/meow-micropython/meow.py")

# or pin an exact release:
mip.install("github:meowmeowscratch/meow-micropython/meow.py@v0.1.0")

Or from PyPI, for desktop-side testing/simulation before flashing to a board (this does not work on an actual MicroPython board — there's no pip there; boards must use one of the methods above):

pip install meow-micropython
from meow import Meow  # same import as on-device

30-second quickstart

from meow import Meow

# Connect to Wi-Fi first (see examples/ for a wifi_connect() helper).

api = Meow(api_key="YOUR_APP_API_KEY")
api.send("weather-station", "readings", {
    "temperature": 22.5,
    "humidity": 65,
})

data = api.records("weather-station", "readings", limit=10)
print(data["results"])

Get your API key at meowmeowscratch.com under Account > Platform Tokens, or an app-scoped key so a device can only reach that one app.

Read public data (no key needed)

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

Sensor loop example (DHT22)

See examples/dht22_weather_station.py for a complete Wi-Fi + sensor + send loop.

Dashboard control example

Build a dashboard with a toggle widget bound to an endpoint's static payload, then flip it from your phone — the board polls it and drives a real LED. See examples/dashboard_led_control.py.

API reference

Reading data

  • get(app, endpoint, **filters) — read a public endpoint (requires username)
  • get_record(app, endpoint, record_id)
  • aggregate(app, endpoint, aggregates, field=None, **filters)
  • records(app, endpoint, limit=25, offset=0) — requires api_key
  • all_records(app, endpoint) — auto-paginates; mind the RAM on constrained boards

Writing data

  • send(app, endpoint, data)
  • send_many(app, endpoint, records) — up to 100 at once
  • update(app, endpoint, record_id, data)
  • delete_record(app, endpoint, record_id)

Device control state

  • get_payload(app, endpoint) / get_payload_state(app, endpoint)
  • set_payload(app, endpoint, data)

Dashboards (read + control only — build/edit dashboards from the web app)

  • dashboard_data(dashboard) / dashboard_state(dashboard)
  • set_dashboard_widget_value(dashboard, widget_uuid, value)
  • dashboard_patch(dashboard, endpoint_uuid, key_path, value)
  • public_dashboard(share_token) — no API key required

Account

  • limits() / auth_context()

Errors

All errors are subclasses of MeowError (AuthError, NotFoundError, ValidationError, RateLimitError), each carrying .status_code, .code, .field, and .hint when the server provides them — same shape as the Python SDK's exceptions.

from meow import Meow, MeowError

try:
    api.send("weather-station", "readings", {"temperature": 22.5})
except MeowError as e:
    print("send failed:", e)

Notes for constrained boards

  • Each call opens and closes its own socket (Connection: close) — there's no connection pooling, to keep memory use predictable.
  • HTTPS is used by default (matching https://meowmeowscratch.com) via ussl.wrap_socket; certificate verification depends on your board's MicroPython build. Point base_url at a plain http:// address (e.g. a local nginx on your LAN during development) to skip TLS entirely.
  • all_records() loads every page into memory — fine for a few hundred rows, risky on an 8KB-RAM board with thousands of records. Prefer records() with pagination for large collections.

Links

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meow_micropython-0.1.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

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

meow_micropython-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file meow_micropython-0.1.0.tar.gz.

File metadata

  • Download URL: meow_micropython-0.1.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for meow_micropython-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2537bda1b2a4d52db8ffada12f1172383125f7b4d34c85412f4c6c42a8b677c1
MD5 9fd6eb791a97ee6a45614eb229f7710f
BLAKE2b-256 1cbd657bc30a276e4502f77ee6fe94878f9f6d4f66dd2cfa5bd21e70f26b0720

See more details on using hashes here.

Provenance

The following attestation bundles were made for meow_micropython-0.1.0.tar.gz:

Publisher: publish.yml on meowmeowscratch/meow-micropython

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_micropython-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for meow_micropython-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50cd7c51914d3d6d7facf2b5d47415cab5bfca4bc3cff82ecbf3947209a07e0b
MD5 3c96f52f6b948617ddbae98ea9cb211e
BLAKE2b-256 9a9dcc7ff84424dc38efa2a4fb0af19caf2070bb43d55600d9b6e402b47756de

See more details on using hashes here.

Provenance

The following attestation bundles were made for meow_micropython-0.1.0-py3-none-any.whl:

Publisher: publish.yml on meowmeowscratch/meow-micropython

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

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page