Skip to main content

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. type and name are 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 its id, and a row without one is new.

  • update_entry also publishes, unpublishes and dismisses reports. {"isPublished": ..., "dismissReports": ...} alone needs moderation and 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 page counts from 1. list_entries includes unpublished entries.

  • send_invites takes 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 int or a string of digits. Anything else raises MeiboConfigError before 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, MeiboForbiddenError and its subclasses, MeiboRateLimitError — emailed nothing.
  • A MeiboServerError with a non-empty sent emailed those addresses and not failed. One without them carries no account of delivery.
  • A MeiboConnectionError says 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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for meibo 1.0.1
File Size Uploaded Provenance Actions
meibo-1.0.1.tar.gz 27.2 kB With provenance Details for meibo-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for meibo 1.0.1
File Interpreter ABI Platform Actions
meibo-1.0.1-py3-none-any.whl Python 3 none any Details for meibo-1.0.1-py3-none-any.whl

Total release size: 48.2 kB

Release files / meibo-1.0.1.tar.gz

Download URL meibo-1.0.1.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
789e6bd53203e5fdc706338db6bd5a6144b1e8d1fee04915b730a4600f1df234
BLAKE2b-256 checksum
How to use checksums
e2f911c66f4cb32e62b03426a239711bbe6be34833815c6eb4e4434e1db1cbe4
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 log

Release files / meibo-1.0.1-py3-none-any.whl

Download URL meibo-1.0.1-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd4736c8b5effe931c86ca6a6351b555ed8ada6965dd9eded00203ec44f6d171
BLAKE2b-256 checksum
How to use checksums
d069007036c7cad0767f09cbaa277e8f1baac42017b2db895cce1c12c0256529
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 log

Security for meibo 1.0.1

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.

Select from 2 files

Attestation for meibo-1.0.1.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 log

A 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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files Full provenance

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