cowspam
A small, silly, screen-cluttering Python library derived from Cowsay. By Ian Rodriguez.
Cowsay was originally created by Tony Monroe, and its Python port by multiple contributors is available as a GitHub repo. The purpose of cowspam is a personal challenge to see how far I can go with making a derivative of such a small, niche library.
Requires pip and Python 3.12 or later. From the project directory, build with these commands:
python -m pip install .
cowspam --help
Or build a distributable package:
python -m pip install build
python -m build
Library
from cowspam import Cow, make_cow_text, run_kilobytes
cow = Cow("Bessie")
cow.moo()
text, is_normal = make_cow_text()
counts, bytes_generated = run_kilobytes(1, write_output=False) # Generates 1 KB of cowsay spam
COWSAY_CHARS- List of alternate characters for anomalous cows (the regular cow isn't in this list).Cow- Fundamental dataclass of this silly little library. Set itsnameand optionally itsage;.moo()prints a moo (and the age for normal cows), while.speak(str)prints your message.clear_screen()- Clear the screen to make room for another Cow.main()- Carries the CLI; by default, prints out 100 Cows to terminal.make_cow_text()- Build a Cow with a random name, then return its moo text and whether it's normal. By default, normality is random; setnormal_only=Trueto guarantee a normal cow.print_tally()- Print a tally from aCounterobject.rand_cow_name()- Pick a random cow name from the bundled name list.run_kilobytes()- Generate cows until at least the requested number of kilobytes is produced; optionally, write them to standard output.
CLI Commands
-h / --help- View commands(loops)- Positional argument; enter a number of cows to generate, either to terminal or piped to a file. Default: 100.-a / --auto- Run without a 1-second delay between cowsay prints; automatic for piped-f / --flash- (Epilepsy warning) Clear the screen for each cow print, creating a flashing effect-k / --kb / --kilobytes X- Alternative to loops: generate cowsay prints until X amount is generated in kilobytes.-n / --normal- Only generate normal cows
Metadata
Release files for cowspam 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cowspam-1.0.1.tar.gz | 7.6 kB | With provenance | Details for cowspam-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cowspam-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for cowspam-1.0.1-py3-none-any.whl |
Total release size: 15.8 kB
Release files / cowspam-1.0.1.tar.gz
| Download URL | cowspam-1.0.1.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d52420c8da29504b0edfd1a5348b9657138046c9339386023d1d2590cf99517
|
|
BLAKE2b-256 checksum How to use checksums |
aecb5b2e35a8e55664b00282ccac75e6711d4623b09a30f810043a31863db65b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logRelease files / cowspam-1.0.1-py3-none-any.whl
| Download URL | cowspam-1.0.1-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe72edb40b044c162c4ef2276302893477ff608380cc7178e55a614ff095131c
|
|
BLAKE2b-256 checksum How to use checksums |
9c363e13954d03ca11aa15b29d122352df144e018d4d417f17d2beb55ae361c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logSecurity for cowspam 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for cowspam-1.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.