Skip to main content

An asynchronous wrapper for interacting with the Dhravya API

Project description

DhravyaPy
Downloads

DhravyaPy is a basic, asynchronous wrapper for the DhravyaAPI

DhravyaPy works with Python 3.8+

Features

  • Easy to use OOP design
  • Get random jokes
  • Get random topics
  • Generate images and memes

Installation

To install the library through PyPi use:-

pip install dhravyapy

To install the development version(using git):-

pip install git+https://github.com/27Saumya/dhravyapy

Examples

To get a random joke

import dhravyapy
import asyncio

async def main():
    joke = await dhravyapy.Fun().joke()
    print(joke)


if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

To generate a qrcode

import dhravyapy
import asyncio

async def main():
    # the text of the qrcode(can be links or just normal text)
    text = "https://api.dhravya.me" 
    qrcode = await dhravyapy.Image().qrcode(text)
    # saving the image of the qrcode
    await qrcode.save("qrcode.png")


if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

For more examples see the examples directory.

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

dhravyapy-0.0.6.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

dhravyapy-0.0.6-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file dhravyapy-0.0.6.tar.gz.

File metadata

  • Download URL: dhravyapy-0.0.6.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.3 CPython/3.8.5

File hashes

Hashes for dhravyapy-0.0.6.tar.gz
Algorithm Hash digest
SHA256 c10e1680b7c8fb2b922fdcd4b16f773539223e05846994fbd2aaddce4549bcab
MD5 99e1a7112d02b3eb3188974789a25a46
BLAKE2b-256 50a8550944a678bb330e0c2289d0be60f3f1f244d0ad89444219ae8adb1d4794

See more details on using hashes here.

File details

Details for the file dhravyapy-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: dhravyapy-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.3 CPython/3.8.5

File hashes

Hashes for dhravyapy-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 32238f86a5e8bb3173ff6d4a2e74698f74f6e67738370ae6d14cb79787d9d529
MD5 4277ce86fa910890e20183e3215b9df5
BLAKE2b-256 bffd6eb473cbf9a4da192cccf3ad0ae2ba7e330dd5f6c07025ab3353f3dfba1b

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