Skip to content

niztg/dagpipy

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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!

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages