An asynchronous python API wrapper for Dagpi : https://dagpi.tk
Project description
An asynchronous python API wrapper for Dagpi : https://dagpi.tk
Installation
Install via pip, either directly from PyPI:
>>> python3 -m pip install -U aiodagpi
or from the github repository:
>>> python3 -m pip install -U git+https://github.com/DevilJamJar/aiodagpi
Alternatively, download files directly from download files. This is not recommended and can cause directory issues later down the line if not placed and constructed correctly. If you must, use this guide for help on how to install python packages.
Usage
Creating the client instance with your dagpi token:
from aiodagpi import aiodagpiclient
dagpi = aiodagpiclient('Dagpi Token')
Examples
Deepfrying an image:
async def deepfry(url:str):
image = await dagpi.animated('deepfry', url)
return image
Output:
{'success': True, 'url': 'http://dagpi.tk/bin/nKuT5rD0dj.gif'}
A full options list can be found in the docstring for each client method. or by using:
print(dagpi.get.__doc__)
Output:
Perform a GET request for one of the specified options
Args:
option (str): The option, possibles:
'wtp', 'logogame'
Raises:
InvalidOption: Invalid option provided
Returns:
str: The dictionary response to the GET request
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiodagpi-0.2.2.tar.gz
(6.3 kB
view hashes)