Skip to main content

High-performance Misskey API framework

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

misspy-2024.4.1.tar.gz (23.0 kB view hashes)

Uploaded Source

Built Distribution

misspy-2024.4.1-py3-none-any.whl (30.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page