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.1.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.1-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: funkitpy-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 a05aa124043a4f8a9961e6a5411ab2894ace461ffa6cfca94ccfe6a6733ee476
MD5 c02b826f4ffb46b45668a8bd58fe2b0a
BLAKE2b-256 a3c7498d8c0e3780a97086f76f02a3951efbd12e2d958a0577fe69e66915b619

See more details on using hashes here.

File details

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

File metadata

  • Download URL: funkitpy-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 73ff990140570ee7d17f0e7cbdc708621daa1b12f1a8fd3699e5e590bf5dfeb9
MD5 7648b690c7a3834f5427a4d73ffbc8bc
BLAKE2b-256 69ed9145f3a303c9c59ddfe74feaf62c44f1f97dbeb21160d9ffe1acc60bb920

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