An asynchronous wrapper for interacting with the Dhravya API
Project description
DhravyaPy
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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
dhravyapy-0.0.9-py3-none-any.whl
(14.2 kB
view details)
File details
Details for the file dhravyapy-0.0.9.tar.gz.
File metadata
- Download URL: dhravyapy-0.0.9.tar.gz
- Upload date:
- Size: 8.4 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3af92fa26904d6eb2fc5a063d7882a778bcb650d5bcf297a232752614751fe6
|
|
| MD5 |
95c5faff4aa69201e3451b3878cdbdad
|
|
| BLAKE2b-256 |
c874bc0ed0bcec8fa8d446d75dbd67cfaec96b5b7cf7cb7f5cc13b54ca89ab9f
|
File details
Details for the file dhravyapy-0.0.9-py3-none-any.whl.
File metadata
- Download URL: dhravyapy-0.0.9-py3-none-any.whl
- Upload date:
- Size: 14.2 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a07290154477aac35d958a9430dffe3ad8859d38b30317599c629b2acd8d34d
|
|
| MD5 |
34ca1a1b99554ad5abc58f92924c2b41
|
|
| BLAKE2b-256 |
8c466749900ff49acfaab5bb9df4e9c32d6a2ec9fd3b7a4d981aa50cc5676ffb
|