Skip to main content

A Python API Wrapper for https://dagpi.xyz/, the fast and free image API.

Project description

dagpipy

A Python API Wrapper for https://dagpi.xyz/, the fast and free image API.
dagpipy docsdagpi docsexamples

Getting a token

  • Go to https://dagpi.xyz/dashboard
  • Sign up
  • Create an app
  • Wait for a few days/weeks
  • Check back to see if you have your token. If so, you're free to continue!

Instantiate a Client

import dagpipy

client = dagpipy.Client(TOKEN)

Image API

Where url is equal to:

from PIL import Image

bad = client.get_image(
    option=dagpipy.ImageOptions.bad,
    url=url
)

bad_image = Image.open(bad)
bad_image.show()
Returns:


from PIL import Image

tweet = client.get_image(
    option=dagpipy.ImageOptions.tweet,
    url=url,
    username="dagpipy",
    text="amazing"
)

tweet_image = Image.open(tweet)
tweet_image.show()
Returns:


from PIL import Image

whyareyougay = client.get_image(
    option=dagpipy.ImageOptions.whyareyougay,
    url=url,
    url2=url
)

whyareyougay_image = Image.open(whyareyougay)
whyareyougay_image.show()
Returns:


Data/Games API

wtp = client.get_game(
    option=dagpipy.Games.whos_that_pokemon
)
print(wtp.name)
print(wtp.question)
print(wtp.answer)
print(wtp.types)
print(wtp.abilities)
print(wtp.ascii)
Returns:
Kecleon
https://logoassetsgame.s3.us-east-2.amazonaws.com/wtp/pokemon/281q.png
https://logoassetsgame.s3.us-east-2.amazonaws.com/wtp/pokemon/281a.png
['normal']
['color change', 'protean']
@@@@@@@@@@@@@@@@@@@@@@@@,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@:.?@@@+.%@,,:@@@@%:@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@.*+@@....?....,,:,:,:::%@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@:.........**,,,**%::::#+:,%@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@.*.....****,,,******,:::::@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@,,,...*.S:.,,:*******S:::.%?S@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@,,S,:::*#,,S*********:::::,@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@,,,:%,,,,,,,,,,::.****:::::,@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@S,@,,,,,%,.,+:::::.:,****:::::,@@@@@@@@@@@@@@@@@@@@@@
@@@@@@%,,,,,:::::%,S::S?::*:,***S::,.@@@@@@@@@@@@@@@@@@@@@@@
@@@@@S,,,#:::::::.,:**#??**#:***.@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@*,,,::::::::::*:.**.***%:***,@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@.::*:,,,,:S%:***?::+.***:S***,@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@+****:..:::S+::::S?+*****@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@,#:********%*::******%@,.@@@.@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@:.:*************?******,@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@.......*:****.***%.@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@#::*%****::******+.%,,@@@@@@@@@@@@@@@@@@@@@@@
@@@@:?%.:,,:::::***:*.:::***?..*#:,,@@@@@@,#:::**:::?@@@@@@@
@,%*******+?*::::::::::****+.**SSSS+@@@@::*.***...*******@@@
@@.@@@..#****************:*.SSSSS#+SS*@%:**.#*******+***.%@@
@@@@@@@@@@@@@@:#+******:+S#SSSSS%***+*?********...***..***%@
@@@@@@@@@@@@@@@@@@@*.+SSSSSSS**+:#*****?**.**.****.***.****@
@@@@@@@@@@@@@@@@@@@?...+**.+***:,#:::*****?****S**..**..***+
@@@@@@@@@@@@@@@@@@@:**S**********::::%**%**.*****.****.****@
@@@@@@@@@@@@@@@@@@@::%*************?.****************%****#@
@@@@@@@@@@@@@@@@@@@?::::%*************?.....*****...*****#@@
@@@@@@@@@@@@@@@@@@@@*::::*****+,@,?......**************:@@@@
@@@@@@@@@@@@@@@@@@@@@@+*******.@@@@@@.:**************.@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@:****#@@@@@@@@@@@@@@..S,,@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@#?,*??@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

joke = client.get_game(
    option=dagpipy.Games.joke
)
print(joke.id)
print(joke.joke)
Returns:
41914
What do you call a midget physic that has escaped from prison?? A small medium at large

Consult the docs for more information on how to use this module!

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

dagpipy-1.1.1.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

dagpipy-1.1.1-py3-none-any.whl (7.4 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