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.2.0.tar.gz (20.0 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.2.0-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

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

Hashes for funkitpy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 023deacc40a234dc10b05996b0a130eb7794e81dff551351c91fb9ae477828e9
MD5 d550248124e348fdfa59b8139d708b3b
BLAKE2b-256 fc927dc82002549b04adc185bdf98b7e66efa88e83fe671cef240e494952122e

See more details on using hashes here.

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

Hashes for funkitpy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d9bcc2d386e466d9d70424d20af2d5771b34a07cb6708c6fc879e20a57bbe51
MD5 658647825575bbd5e8c8941318d7ccdc
BLAKE2b-256 9cea8f26a9e6f851022030a2b3c1d54c3aae90dfc5f431889a10c05c67959a70

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