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.
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 (requiresusername)get_record(app, endpoint, record_id)aggregate(app, endpoint, aggregates, field=None, **filters)records(app, endpoint, limit=25, offset=0)— requiresapi_keyall_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 onceupdate(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) viaussl.wrap_socket; certificate verification depends on your board's MicroPython build. Pointbase_urlat a plainhttp://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. Preferrecords()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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2537bda1b2a4d52db8ffada12f1172383125f7b4d34c85412f4c6c42a8b677c1
|
|
| MD5 |
9fd6eb791a97ee6a45614eb229f7710f
|
|
| BLAKE2b-256 |
1cbd657bc30a276e4502f77ee6fe94878f9f6d4f66dd2cfa5bd21e70f26b0720
|
Provenance
The following attestation bundles were made for meow_micropython-0.1.0.tar.gz:
Publisher:
publish.yml on meowmeowscratch/meow-micropython
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meow_micropython-0.1.0.tar.gz -
Subject digest:
2537bda1b2a4d52db8ffada12f1172383125f7b4d34c85412f4c6c42a8b677c1 - Sigstore transparency entry: 2272735929
- Sigstore integration time:
-
Permalink:
meowmeowscratch/meow-micropython@8842c6b6c132b668643a2340a0c70fc40a9dcd14 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/meowmeowscratch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8842c6b6c132b668643a2340a0c70fc40a9dcd14 -
Trigger Event:
release
-
Statement type:
File details
Details for the file meow_micropython-0.1.0-py3-none-any.whl.
File metadata
- Download URL: meow_micropython-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50cd7c51914d3d6d7facf2b5d47415cab5bfca4bc3cff82ecbf3947209a07e0b
|
|
| MD5 |
3c96f52f6b948617ddbae98ea9cb211e
|
|
| BLAKE2b-256 |
9a9dcc7ff84424dc38efa2a4fb0af19caf2070bb43d55600d9b6e402b47756de
|
Provenance
The following attestation bundles were made for meow_micropython-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on meowmeowscratch/meow-micropython
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meow_micropython-0.1.0-py3-none-any.whl -
Subject digest:
50cd7c51914d3d6d7facf2b5d47415cab5bfca4bc3cff82ecbf3947209a07e0b - Sigstore transparency entry: 2272736012
- Sigstore integration time:
-
Permalink:
meowmeowscratch/meow-micropython@8842c6b6c132b668643a2340a0c70fc40a9dcd14 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/meowmeowscratch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8842c6b6c132b668643a2340a0c70fc40a9dcd14 -
Trigger Event:
release
-
Statement type: