High-performance Misskey API framework


Keywords
misskey, misskey-api, misskey-bot, python
License
MIT
Install
pip install misspy==2023.10.2

Documentation

misspy

Supported Python Version PyPI version PyPI Downloads Code style: black Misskey-API

Important

A major rewrite is currently underway here. The current version will undergo only minimal maintenance and bug fixes.

Misskey API library for Python with StreamingAPI support.

supported software

Misskey forks not listed below are supported only in the latest version provided they are API compatible.

example

Other examples can be found in the examples directory.

send note

import misspy

mi = misspy.Bot(address, i=token)

Output notes text to the console

import misspy

bot = commands.Bot("misskey.example", "token")

async def on_ready():
    print("loggedin: ")
    print("id: "+ bot.id)
    print("name: "+ bot.name)
    print("username: "+ bot.username)
    await bot.connect(misspy.localTimeline) # supported args: misspy.homeTimeline, misspy.localTimeline, misspy.socialTimeline or misspy.hybridTimeline, misspy.globalTimeline and Conventional Method


async def on_note(ctx, message):
    if message["text"] == "test":
        await ctx.add_reaction(":test:")
    print("------------")
    print(message)
    print("------------")

bot.add_hook("ready", on_ready)
bot.add_hook("note", on_note)

bot.run()

MiAuth

from misspy import MiAuth

mia = MiAuth("misskey.io")
print(mia.generate_url("example app"))
while True:
    input("enter to continue...")
    try:
        token = mia.check()
        break
    except misspy.MiAuthFailed:
        pass
print(token)

Other

docs

Documentation can be found at: https://docs.misspy.xyz/

supported python version

below 3.7 3.8 ~ 3.11 3.12
supported
supported misspy version 2023.8.24rc1~latest latest

supported misskey versions

This library is developed based on the API specification for Misskey v13 or later, so v12 and earlier are not supported (but you may still be able to use this library).