An asynchronous wrapper for interacting with the Dhravya API
Project description
DhravyaPy
DhravyaPy is a basic, asynchronous wrapper for the DhravyaAPI
Features
- Easy to use OOP
- Get random jokes
- Get random topics
- Generate images and memes
Prerequisites
- Python 3.8+
- requirements.txt
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():
qrcode = await dhravyapy.Image().qrcode("https://api.dhravya.me")
await qrcode.save("qrcode.png")
if __name__ == __main__:
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
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.1.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for dhravyapy-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 118c5075ed06f8d036759f763fae301135b5a8d6babb30319a3729ff8b23573b |
|
MD5 | e0dbff561f3d1479741b577b28f72110 |
|
BLAKE2b-256 | 0ce6c8c7feb25789f3de02819154c153cef07d2723314705ccee9019b4ca7392 |