A cool wrapper for Joke API
Project description
About:
joke Is a Python Wrapper that can deliver jokes to you.
Quickstart:
To grab the random 10 jokes, You can use joke.joke.joke.random_10
from joke import joke
result = joke.random_10() #Returns a list of dicts
for item in result: #Irritating through the list, now it returns a dict
print(item["question"]) #Prints the joke question
print(item["answer"]) #Prints the joke answer
print(item["type"]) #Print the type of the joke.
To grab 1 random joke, You can use joke.joke.joke.random
from joke import joke
result = joke.random() #Returns a dict with key value "question", "answer" and "type"
print(result["question"]) #Prints the joke question
print(result["answer"]) #Prints the joke answer
print(result["type"]) #Print the type of the joke
It can also be used in the command line.
>>> unknown@unknown % joke
Question: Why did the man run around his bed?
Answer: Because he was trying to catch up on his sleep!
Type: general
Installing:
pip install -U joke
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
joke-api-1.0.0.tar.gz
(2.9 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 joke-api-1.0.0.tar.gz.
File metadata
- Download URL: joke-api-1.0.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f66458d6eb05ccd9352c57976b66362b83937c39381cb7d7cd170d124105889
|
|
| MD5 |
7105845b816c1739962dc7bd94d764a7
|
|
| BLAKE2b-256 |
e07411db9bbe077bc231eb6a9b945ff58966374159163a80b6c7c40037134a10
|
File details
Details for the file joke_api-1.0.0-py3-none-any.whl.
File metadata
- Download URL: joke_api-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fed122e1ff0c3d62c6183a65d12d796bbbccdbf82010f163c35462950786744e
|
|
| MD5 |
0d33904db2c9fe47f732da6cfd01de26
|
|
| BLAKE2b-256 |
4869a66f80fc1903eb414a925ec7dc61fa47bfece3bb46fff1ccdf225e728d75
|