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 Distribution

laugh-0.0.3.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

laugh-0.0.3-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file laugh-0.0.3.tar.gz.

File metadata

  • Download URL: laugh-0.0.3.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for laugh-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5364f05d23498480a53ab7a330c3a9a085cf9fc32da31faa792bd4abda3cc867
MD5 3d3ec3c60cc4e692b3e389f5f9ce73b1
BLAKE2b-256 d16adda643bbeb59aad61b494c0f06d65c3d957f14904a7b751f23bdad758229

See more details on using hashes here.

File details

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

File metadata

  • Download URL: laugh-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for laugh-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 acc46f66e56bbd3e76cbf2626d80bff42611e6865f0d5e171ebcea47bdf56506
MD5 7493ead3cb84d76ef2c7bc259c26f9db
BLAKE2b-256 5edc09d2dff556a776607259d617ab04387d4de54f27c0d765eec306de27c462

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