Skip to main content

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!

Release files for dagpipy 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dagpipy 1.1.1
File Size Uploaded
dagpipy-1.1.1.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dagpipy 1.1.1
File Interpreter ABI Platform
dagpipy-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.7 kB

Release files / dagpipy-1.1.1.tar.gz

Download URL dagpipy-1.1.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5b8312234c94792597d88163e56d02115727437afe68deda8226fdbd0c12e2f9
BLAKE2b-256 checksum
How to use checksums
cbe7e6a65cb42b03517ab7aeeb282dd591d811e78cf5cf8581d143deb78c58c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3rc1

Release files / dagpipy-1.1.1-py3-none-any.whl

Download URL dagpipy-1.1.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93860ec23d32e65d9112de66807d243f5da45db120ab4b2fcfcef65f22b2cd8e
BLAKE2b-256 checksum
How to use checksums
23e163bc8fdee60fb07b3a762015bd0d8d898dfabe589cd23a078bc382bab974
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3rc1

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page