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 dhravya
import asyncio

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


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

To generate a qrcode

import dhravya
import asyncio

async def main():
    # the text of the qrcode(can be links or just normal text)
    text = "https://api.dhravya.me" 
    qrcode = await dhravya.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.9.tar.gz (8.4 kB view hashes)

Uploaded Source

Built Distribution

dhravyapy-0.0.9-py3-none-any.whl (14.2 kB view hashes)

Uploaded Python 3

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