Skip to main content

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


Download files

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

Source Distribution

nekosbest-1.0.1.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nekosbest-1.0.1-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file nekosbest-1.0.1.tar.gz.

File metadata

  • Download URL: nekosbest-1.0.1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for nekosbest-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d6bdcdec1eff7e2cb449edff34e46803e0cd61777890ca540fe57510578a4880
MD5 32d378db02ad8543a76e1190e47f3415
BLAKE2b-256 24695bfc3c6ffaa15c94b1dc8387cb032d5817fc98accb773777b61bfecaa31f

See more details on using hashes here.

File details

Details for the file nekosbest-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: nekosbest-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for nekosbest-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 be0c14f020e2a7800ce4263f591ea32da170d3a5b507f934730db8d9f583fb3e
MD5 6fee0552a704a9db1abd3bad33a4ba9f
BLAKE2b-256 19b2e7eae9c6970d345297abb61925f99ed741b2ebd5c42591b5ff7e861390ac

See more details on using hashes here.

Supported by

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