Skip to main content

Meow Meow Scratch

MicroPython SDK for the Meow Meow Scratch® API

Send sensor data and read/write device state 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 with no external Python dependencies. It talks HTTP(S) directly over usocket/ussl and covers reading and writing data from a running board. Managing apps, endpoints, fields, dashboards, webhooks, and plan limits is a one-time setup step best done from the web app or the full Python SDK (meow-sdk) on your computer.

Install

Use MicroPython 1.24 or newer. The package installs meow.py and the production CA certificate used to verify https://meowmeowscratch.com. The bundled ISRG Root X1 certificate comes from Let’s Encrypt, and its fingerprint is checked by the release script.

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

# or pin an exact release:
mip.install("github:meowmeowscratch/meow-micropython", version="v0.2.0")

You can also install over USB:

mpremote mip install github:meowmeowscratch/meow-micropython

For a manual install, copy both files into the same directory on the board:

mpremote fs cp meow.py :/lib/meow.py
mpremote fs cp isrg-root-x1.pem :/lib/isrg-root-x1.pem

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 and set the board clock first (see examples/).

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"])

Create an app-scoped key for the board from the app in meowmeowscratch.com. Never store a platform token on a device: it grants account-wide access and is unnecessary here.

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)

Public dashboards

  • public_dashboard(share_token) — read-only; no API key required

Credential diagnostics

  • auth_context() — confirm the key type, app, and scopes without exposing it

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 certificates are verified by default. Set the board clock with ntptime.settime() before the first API request. The bundled CA covers meowmeowscratch.com; pass ca_cert="/path/to/your-ca.pem" for a custom HTTPS base_url.
  • HTTPS verification cannot be disabled. Use an http:// base_url only for a local development server with a disposable development key.
  • 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.2.0.tar.gz (15.3 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.2.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: meow_micropython-0.2.0.tar.gz
  • Upload date:
  • Size: 15.3 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.2.0.tar.gz
Algorithm Hash digest
SHA256 eb0f18ded929f69495bc4e6f5a1e19acb0973662ac9474a85e0d8fda7129984b
MD5 b77c8bdf3e50315df5866b1036d0e4e0
BLAKE2b-256 4b0eb8d57e667f48496dd3f46dd6565edf9bfb113a8fe83141e933cb2d9b9ee8

See more details on using hashes here.

Provenance

The following attestation bundles were made for meow_micropython-0.2.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.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for meow_micropython-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96f9d7a390223132906bec314d1f7515b139b8edc1584a517a9d14e3fb4c2c0e
MD5 ecd02460036bfd9e6449f36fe514fe76
BLAKE2b-256 17b0952ad117c8348273de27e4584234b8945f5937e31e1bd93d3cb05c8d7b8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for meow_micropython-0.2.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

This release

0.2.0 This release

2 files

0.1.0

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