https://github.com/vaasudevans/cowsay-python
The famous cowsay 🐮 for GNU/Linux is now available for python
https://github.com/vaasudevans/cowsay-python
cowsay python
Last synced: 6 days ago
JSON representation
The famous cowsay 🐮 for GNU/Linux is now available for python
- Host: GitHub
- URL: https://github.com/vaasudevans/cowsay-python
- Owner: VaasuDevanS
- License: gpl-3.0
- Created: 2017-05-08T10:38:52.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2024-12-27T01:12:44.000Z (5 months ago)
- Last Synced: 2025-05-15T07:06:59.683Z (6 days ago)
- Topics: cowsay, python
- Language: Python
- Homepage: https://pypi.org/project/cowsay
- Size: 272 KB
- Stars: 166
- Watchers: 5
- Forks: 52
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/VaasuDevanS/cowsay-python/actions/workflows/cowsay.yaml)
[](https://codecov.io/gh/VaasuDevanS/cowsay-python)
[](https://app.codacy.com/gh/VaasuDevanS/cowsay-python/dashboard)

[](https://github.com/VaasuDevanS/cowsay-python)

[](https://pepy.tech/project/cowsay)
[](https://pepy.tech/project/cowsay)
[](https://pepy.tech/project/cowsay)# Introduction
A python API / Command-line tool for the famous linux `cowsay`.
Take a look at [CHANGELOG.md](https://github.com/VaasuDevanS/cowsay-python/blob/main/CHANGELOG.md) for the changes.# Brief History
`cowsay` for GNU/Linux was initially written in perl by Tony Monroe. More info
[here](https://en.wikipedia.org/wiki/Cowsay).# Installation
```console
pip install cowsay
```# API Usage
```pycon
>>> import cowsay>>> cowsay.cow('Hello World')
___________
| Hello World |
===========
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||>>> print(cowsay.get_output_string('cow', 'Hello World'))
___________
| Hello World |
===========
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||>>> cowsay.cow('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris blandit rhoncus nibh. Mauris mi mauris, molestie vel metus sit amet, aliquam vulputate nibh.')
_________________________________________________
/ \
| Lorem ipsum dolor sit amet, consectetur adipiscin |
| g elit. Mauris blandit rhoncus nibh. Mauris mi ma |
| uris, molestie vel metus sit amet, aliquam vulput |
| ate nibh. |
\ /
=================================================
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||>>> my_fish = r'''
\
\
/`·.¸
/¸...¸`:·
¸.·´ ¸ `·.¸.·´)
: © ):´; ¸ {
`·.¸ `· ¸.·´\`·¸)
`\\´´\¸.·´
'''>>> cowsay.draw('Sharks are my best friend', my_fish)
_________________________
| Sharks are my best friend |
=========================
\
\
/`·.¸
/¸...¸`:·
¸.·´ ¸ `·.¸.·´)
: © ):´; ¸ {
`·.¸ `· ¸.·´\`·¸)
`\\´´\¸.·´
```# Command Line Usage
```console
$ cowsay -t "Hello World"
___________
| Hello World |
===========
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||$ cowsay -t "Hello World" -c "tux"
___________
| Hello World |
===========
\
\
\
.--.
|o_o |
|:_/ |
// \ \
(| | )
/'\_ _/`\
\___)=(___/
```# More Characters
```pycon
>>> cowsay.char_names
['beavis', 'cheese', 'cow', 'daemon', 'dragon', 'fox', 'ghostbusters', 'kitty',
'meow', 'miki', 'milk', 'octopus', 'pig', 'stegosaurus', 'stimpy', 'trex',
'turkey', 'turtle', 'tux']>>> cowsay.char_funcs
{'beavis': ,
'cheese': ,
...
'tux': }>>> len(cowsay.chars)
19
```Guide: [CONTRIBUTING.md](https://github.com/VaasuDevanS/cowsay-python/blob/main/CONTRIBUTING.md)
# Star History
[](https://star-history.com/#VaasuDevanS/cowsay-python&Date)