# MiPAC

<a href="https://discord.gg/CcT997U"><img src="https://img.shields.io/discord/530299114387406860?style=flat-square&color=5865f2&logo=discord&logoColor=ffffff&label=discord" alt="Discord server invite" /></a>
<a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" /></a>
<a href="https://www.codacy.com/gh/yupix/MiPAC/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=yupix/MiPAC&amp;utm_campaign=Badge_Grade"><img src="https://app.codacy.com/project/badge/Grade/c9bf85f195f94ab58bc72ad018a2be9f"/></a>
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fyupix%2FMiPAC?
ref=badge_shield" alt="FOSSA Status">
<a><img src="https://img.shields.io/pypi/dm/MiPAC?label=PyPI"></a>
<img src="https://app.fossa.com/api/projects/
git%2Bgithub.com%2Fyupix%2FMiPAC.svg?type=shield"/></a>

## Overview

[日本語のREADMEもあります](./README_JP.md)

This library is the Core of MiPA.

MiPAC is an Api Wrapper that supports Misskey v11, 12, and 13.
It absorbs API differences between versions, etc., which you don't have to worry about originally.

> [!IMPORTANT]  
> MiPAC's development policy will be changed. Please see [this discussion](https://github.com/yupix/MiPAC/discussions/90) for more information.

## Supported Misskey

Indicators of support

|status|meaning|
|---|---|
|〇|Operation verified, priority support|
|△| confirmation of operation, add support for features as and when issues, etc. come in.|
|×|Not supported and not intended for use|

|name|version|supported|
|---|---|---|
|[Misskey Official](https://github.com/misskey-dev/misskey)|v13 or later|〇|
|[Misskey Official](https://github.com/misskey-dev/misskey)|v12|△|
|[Misskey Official](https://github.com/misskey-dev/misskey)|v11|△|

If you are using a non-official Fork and it is not working properly, please send us a link to your Fork repository and server in an Issue and we may be able to assist you.

## Usage

```python
import asyncio

from mipac.client import Client

async def main():
    client = Client(url, token)
    await client.http.login()
    api = client.api
    note = await api.note.action.send('Hello World')
    print(note.author.name, note.content)

if __name__ == '__main__':
    asyncio.run(main())
```

### Notes

### Python 3.12.0 final will be released and the minimum version will be changed to 3.12.0 after 3 months

This is mainly to improve the pace of development of MiPAC by using new syntax and other features to improve DX.
Users will also benefit from faster Python and the use of new syntax.

The current release of Python 3.12.0 is listed as follows, so the change will be implemented as early as **January 02, 2024**.

 > `3.12.0 final: Monday, 2023-10-02`

If you have an opinion on this, you can create a Discussion.

### Some server (instance) versions may not work properly.

One of the features of MiPAC is that it is created so that you do not have to worry about the changes that occur in each version of v11, v12, and v13 as much as possible. However, even in v13, which is the current latest version, some items have been removed or increased within v13. As a result, there may be some parts that have not been fully followed. Therefore, if you find such items, please send an Issue with the version of the server you are using and the name of the endpoint that cannot be used.

### It is not expected that you will instantiate the model yourself

MiPAC models often take `client` as a keyword argument and use it to generate the `api` property. However, since it is a feature in the middle of support, that part may be omitted, and `client` may be added as a necessary argument to instantiate the model after release. Also, other arguments may be changed to update the model. Therefore, we will not notify you about changes in arguments via CHANGELOG or other means.

## LICENSE

MiPAC is provided with [MIT LICENSE](./LICENSE).

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fyupix%2FMiPAC.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fyupix%2FMiPAC?ref=badge_large)

<p align="center">
    <a href="https://mipac.akarinext.org/">Documentation</a>
    *
    <a href="https://discord.gg/CcT997U">Discord Server</a>
</p>
