A lightweight Python toolkit for fetching and generating jokes, dad jokes, and roasts.
Project description
FunKitPy
A lightweight Python library for jokes, dad jokes, and roasts โ bring the laughs to your Python projects.
Table of Contents
Features
- ๐ญ Random Jokes โ Fetch a random joke from a curated collection
- ๐จ Dad Jokes โ Classic, groan-worthy dad jokes on demand
- ๐ฅ Roasts โ Playful roasts for light-hearted banter
- ๐ฆ Zero dependencies โ Pure Python, no external packages required
- โก Fast & lightweight โ All data is bundled locally, no network calls needed
Installation
Install FunKitPy from PyPI using pip:
pip install FunKitPy
Requires Python 3.8 or higher.
Quick Start
from funkitpy import get_joke, get_dad_joke, get_roast
# Get a random joke
print(get_joke())
# Get a dad joke
print(get_dad_joke())
# Get a roast
print(get_roast())
Usage
Random Jokes
from funkitpy import get_joke
joke = get_joke()
print(joke)
# Output: "Why don't scientists trust atoms? Because they make up everything!"
Dad Jokes
from funkitpy import get_dad_joke
joke = get_dad_joke()
print(joke)
# Output: "I'm reading a book about anti-gravity. It's impossible to put down."
Roasts
from funkitpy import get_roast
roast = get_roast()
print(roast)
# Output: "I'd roast you, but my mom said I'm not allowed to burn trash."
API Reference
get_joke() -> str
Returns a random joke from the built-in collection.
from funkitpy import get_joke
joke = get_joke() # str
get_dad_joke() -> str
Returns a random dad joke.
from funkitpy import get_dad_joke
joke = get_dad_joke() # str
get_roast() -> str
Returns a random playful roast.
from funkitpy import get_roast
roast = get_roast() # str
Project Structure
funkitpy/
โโโ funkitpy/
โ โโโ __init__.py
โ โโโ jokes.py
โ โโโ dad_jokes.py
โ โโโ roasts.py
โ โโโ data/
โ โโโ jokes.json
โ โโโ dad_jokes.json
โ โโโ roasts.json
โโโ tests/
โ โโโ test_jokes.py
โ โโโ test_roasts.py
โโโ pyproject.toml
โโโ demo.py
โโโ LICENSE
โโโ README.md
Contributing
Contributions are welcome! Whether it's adding new jokes, fixing bugs, or improving the docs โ all help is appreciated.
- Fork the repository
- Create a new branch (
git checkout -b feature/add-puns) - Commit your changes (
git commit -m 'Add pun support') - Push to your branch (
git push origin feature/add-puns) - Open a Pull Request
Please make sure your code passes any existing tests before submitting.
Links
- Homepage: github.com/fmasterpro27/FunKitPy
- Issues: github.com/fmasterpro27/FunKitPy/issues
- PyPI: pypi.org/project/funkitpy
License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
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
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 funkitpy-0.2.0.tar.gz.
File metadata
- Download URL: funkitpy-0.2.0.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
023deacc40a234dc10b05996b0a130eb7794e81dff551351c91fb9ae477828e9
|
|
| MD5 |
d550248124e348fdfa59b8139d708b3b
|
|
| BLAKE2b-256 |
fc927dc82002549b04adc185bdf98b7e66efa88e83fe671cef240e494952122e
|
File details
Details for the file funkitpy-0.2.0-py3-none-any.whl.
File metadata
- Download URL: funkitpy-0.2.0-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d9bcc2d386e466d9d70424d20af2d5771b34a07cb6708c6fc879e20a57bbe51
|
|
| MD5 |
658647825575bbd5e8c8941318d7ccdc
|
|
| BLAKE2b-256 |
9cea8f26a9e6f851022030a2b3c1d54c3aae90dfc5f431889a10c05c67959a70
|