Skip to main content

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.

Metadata

Release files for laugh 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for laugh 0.0.3
File Size Uploaded
laugh-0.0.3.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for laugh 0.0.3
File Interpreter ABI Platform
laugh-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / laugh-0.0.3.tar.gz

Download URL laugh-0.0.3.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5364f05d23498480a53ab7a330c3a9a085cf9fc32da31faa792bd4abda3cc867
BLAKE2b-256 checksum
How to use checksums
d16adda643bbeb59aad61b494c0f06d65c3d957f14904a7b751f23bdad758229
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / laugh-0.0.3-py3-none-any.whl

Download URL laugh-0.0.3-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
acc46f66e56bbd3e76cbf2626d80bff42611e6865f0d5e171ebcea47bdf56506
BLAKE2b-256 checksum
How to use checksums
5edc09d2dff556a776607259d617ab04387d4de54f27c0d765eec306de27c462
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page