Skip to main content

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.

PyPI version Python versions License


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.

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/add-puns)
  3. Commit your changes (git commit -m 'Add pun support')
  4. Push to your branch (git push origin feature/add-puns)
  5. Open a Pull Request

Please make sure your code passes any existing tests before submitting.


Links


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

funkitpy-0.1.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

funkitpy-0.1.0-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file funkitpy-0.1.0.tar.gz.

File metadata

  • Download URL: funkitpy-0.1.0.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for funkitpy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 43823bb92c16d570799c4b5aaaa06fc2e7ad4e5407cf7cfb323d4bb152276b39
MD5 16374d62b6397ea457d9885f9d6e40ad
BLAKE2b-256 1171efa71eb1d0fcb20f4d1e1110bbb7522e6655b2caf67ac7bac6639c775310

See more details on using hashes here.

File details

Details for the file funkitpy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: funkitpy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for funkitpy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61ccf481751691f7ec7b26b2ceb2158c2fc3fd2ef7a304d219cee7da073565a2
MD5 60ed56f5eacc9515a53ac79c1d90380b
BLAKE2b-256 4111268bd76909d2100a48c6348f62d814e0c3d4288022f78472890236000ed0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page