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.
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 (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)
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 coversmeowmeowscratch.com; passca_cert="/path/to/your-ca.pem"for a custom HTTPSbase_url. - HTTPS verification cannot be disabled. Use an
http://base_urlonly 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. 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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb0f18ded929f69495bc4e6f5a1e19acb0973662ac9474a85e0d8fda7129984b
|
|
| MD5 |
b77c8bdf3e50315df5866b1036d0e4e0
|
|
| BLAKE2b-256 |
4b0eb8d57e667f48496dd3f46dd6565edf9bfb113a8fe83141e933cb2d9b9ee8
|
Provenance
The following attestation bundles were made for meow_micropython-0.2.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.2.0.tar.gz -
Subject digest:
eb0f18ded929f69495bc4e6f5a1e19acb0973662ac9474a85e0d8fda7129984b - Sigstore transparency entry: 2274633649
- Sigstore integration time:
-
Permalink:
meowmeowscratch/meow-micropython@3cff4ba58fd55940064d1e425a1930913671ef5a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/meowmeowscratch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3cff4ba58fd55940064d1e425a1930913671ef5a -
Trigger Event:
release
-
Statement type:
File details
Details for the file meow_micropython-0.2.0-py3-none-any.whl.
File metadata
- Download URL: meow_micropython-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.1 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 |
96f9d7a390223132906bec314d1f7515b139b8edc1584a517a9d14e3fb4c2c0e
|
|
| MD5 |
ecd02460036bfd9e6449f36fe514fe76
|
|
| BLAKE2b-256 |
17b0952ad117c8348273de27e4584234b8945f5937e31e1bd93d3cb05c8d7b8e
|
Provenance
The following attestation bundles were made for meow_micropython-0.2.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.2.0-py3-none-any.whl -
Subject digest:
96f9d7a390223132906bec314d1f7515b139b8edc1584a517a9d14e3fb4c2c0e - Sigstore transparency entry: 2274633921
- Sigstore integration time:
-
Permalink:
meowmeowscratch/meow-micropython@3cff4ba58fd55940064d1e425a1930913671ef5a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/meowmeowscratch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3cff4ba58fd55940064d1e425a1930913671ef5a -
Trigger Event:
release
-
Statement type: