This release is a pre-release and may not be stable for production use.
MarkanM Official Python SDK (markanm 0.1.0a1)
Official Python library (v0.1.0-alpha) for building developer bots, automation, and AI agents on MarkanM Chat (https://chat.markanm.com).
⚠️ Alpha Release Notice
This is v0.1.0-alpha (markanm 0.1.0a1). It is intended for testing against the MarkanM Bot API v1.
🚀 Installation
Install via pip:
pip install markanm
⚡ Quick Start
1. Simple Hello Bot (hello_bot.py)
import os
from markanm import Bot
bot = Bot(os.environ["MARKANM_BOT_TOKEN"])
@bot.command("hello")
async def hello(ctx):
await ctx.reply("Hello 👋 Welcome to MarkanM!")
@bot.command("start")
async def start(ctx):
await ctx.reply("🚀 Bot activated and ready!")
if __name__ == "__main__":
bot.run_polling()
2. Event Listeners
@bot.on("message.created")
async def on_message(event):
print(f"New message received: {event.payload}")
@bot.on("member.joined")
def on_member_joined(event):
print(f"User joined room: {event.payload.get('user')}")
3. AI Assistant Bot (ai_bot.py)
import os
from markanm import Bot
from markanm.ai import AI
bot = Bot(os.environ["MARKANM_BOT_TOKEN"])
ai = AI(provider="openai", api_key=os.environ["OPENAI_API_KEY"])
@bot.command("ask")
async def ask(ctx):
prompt = " ".join(ctx.args)
if not prompt:
await ctx.reply("Usage: /ask <question>")
return
answer = await ai.generate(prompt)
await ctx.reply(answer)
bot.run_polling()
4. Webhook Verification (Flask / FastAPI)
from markanm import WebhookHandler, MarkanMWebhookError
handler = WebhookHandler(secret="whsec_YOUR_SECRET", timestamp_tolerance=300)
try:
# Verifies HMAC-SHA256 signature header and 300s timestamp tolerance
event = handler.process_event(request_body_text, request_headers.get("X-MarkanM-Signature"))
print(f"Event verified: {event.id} ({event.type})")
except MarkanMWebhookError as err:
print(f"Webhook error: {err}")
🧪 Testing
Run tests with pytest:
pytest sdk/python/tests/
📚 API Reference
For complete API endpoints and permission scope guidelines, visit: https://chat.markanm.com/developers/docs
Metadata
Release files for markanm 0.1.0a1
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 |
|---|---|---|---|---|
| markanm-0.1.0a1.tar.gz | 13.0 kB | With provenance | Details for markanm-0.1.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| markanm-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details for markanm-0.1.0a1-py3-none-any.whl |
Total release size: 26.0 kB
Release files / markanm-0.1.0a1.tar.gz
| Download URL | markanm-0.1.0a1.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
618c759e3f8f2747a3157e276ce392477f2190f9bafa98bfcccdbebbe5c39b41
|
|
BLAKE2b-256 checksum How to use checksums |
c48985f1d254ed520f60d892bf8fd33b940eeacff5081b8cea39be4798a811a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Sep 1, 2026.
Transparency logRelease files / markanm-0.1.0a1-py3-none-any.whl
| Download URL | markanm-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab4e9d5da9b78f09c462690a754ee8013be8fa05ce9db58d4b00878ad951e382
|
|
BLAKE2b-256 checksum How to use checksums |
04c86eb325f9ff93cd941b8ec871eb2c5c80c7b0bcd7759753a2c466f8ae73bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Sep 1, 2026.
Transparency logSecurity for markanm 0.1.0a1
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 markanm-0.1.0a1.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 Sep 1, 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.