AioMoe
Fully asynchronous trace.moe API wrapper
Installation
You can install the stable version from PyPI:
$ pip install aiomoe
Or get it from github:
$ pip install https://github.com/FeeeeK/aiomoe/archive/refs/heads/master.zip
Usage
Get info about your account
import asyncio
from aiomoe import AioMoe
tm = AioMoe() # or AioMoe(token="xxxxxxxx")
async def main():
me = await tm.me()
print(me)
print(f"Used quota: {me.quota_used}/{me.quota}")
asyncio.run(main())
The output will be like this:
User(error=None, id='your ip', priority=0, concurrency=1, quota=1000, quota_used=0)
Used quota: 0/1000
Search anime
import asyncio
from aiomoe import AioMoe
tm = AioMoe()
async def main():
image = "https://i.imgur.com/Xrb06w5.png"
search_results = await tm.search(file_source=image, anilist_info=True)
print(search_results.result[0].anilist.title.romaji)
# 'Steins;Gate 0'
asyncio.run(main())
You can pass a link to an image, bytes or file-like object (io.BytesIO)
with open("image.png", "rb") as file:
search_results = await tm.search(file)
And use additional parameters such as:
- anilist_info - Return an
Anilistobject instead of anilist id - cut_borders - Cut out black borders from screenshots
- anilist_id - Filter results by anilist id
See Also
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
License
Released under the MIT license.
Copyright by FeeeeK.
Metadata
Release files for aiomoe 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aiomoe-1.0.4.tar.gz | 5.8 kB | Without provenance | Details for aiomoe-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiomoe-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for aiomoe-1.0.4-py3-none-any.whl |
Total release size: 12.8 kB
Release files / aiomoe-1.0.4.tar.gz
| Download URL | aiomoe-1.0.4.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9793e6d4b2cf73a7ee8ee1a14a21fee69f02dbedc5be81b02757cb7909fa39de
|
|
BLAKE2b-256 checksum How to use checksums |
2edcb92ab837ed36ec91c8efdd8534b10c02609039ca8cdd069fc87d2217cca7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.5 CPython/3.8.10 Windows/10
|
Release files / aiomoe-1.0.4-py3-none-any.whl
| Download URL | aiomoe-1.0.4-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d87a0dc2d6bf49f883c00ec9d7d8c2e5c23b685ecaee3849a703a27f38b3992
|
|
BLAKE2b-256 checksum How to use checksums |
64bd8ec9c36e70707ea0d7685138e1ab3cb50cd6d1a5c1164a0c5fcfeef460b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.5 CPython/3.8.10 Windows/10
|
Security for aiomoe 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.