Skip to main content

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

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)

Source distribution for misarblog 1.1.0
File Size Uploaded
misarblog-1.1.0.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for misarblog 1.1.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

5.0.3

2 release files

5.0.2

2 release files

5.0.1

2 release files

5.0.0

2 release files

This release

1.1.0 This release

2 release files

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