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.2.tar.gz (6.3 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.2-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: laugh-0.0.2.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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.2.tar.gz
Algorithm Hash digest
SHA256 c06a26e33f75021d069ba112f9cb1d576d2b27a804cf8b16f2cb8a2f14548526
MD5 e72ce93f33e2e316a417ca05083f9124
BLAKE2b-256 5649067dc037edb320ab7d630389f7bf0f86d7d9507995cd8c4b1f1af3dc798d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: laugh-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a95f621dd4c884868df78b0a0b51c0dbbf0e124f99d7537773dfb568ca05492c
MD5 83b6a04d0164d94a648d933740d45b95
BLAKE2b-256 338080861c55a1e912231fddb170456523a682307034e21e8f0590c275e7fdcc

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