Skip to main content

surrealism module for Python

This module allows you to generate surreal sentences and error messages very easily from within your python programs.

Installation

If you have downloaded the source distribution, to install do the following at the commandline:

$ python setup.py install

Or using easy_install:

$ easy_install surrealism

And it will download and install the latest version from the Python Package Index.

Or pip:

$ pip install surrealism

And it will download and install the latest version from the Python Package Index.

Usage Examples

Generate a surreal sentence:

>>> import surrealism

>>> sentence = surrealism.get_sentence()

>>> print sentence

>>> If I can get the Pot Noodle to enter Radiohead's Lead Singer, the lego-brick will dilute Julian Assange and I'll be able to spy on Neil Armstrong!

You can also specify an integer representing the relevant row ID from the database in order to return a specific sentence:

>>> import surrealism

>>> sentence = surrealism.get_sentence(39)

>>> print sentence

>>> Don't drop things on X-Wings - get blood out of deep-fat friers!

Generate a surreal error message:

>>> import surrealism

>>> print surrealism.get_fault()

>>> thing.c:466: fearsome error in 'blow-up doll()' - missing thing-a-ma-jig.

You can also specify an integer representing the relevant row ID from the database in order to return a specific sentence:

>>> import surrealism

>>> print surrealism.get_fault(3)

>>> Traceback (most recent call last):  File '/party popper/fighter plane/glistening_seashell/anti-depressant.py', line 20, in straggly_particle accelerator.  waterproofError: salmon mousse did not deep-fry hand-drill.

Please feel free to leave bug reports and feature requests on the github homepage at https://github.com/Morrolan/surrealism.

All comments are welcome!

Release files for surrealism 1.0.1

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

Source distribution (sdist)

Source distribution for surrealism 1.0.1
File Size Uploaded
surrealism-1.0.1.tar.gz 152.7 kB Details

Release files / surrealism-1.0.1.tar.gz

Download URL surrealism-1.0.1.tar.gz
Size 152.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4f0e201fb381a12721ad39ee2be6f6a933ed7163c598f7181155946efd798e5b
BLAKE2b-256 checksum
How to use checksums
312a5e3902999778698f0e3c43bf29a3b7a1f7fed56bc5834c51b69f811e60f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

0.14.9

1 release file

0.14.1

1 release file

0.14.0

1 release file

0.13.3

2 release files

0.13.0

0.11.3

3 release files

0.11.2

3 release files

0.11.1

4 release files

0.11.0

4 release files

0.9.5

3 release files

0.9.4

3 release files

0.9.3

3 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

3 release files

0.6.0

3 release files

0.5.6

2 release files

0.5.5

3 release files

0.5.4

2 release files

0.5.2

3 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4

2 release files

0.3

2 release files

0.2

1 release file

0.1

1 release file

0.0.1

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