A simple async Python wrapper for nekos.best API.
Project description
nekos-best.py
A simple async Python wrapper for nekos.best API.
Join the official Discord server here.
Requirements
- aiohttp (>=3.6.2)
Installation
Make sure to have pip installed in your environement. It will also install all requirements.
pip install nekosbest
Example
import asyncio
from nekosbest import Client
client = Client()
async def get_single_image(category: str):
result = await client.get_image(category)
print(result)
async def get_multiple_images(category: str, amount: int):
result = await client.get_image(category, amount)
print(result)
loop = asyncio.get_event_loop()
loop.run_until_complete(get_single_image("nekos"))
# <Result url=https://nekos.best/nekos/0162.png>
loop.run_until_complete(get_multiple_images("nekos", 5))
# <Result url=['https://nekos.best/nekos/0277.png', 'https://nekos.best/nekos/0339.png', 'https://nekos.best/nekos/0391.png', 'https://nekos.best/nekos/0245.png', 'https://nekos.best/nekos/0225.png']>
Migrate from 0.x.x to 1.0.0
Client.teardown has been removed, it is no longer needed to pass it when closing.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nekosbest-1.0.0.tar.gz.
File metadata
- Download URL: nekosbest-1.0.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.1 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
921c4f0f495f79f6084a2580e9212abc43f687ae050681eb1d1cd78a2754bd53
|
|
| MD5 |
1988d7e7b82967f968225430e38fc685
|
|
| BLAKE2b-256 |
74838c6121d7072977cc8c7d1d3e89739b0f0b8bc4582244aefa42ab674b1596
|
File details
Details for the file nekosbest-1.0.0-py3-none-any.whl.
File metadata
- Download URL: nekosbest-1.0.0-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.1 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
334b3021596d213782836246b9b9ed94fc266c9fb309248bc8eb79949bc13ed4
|
|
| MD5 |
e900bea2eb4e7a1b2b85ae10997f8abe
|
|
| BLAKE2b-256 |
29ce09e565e2fe3ad90f8a69dbeed9d52d2e5bd2db9b381fcecd58c61cb7c64a
|