Skip to main content
# random-cat

random-cat is a amazing modul to get cat images. This Project won't be
posible without the great Cat API (http://thecatapi.com).

## Big Thanks to the great Cat API

Go and visit [http://thecatapi.com](http://thecatapi.com)

![alt text](http://thecatapi.com/api/images/get?type=gif "See? amazing!")

**Python 2 and 3 compatible**

## Installation

Install through **pip**.

```
$ pip install random-cat
```

or get from source

```
$ git clone https://github.com/gravmatt/random-cat
$ cd random-cat
$ python setup.py install
```

## Usage

The cat module has just one function **getCat()** with three optional arguments.

### Arguments

**directory** - default is the current directory

**filename** - default is a unique id

**format** - default is _png_. optional _png_, _jpg_ and _gif_ is available

```
import cat

# cat.getCat(directory=None, filename=None, format='png')

cat.getCat(directory='/users/tor', filename='cat', format='gif')

# /users/tor/cat.gif
```

The function return the image name (absolute path if directory is specified) of the image.

### Command Line

You can also request an image on the terminal.

```
$ randomcat [format] [file]

# Example:

$ randomcat gif /users/tor/cat.gif
```

The two arguments _format_ and _file_ are optional.

You can select the formats _png_, _jpg_ or _gif_.

The command return the filename/absolute path of the image to the standard output (stdout).

### Licence

The MIT License (MIT)

Metadata

Release files for random-cat 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 random-cat 1.0.1
File Size Uploaded
random-cat-1.0.1.tar.gz 3.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for random-cat 1.0.1
File Interpreter ABI Platform
random_cat-1.0.1-py3.4.egg Legacy Egg format - - Details
random_cat-1.0.1-py2.7.egg Legacy Egg format - - Details

Total release size: 11.1 kB

Release files / random-cat-1.0.1.tar.gz

Download URL random-cat-1.0.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8b7df9382665696333d3a1a5e95bc4142d0b4b0c98b1b6b24c541143ffa820ca
BLAKE2b-256 checksum
How to use checksums
3dbb6d2782f55b6d8c1cd57174440d005699e9f307bf6a6a61aab2d50abe9830
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / random_cat-1.0.1-py3.4.egg

Download URL random_cat-1.0.1-py3.4.egg
Size 4.1 kB
Tags Egg
SHA-256 checksum
How to use checksums
22b55c6ba83ec2046af083ba15ee36538da366a4935fb49117ec64250993c70d
BLAKE2b-256 checksum
How to use checksums
e51589163a68640d37632178d268b9bba783a06775ab7e9cd9ab64dffb3f8bf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / random_cat-1.0.1-py2.7.egg

Download URL random_cat-1.0.1-py2.7.egg
Size 4.1 kB
Tags Egg
SHA-256 checksum
How to use checksums
de684000ef09616df507f961c8700a41ba792ba0a3e83b20f3e440d2c1024e26
BLAKE2b-256 checksum
How to use checksums
ca09f1df1d0553d577351a9bf0ea54e53a6f918d914a304ea024b90528c10a28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.1 This release

3 release files

1.0.0

1 release file

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