misspy-dev / misspy

misspy is faster Misskey framework.

Home Page:https://misspy.xyz/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

misspy is faster Misskey framework.

https://misspy.xyz/

License:MIT License


Languages

Language:Python 96.4%Language:HTML 3.6%