meibo
Python client for the meibo API. Read and change a school or club directory — its settings, its families and staff, its moderation queue and its invites — through a key the directory's owner hands you.
pip install meibo
Python 3.10+. One dependency, httpx, which is what gives you a sync and an async client from the same package. The full API reference is at meibo.io/developers.
Quickstart
import os
from meibo import Meibo
meibo = Meibo(api_key=os.environ["MEIBO_API_KEY"], directory="maple")
settings = meibo.read_settings()
print(settings["name"], settings["scopes"])
written = meibo.create_entry({
"type": "family",
"name": "The Parks",
"parents": [{"name": "Min-jun Park", "email": "minjun@example.com", "phoneNumber": "555-0142"}],
"children": [{"name": "Seo-yeon", "teacher": "Mr. Chen"}],
})
print(written["id"], written["isPublished"])
Every method answers the API's JSON as a dict, unwrapped from its
{"success": true, "data": ...} envelope and otherwise untouched, so its keys
are the reference's camelCase ones. The TypedDicts in meibo.types describe
each shape under the reference's own schema names, so a type checker knows
written["isPublished"] is a bool. A request body is a plain dict of the
same shape.
Async
AsyncMeibo has the same methods with the same arguments, awaited:
from meibo import AsyncMeibo
async with AsyncMeibo(api_key=key, directory="maple") as meibo:
page = await meibo.list_entries(q="okafor")
Both clients open their connection pool on the first request. Close it when
you are done — with Meibo(...) as meibo:, or meibo.close() /
await meibo.aclose() — or keep one long-lived client rather than building one
per request.
Keys
The directory's owner makes a key on their account page at meibo.io/account, and chooses its scopes there. It is shown once. meibo keeps only a hash of it, so a lost key is revoked and replaced, never recovered.
A key acts as the owner, for every directory the owner has, and follows the owner's rules. Keep it on a server: anyone holding it can do what its scopes allow.
Every call a key makes is logged against the directory it reached, with its method, route and status, refusals included. The owner can read that log for 90 days.
Scopes
| Scope | Allows |
|---|---|
directory |
Changing the directory's name, preset, groups and logo. |
entries:write |
Adding entries and editing them. |
moderation |
Reading the moderation queue, publishing and unpublishing entries, dismissing reports, and deleting entries. |
invites |
Emailing families the directory's address, within its invite cap. It lets nobody in. |
entries:read |
Reading entries in full, contacts and children's names included. |
entries:read is off unless the owner grants it. When they do, the
dashboard tells them that what the key reads goes to the assistant's AI
provider. A key without it can still add, edit, publish and delete entries, but
what those writes answer is an entry's id and isPublished, and nothing of
what is in it. list_moderation without it answers a summary of each entry,
without contacts or children's names.
read_settings is open to any key and answers the key's own scopes, so call
it to find out what a key may do before trying.
Photos are never sent
The API serves no photos, and a key cannot send one. An entry carries
hasPhoto wherever the dashboard shows a photo: on the entry, and on each
parent and child. The input types here have no photoKey, and a body that
carries one anyway is refused with reason photos. Editing an entry keeps the
photos it already has.
Choosing a directory
When the owner has one directory, a key reaches it and nothing needs naming.
When they have more than one, name the directory by its slug, the last part of
its address: once on the client as directory, or on any call as its
directory argument, which wins.
from meibo import Meibo, MeiboDirectoryRequiredError
meibo = Meibo(api_key=key)
try:
meibo.read_settings()
except MeiboDirectoryRequiredError as err:
print("Pick one of:", err.directories) # ['maple', 'oak']
meibo.read_settings(directory=err.directories[0])
Methods
Each method takes a keyword-only directory=, and returns the operation's
answer, already unwrapped. The names are the JavaScript SDK's
(@fennecstudio/meibo-js) in snake_case.
| Method | Request | Scope | Returns |
|---|---|---|---|
read_settings() |
GET /api/v1/directory |
any | Settings |
update_settings(update) |
PUT /api/v1/directory |
directory |
Settings |
list_entries(q=, page=) |
GET /api/v1/directory/entries |
entries:read |
EntryList |
create_entry(entry) |
POST /api/v1/directory/entries |
entries:write |
EntryWritten |
get_entry(entry_id) |
GET /api/v1/directory/entries/{id} |
entries:read |
EntryDetail |
update_entry(entry_id, update) |
PUT /api/v1/directory/entries/{id} |
entries:write and/or moderation |
EntryWritten |
delete_entry(entry_id) |
DELETE /api/v1/directory/entries/{id} |
moderation |
EntryDeleted |
list_moderation(page=) |
GET /api/v1/directory/moderation |
moderation |
ModerationList |
send_invites(emails) |
POST /api/v1/directory/invites |
invites |
InvitesSent |
A few things worth knowing:
-
An edit sends the whole entry.
typeandnameare always required, even to change one field. A field left out keeps its value, but a list that is sent is the whole list: send each parent, child or link you want to keep back with itsid, and a row without one is new. -
update_entryalso publishes, unpublishes and dismisses reports.{"isPublished": ..., "dismissReports": ...}alone needsmoderationand changes nothing else. Beside an edit it needs both scopes, and runs after the edit.meibo.update_entry(11, {"isPublished": True, "dismissReports": True})
-
Lists are 48 to a page, by name, and
pagecounts from 1.list_entriesincludes unpublished entries. -
send_invitestakes a string of addresses or a list, joined into the one string the API accepts. At most 20 addresses a request, and 200 invites per directory in any 24 hours, the owner's own included. -
An entry id is a positive whole number, as an
intor a string of digits. Anything else raisesMeiboConfigErrorbefore a request is made.
Errors
Every method raises on a non-2xx answer. The class comes from the status and
the refusal's reason, the word the API says to branch on. err.message is
the API's sentence for a person, and can change. Every error is a MeiboError,
with status, reason and the parsed body. When meibo itself refused,
refusal holds the refusal's fields.
| Class | Status | When | Carries |
|---|---|---|---|
MeiboRequestError |
400 | The body or a field failed a check, reason photos included |
refusal["field"] |
MeiboDirectoryRequiredError |
400 | The key reaches several directories and the call named none | directories |
MeiboAuthError |
401 | No key, or one that is revoked or expired | |
MeiboScopeError |
403 | The key lacks a scope the call needs | scope |
MeiboSuspendedError |
403 | The owner's account is suspended | |
MeiboFrozenError |
403 | The directory is past what the owner's plan allows | plan, limit |
MeiboForbiddenError |
403 | Any other 403, and the parent of the three above | |
MeiboNotFoundError |
404 | No entry with that id in this directory | |
MeiboDirectoryNotReachedError |
404 | The key does not reach the directory named | |
MeiboRateLimitError |
429 | The edge's rate limit, or the directory's invite cap | remaining (invites) |
MeiboServerError |
5xx | Something failed on meibo's side | sent, failed (invites) |
MeiboConnectionError |
0 | The request never completed: DNS, a reset connection, or a timeout | cause |
MeiboConfigError |
0 | Arguments that cannot make a request: no key, or a bad entry id |
A status with no class of its own — a 409 when publishing would pass the
plan's entry limit (reason entry_limit), a 413 for a logo that is too
large — arrives as MeiboError with its reason and refusal.
from meibo import MeiboError, MeiboScopeError
try:
meibo.list_entries()
except MeiboScopeError as err:
print(f"Ask the owner for a key with {err.scope}.")
except MeiboError as err:
if err.reason != "entry_limit":
raise
print(f"The plan publishes at most {err.refusal['limit']} entries.")
A suspended owner's key, and a frozen directory's, keep reading and
withdrawing. Reads, unpublishing an entry and deleting one are still served.
Every other write raises MeiboSuspendedError or MeiboFrozenError.
What a send_invites error says about delivery depends on the error.
- A refusal the API answered with —
MeiboRequestError,MeiboAuthError,MeiboForbiddenErrorand its subclasses,MeiboRateLimitError— emailed nothing. - A
MeiboServerErrorwith a non-emptysentemailed those addresses and notfailed. One without them carries no account of delivery. - A
MeiboConnectionErrorsays nothing about delivery. A timeout, a reset or a response lost on its way back can come after meibo already emailed some or all of the addresses. The SDK does not retry, and nor should you without checking: a blind retry can email the same people twice. Treat the addresses as possibly invited, and re-send only the ones you can confirm were not.
Rate limits
The edge allows 300 requests per 5 minutes from one IP address, and 600 per 5
minutes with one key. Past either, a call raises MeiboRateLimitError with no
remaining. Back off and retry.
Options
Meibo(
api_key="your key", # required
directory="maple", # default directory slug, overridden per call
base_url="https://api.meibo.io", # the default
timeout=30.0, # seconds per request, the default; None or 0 turns it off
transport=None, # an httpx transport, for tests, proxies or retries
)
timeout is in seconds, where the JavaScript SDK's timeoutMs is
milliseconds. The key is sent as Authorization: Bearer <key>. One given with a
Bearer prefix already is sent with just the one.
For AI agents
meibo also serves this API as an MCP server, at
https://api.meibo.io/api/v1/directory/mcp, for an assistant that speaks MCP
rather than running code. It takes the same key and the same scopes.
Something did not work?
Email support@fennec.studio with the method and path, the status, and the
error and reason you got, and what you expected. Leave out the key and
anything an entry holds.
License
ISC
Metadata
Release files for meibo 1.0.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 |
|---|---|---|---|---|
| meibo-1.0.0.tar.gz | 27.2 kB | With provenance | Details for meibo-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| meibo-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for meibo-1.0.0-py3-none-any.whl |
Total release size: 48.2 kB
Release files / meibo-1.0.0.tar.gz
| Download URL | meibo-1.0.0.tar.gz |
|---|---|
| Size | 27.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
deef37a9efdb1ae0c8e4f32d916dc875c01382d7ac9aefefa75855c29903c003
|
|
BLAKE2b-256 checksum How to use checksums |
a39e3664bc278e4f40f19f4da7d9435fbeb84e8b5484c0bf893c581ff96b37cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logRelease files / meibo-1.0.0-py3-none-any.whl
| Download URL | meibo-1.0.0-py3-none-any.whl |
|---|---|
| Size | 21.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
861fc025b8123e97bf0bd34cc07ef423c8b9f53921bf7393a98e365ba697a9f3
|
|
BLAKE2b-256 checksum How to use checksums |
c0e507cb2e4312124274a563d34f3d9320efcc91c204476fead8b700285de257
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logSecurity for meibo 1.0.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
Both files in this release have been uploaded with provenance metadata.
Attestation for meibo-1.0.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 Nov 23, 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.