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
Metadata
Release files for meow-micropython 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| meow_micropython-0.2.0.tar.gz | 15.3 kB | With provenance | Details for meow_micropython-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| meow_micropython-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for meow_micropython-0.2.0-py3-none-any.whl |
Total release size: 27.4 kB
Release files / meow_micropython-0.2.0.tar.gz
| Download URL | meow_micropython-0.2.0.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb0f18ded929f69495bc4e6f5a1e19acb0973662ac9474a85e0d8fda7129984b
|
|
BLAKE2b-256 checksum How to use checksums |
4b0eb8d57e667f48496dd3f46dd6565edf9bfb113a8fe83141e933cb2d9b9ee8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.
Transparency logRelease files / meow_micropython-0.2.0-py3-none-any.whl
| Download URL | meow_micropython-0.2.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96f9d7a390223132906bec314d1f7515b139b8edc1584a517a9d14e3fb4c2c0e
|
|
BLAKE2b-256 checksum How to use checksums |
17b0952ad117c8348273de27e4584234b8945f5937e31e1bd93d3cb05c8d7b8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.
Transparency logSecurity for meow-micropython 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for meow_micropython-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.