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.
Misskey forks not listed below are supported only in the latest version provided they are API compatible.
- misskey
- misskey (misskey.io)
firefish (calckey) (Some APIs may not be compatible with some APIs due to missing documentation regarding firefish API specifications.)
Other examples can be found in the examples directory.
import misspy
mi = misspy.Bot(address, i=token)
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()
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)
Documentation can be found at: https://docs.misspy.xyz/
below 3.7 | 3.8 ~ 3.11 | 3.12 | |
---|---|---|---|
supported | ❌ | ⭕ | ⭕ |
supported misspy version | ❌ | 2023.8.24rc1~latest | latest |
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).