Skip to main content

Python client for the https://nekos.moe/ API

Project description

# PyNekos: a Python client for the Nekos.moe API PyNekos provides a simple and pythonic way to use the [Nekos.moe API](https://docs.nekos.moe/).

The full documentation for PyNekos can be found [here](https://github.com/ChoiYun/PyNekos/blob/main/docs/doc.md).

## Setup Some functionalities of the API needs authentication, used for post images and regenerate and get token. This way, if you pretend to use this functionalities, you’ll need to sign up for a (free) account that authorizes access to the Nekos.moe API. If you pretend to use only the simple functionalities (like get images informations, user informations, search for images, etc), you don’t need to pass nothing to the Neko class, see [usage](https://github.com/ChoiYun/PyNekos#usage) section below.

## Installation PyNekos requires Python 3.

Use pip to install the package from PyPI:

`bash pip install PyNekos `

## Usage Import the package and initiate the Neko class:

`python from PyNekos.nekosapi import Neko nyan = Neko() `

If you pretend to use more advanced functionalities of the API, you’ll need the token. To get the token, you’ll need your credentials:

`python from PyNekos.nekosapi import Neko nyan = Neko(username='myuser', password='iwillnotshowyouthis') token = nyan.get_token() print(token) `

After that, instance the object again with all informations:

`python from PyNekos.nekosapi import Neko nyan = Neko(token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", username="myuser", password="iwillnotshowyouthis") `

## Examples You can see the usage of all endpoints of the API in the [example files](https://github.com/ChoiYun/PyNekos/tree/main/examples).

## Contributing Please contribute! If you want to fix a bug, suggest improvements, or add new features to the project, just [open an issue](https://github.com/ChoiYun/PyNekos/issues) or send a pull request.

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

PyNekos-1.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file PyNekos-1.tar.gz.

File metadata

  • Download URL: PyNekos-1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for PyNekos-1.tar.gz
Algorithm Hash digest
SHA256 b9ec50a31f48128eaa20b2eeac82143f912c03e6d66df753eb9841caab107522
MD5 9733542ac38618c425b5225d1ac36d43
BLAKE2b-256 a4602bd74df62c1379d35620d16d1858eaca78ad117b581e7432a48cdda5329f

See more details on using hashes here.

Supported by

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