A Python package for categorized one-liner jokes.
Project description
PyJoker
PyJoker is a Python package that provides categorized one-liner jokes. You can either get a random joke or a joke from a specific category like dad, tech, etc.
Installation
You can install the package via pip after it's published to PyPI:
pip install pyjoker
Alternatively, if you're developing locally, you can install it by navigating to the project directory and running:
pip install .
Usage
Here’s how you can use PyJoker:
Get a Random Joke
To get a random joke, call the get_joke() function with 'rand' as the argument:
import pyjoker
# Get a random joke
print(pyjoker.get_joke('rand'))
Get a Joke from a Specific Category
To get a joke from a specific category, pass the category name as a string. Example categories include:
1. puns
2. observational
3. deprecating
4. dark
5. sarcasm
6. dad
7. relationships
8. surreal
9. topical
10. tech
11. office
12. animal
import pyjoker
# Get a random 'dad' joke
print(pyjoker.get_joke('dad'))
# Get a random 'tech' joke
print(pyjoker.get_joke('tech'))
------
Make sure to pass the category name as a string (e.g., 'dad').
License
This project is licensed under the MIT License.
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
pyjoker-0.1.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
pyjoker-0.1.0-py3-none-any.whl
(36.4 kB
view details)
File details
Details for the file pyjoker-0.1.0.tar.gz.
File metadata
- Download URL: pyjoker-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
059a6f4ea7ce3c856cd36e705ad51fd78718832e3dece0f6b31900ba25950104
|
|
| MD5 |
15d54a938ca2f9417737ecb3f5890fd0
|
|
| BLAKE2b-256 |
619be46454f1920d8145b4a214bf18b72eaf270d5fc000ec0c17a03f87af0245
|
File details
Details for the file pyjoker-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyjoker-0.1.0-py3-none-any.whl
- Upload date:
- Size: 36.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e12387e8a81083d4196cf65f2052c749621fe05fc39dae4ff1285cbce9ee317
|
|
| MD5 |
bcc6151036def822a7c32100247bebce
|
|
| BLAKE2b-256 |
520c359c0ef5a0dd9e928efb57f064b806f30c4f6fe993ca979611ccc5f003cb
|