Skip to main content

A library for African jokes

Project description

africanjokes 🌍

PyPI version Downloads GitHub Actions Status License: MIT

africanjokes is a simple, lightweight Python library that delivers random African jokes —
because every coder deserves a laugh, especially from the Motherland.
Spread joy, lighten up your day, and code with a smile! 😄



📚 Table of Contents


📦 Installation

Get started instantly with pip:

pip install africanjokes

🤔 What is africanjokes?

africanjokes brings the vibrant humor of Africa right into your terminal, scripts, bots, or applications.

Perfect for:

  • Coding sessions 👨‍💻
  • Presentations 🗣️
  • Discord/Telegram bots 🤖
  • Slack integrations 💬
  • Daily CLI jokes ☀️

Whether you're looking to break the ice or just need a pick-me-up, africanjokes has you covered!


🚀 Quickstart

Use in Python

import africanjokes

joke = africanjokes.get_joke()
print(joke)

Use from Command Line

africanjokes --joke

Get a new random African joke every time you run it!


🖥️ CLI Usage

africanjokes comes with a handy command-line interface.

Commands

  • --joke or -j
    Output a random African joke.

  • --version or -v
    Show the current africanjokes version.

  • --help or -h
    Display help message and usage.

Example Output

$ africanjokes --joke
Why did the chicken cross the road in Lagos? To buy suya on the other side!

$ africanjokes --version
africanjokes version 1.0.0

$ africanjokes --help
Usage: africanjokes [OPTIONS]
Options:
  --joke, -j      Show a random African joke
  --version, -v   Show version info
  --help, -h      Show this help message

👀 Preview

Here’s what you get when you use africanjokes:

import africanjokes

print(africanjokes.get_joke())
# Output: Why did the goat refuse to leave the party? Because it was the G.O.A.T!

🐍 Python Version Compatibility

africanjokes supports:

  • Python 3.7+
  • Works on Windows, macOS, and Linux

🤖 CLI Testing Automation

CLI commands are tested automatically using pytest and pytest-console-scripts.

Example test (see tests/test_cli.py):

def test_cli_joke(script_runner):
    result = script_runner.run('africanjokes', '--joke')
    assert result.success
    assert "Why" in result.stdout 

🛠️ Contributing

Got a great African joke to share?
Help us keep the laughter flowing — contributions are welcome!

  1. Fork the repo
  2. Add your joke
  3. Submit a PR

See CONTRIBUTING wiki for full details.


📄 License

This project is licensed under the MIT License — free to use, modify, and distribute.


👤 Author

Morris D. Toclo
Co-Founder & Co-CEO of LoneScore
Student — BlueCrest University College Liberia
Monrovia, Liberia 🇱🇷


🌐 Connect with Me


💖 Support & Spread Laughter

If you enjoy using africanjokes, please:

  • ⭐ Star the repo
  • 🛠️ Contribute your own jokes
  • Buy Me a Coffee
  • 📣 Share it with your community

Let’s spread African joy — one joke at a time.
Made with ❤️ in Africa.


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

africanjokes-1.0.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

africanjokes-1.0.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file africanjokes-1.0.0.tar.gz.

File metadata

  • Download URL: africanjokes-1.0.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for africanjokes-1.0.0.tar.gz
Algorithm Hash digest
SHA256 55563e2b0bc7386523ced14d1cf5643a010f5f1cdad4d72f7f036bd2e81e0285
MD5 ea2260c6b1f682f7bef9d0871268b4a2
BLAKE2b-256 8486b5e30dbf883d04cfa7e690a4dfac9a1bf419d98faf74fc90ccfc0a6cb993

See more details on using hashes here.

File details

Details for the file africanjokes-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: africanjokes-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for africanjokes-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2528673be330dc05657ebd67e242cfc4f463e7a5f15170583cc0e8fb1d2e5b6
MD5 3631f950de6f6109516e4b2af7ad56d7
BLAKE2b-256 dfa908442cba80f45e83a2edeaa418b579428ca2e26ac5f98779447a53ae3e8c

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