Skip to main content

Python SDK for the NeppedCord API

Project description

PyNepCord - NeppedAPI Python Library

PyNepCord is easy-to-use library that uses NeppedAPI.

Check the Docs directory for getting started guide, usage examples and API reference.

Basic usage

#!/usr/bin/python
# -*- coding: utf-8 -*-

from pynepcord.base import ImageSession


if __name__ == '__main__':
    key = 'your-api-token'
    session = ImageSession(key) # Create a session to get images
    image = session.get_image('happy') # get the image by the 'happy' category
    print(image.url) # display the URL of the picture in the terminal

async/await

#!/usr/bin/python
# -*- coding: utf-8 -*-

import asyncio
from pynepcord.aio import ImageSession
# pynepcord.base - the non-async version that uses `requests`.
# pynepcord.aio - same, but uses `aiohttp` and async/await syntax.


async def main():
    key = 'your-api-token'
    session = ImageSession(key)
    image = await session.get_image('happy')
    print(image.url)

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

License

MIT License

Copyright (c) 2020 NellyD3v

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

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

pynepcord-1.0.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

pynepcord-1.0.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pynepcord-1.0.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for pynepcord-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3a24e564a941580892bdc84f9a0e902354dcf694aa791c4fa015c2bd3f3c86ab
MD5 d1902e2aac49398c829839299dd821d0
BLAKE2b-256 2000f5a12164b220e64a9a4358ba3d5aa8ea285f544622c5e9b4bb791b689b45

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pynepcord-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for pynepcord-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 212972d61a6c9efe3ed702f9a59145d48626930212f0c9c5c0ebc58b7df02624
MD5 85b49e54c9064ccaa1b8f96e1931aa43
BLAKE2b-256 83edb3172a2007beba492f08bc9733f842411425d2151508bb1be964aae19464

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