Skip to main content

Access jokes through python

Project description

laugh

Access a joke (or more) through python.

And what funnier joke than... Thor (for millennials), or Chuck Norris (for the X-gen).

But really, you can choose your own name to use in the joke.

Disclaimer: I say "joke", but don't make any promises on any of them actually being funny.

Examples

On your first import, it will print a random joke taken from [api.chucknorris.io], but replacing the name with "Thor", to fit with the times.

>>> import laugh  
Read! its what smart people do! but not Thor. He already is smart enough.

But you can choose your own name to mock. Let's say, "Chuck Norris" (the actual original name used in the source database).

>>> from laugh import NamedJokes
>>> joke_gen = NamedJokes('Chuck Norris')  # make a joke with any name
>>> joke_gen()
'Chuck Norris is, and has always been where it's at.''
>>> joke_gen(search_term='airplane')  # you can specify a (single) word to filter the random joke
'Chuck Norris invented airplanes because he was tired of being the only person that could fly.'

You can specify a (single) word to filter the random joke.

>>> joke_gen(search_term='airplane') 
MacGyver can build an airplane out of gum and paper clips. Chuck Norris can kill him and take it.

MacGyver can build an airplane out of gum and paper clips, but Chuck Norris can roundhouse-kick his head through a wall and take it.

911 happened when Chuck Norris threw a paper airplane

Chuck Norris never uses parachutes when he skydives out of airplanes because they only slow him down.

Before the Wright brothers made the first airplane, Chuck Norris had already invented the rocket and flown to Pluto, where he lived for 20 years.........naked

Chuck Norris invented airplanes because he was tired of being the only person that could fly.

September 11, 2001- The World Paper Airplane Throwing Championships were held in California...Chuck Norris won when his 4 best throws landed somewhere on the East Coast.

Chuck Norris can fly on an airplane to Maine from Hawaii in 30 seconds. he just has to tell the pilot to move over...

Chuck Norris doesn't use an airplane for travel, he simply turns of the gravity and farts

Chuck Norris dosent use airplanes to get to other countries, he just jumps from one continent to another.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

laugh-0.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file laugh-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: laugh-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for laugh-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a00fafeab08a2186376a6b57cc3cf5b08f177508c6391cafc9a68b61ca60ec86
MD5 5b56af6192cf939cc80fec6234140b8e
BLAKE2b-256 3f3601fcb0753e59e17a87ee3624e504b2ced1b255679f2e1ddb2eeaee6e8072

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page