Misar.Blog Python SDK
Official Python client for the Misar.Blog developer API. Sync and async, typed models, retry with back-off.
Install
pip install misarblog
Quick start
from misarblog import MisarBlogClient, MisarBlogPlanLimitError
blog = MisarBlogClient("mbk_...")
me = blog.me.get()
article = blog.articles.publish(title="Hello", body_markdown="# Hi")
thread = blog.comments.list(article["id"], limit=50)
follows = blog.follows.status(me["id"])
try:
blog.ai.complete(prompt="Draft an intro paragraph")
except MisarBlogPlanLimitError as err:
print(f"{err.plan} plan is out of credits — upgrade at {err.upgrade_url}")
Every method has an a-prefixed async twin:
me = await blog.me.aget()
await blog.aclose()
Authentication and plan gating
Every call goes through the metered gateway at https://api.misar.io/blog/v1
with your developer key as a Bearer token. Mint a key in the dashboard at
https://www.misar.blog/dashboard/settings/api — key management is a
cookie-session flow and is deliberately not exposed by this SDK.
Feature access and throughput follow the subscription attached to that key:
| Signal | Meaning |
|---|---|
401 |
Missing, expired or revoked key |
403 |
The key is scoped and lacks the scope this route needs |
429 (plain) |
Rate limit — 100 requests/minute per key. The SDK retries with back-off |
429 + plan_limit_exceeded |
A metered allowance is spent. Retrying will not help until it resets |
402 + plan_limit_exceeded |
The feature is not on this plan |
The last two raise MisarBlogPlanLimitError rather than a generic error, carrying the
plan slug, the pricing URL and (when the API supplies it) seconds until reset.
Show the upgrade URL instead of reporting a bare failure — the SDK does not
retry these, because retrying cannot change the outcome.
Covered operations
All 25 key-authenticated operations:
| Group | Operations |
|---|---|
| Articles | list, get, create, update, create draft, search, recommendations |
| Series | list, create, add article |
| Reactions | get, add, remove |
| Comments | list |
| Follows | status |
| AI | complete, titles |
| Images | generate, upload |
| Account | profile, plan, trial status, start trial |
| Analytics | summary, upsell funnel |
The API exposes no SSE or WebSocket endpoint that accepts an API key, so this
SDK is request/response only. See openapi/blog.openapi.json for the
machine-readable contract.
Links
- API docs — https://docs.misar.io/blog
- OpenAPI spec — https://api.misar.io/blog/v1/openapi.json
- Dashboard — https://www.misar.blog/dashboard/settings/api
License
MIT — see LICENSE.
Metadata
Release files for misarblog 1.1.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 | |
|---|---|---|---|
| misarblog-1.1.0.tar.gz | 11.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| misarblog-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.7 kB
Release files / misarblog-1.1.0.tar.gz
| Download URL | misarblog-1.1.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf3c8f528932d1e78e79102ec2c0f67c48b0fac77a015cded6484df6c24aaef2
|
|
BLAKE2b-256 checksum How to use checksums |
eeca00b13b2b9ceeb5baac69ded9dbf5764f338893f3ceccd65d99ba22911d82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / misarblog-1.1.0-py3-none-any.whl
| Download URL | misarblog-1.1.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a60ec151714cc732244431ad2fb09acd774e7b9d53710c605670b0a91c778d9
|
|
BLAKE2b-256 checksum How to use checksums |
6ba6ac552abead1763782648d1d1684fef76b1f54ed072d2595b78dcf97d1b70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|