A library for African jokes
Project description
africanjokes 🌍
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
- What is africanjokes?
- Quickstart
- Contributing
- License
- Author
- Connect with Me
- Support & Spread Laughter
📦 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
-
--jokeor-j
Output a random African joke. -
--versionor-v
Show the current africanjokes version. -
--helpor-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!
- Fork the repo
- Add your joke
- 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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55563e2b0bc7386523ced14d1cf5643a010f5f1cdad4d72f7f036bd2e81e0285
|
|
| MD5 |
ea2260c6b1f682f7bef9d0871268b4a2
|
|
| BLAKE2b-256 |
8486b5e30dbf883d04cfa7e690a4dfac9a1bf419d98faf74fc90ccfc0a6cb993
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2528673be330dc05657ebd67e242cfc4f463e7a5f15170583cc0e8fb1d2e5b6
|
|
| MD5 |
3631f950de6f6109516e4b2af7ad56d7
|
|
| BLAKE2b-256 |
dfa908442cba80f45e83a2edeaa418b579428ca2e26ac5f98779447a53ae3e8c
|