A simple API wrapper for your dad joke needs.
Project description
dadjokeAPI - A simple API for your dad joke needs.
Non-asynchronous usage:
from dadjokeAPI import searchDadJokes
from dadjokeAPI import getDadJoke
# Prints a dad joke with a random or specified ID.
# Raises JokeNotFoundException if the joke was not found.
print(getDadJoke("0189hNRf2g"))
# Prints a list of dad jokes with a random or provided term.
# Returns a empty list if no jokes were found.
print(searchDadJokes("fish"))
Asynchronous usage:
from dadjokeAPI import searchDadJokesAsync
from dadjokeAPI import getDadJokeAsync
# Prints a dad joke with a random or specified ID.
# Raises JokeNotFoundException if the joke was not found.
# Has an optional aiohttp.ClientSession argument called http
# in case you want to provide your session.
print(await getDadJokeAsync("0189hNRf2g"))
# Prints a list of dad jokes with a random or provided term.
# Returns a empty list if no jokes were found.
# Has an optional aiohttp.ClientSession argument called http
# in case you want to provide your session.
print(await searchDadJokesAsync("fish"))
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
dadjokeAPI-1.0.4.tar.gz
(2.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dadjokeAPI-1.0.4.tar.gz.
File metadata
- Download URL: dadjokeAPI-1.0.4.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cdd0af4776059f79f556da32f2ed1b72230ab7453505d7bdc23807b860190fd
|
|
| MD5 |
c59fdf97a02c09a89bc03e8cd709689f
|
|
| BLAKE2b-256 |
1eaec4647f299f159f0acd4c50d970533e0b0636e4b6b7b98278ec2fa66ccb65
|
File details
Details for the file dadjokeAPI-1.0.4-py3-none-any.whl.
File metadata
- Download URL: dadjokeAPI-1.0.4-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4b3f76946822d3503e97354dc56836f0758a35b0428e41cfb8404a7deb8976b
|
|
| MD5 |
b5fec815ab551210ecd89564bf01bb28
|
|
| BLAKE2b-256 |
6c7d0c483e0dc1aacb47f90d61d2398792e94baa468dbc1eec924a3569a9de5b
|