Skip to main content

An asynchronous python API wrapper for Dagpi : https://dagpi.tk

Project description

Latest Travis build status Latest PyPI version MIT License link Dagpi.tk link Python version 3.6 and above

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

Authors

aiodagpi was written by Raj Sharma.

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

aiodagpi-0.2.3.tar.gz (6.3 kB view hashes)

Uploaded Source

Built Distribution

aiodagpi-0.2.3-py3-none-any.whl (8.9 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