Skip to content

Latest commit

 

History

History
 
 

Jokes Automation

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Jokes Automation

In this we are using pyjokes which is a python library used to get jokes for programmers. We can also call it as a fun python library that can be used simply with some lines of code.

Note: It requires proper Internet connection for its working.

Install

Install with pip using any terminal

pip install pyjokes

Working

Import the pyjokes module in the Python file that you are going to get the jokes and then use the get_joke() function to easily get a random joke into your console/application.

import pyjokes

joke = pyjokes.get_joke()

print(joke)

To get jokes in a specific language and for a particular category though there are not many categories and language but we can use those that are available.

import pyjokes

joke = get_joke(language="es",category="neutral")

print(joke)

Options available for Language

Value Language Name
en English
de German
es Spanish
it Italian
gl Galician
eu Basque

Options available for Category

Value Category Detail
neutral Neutral geeky jokes
twister Tongue-twister
all All types of joke

Screenshots

In CLI

In PyCharm

Contributor

Umesh Singh