Skip to main content

Modul/Command Line Tool to get cat images

Project description

# 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)

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

random-cat-1.0.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distributions

random_cat-1.0.1-py3.4.egg (4.1 kB view details)

Uploaded Source

random_cat-1.0.1-py2.7.egg (4.1 kB view details)

Uploaded Source

File details

Details for the file random-cat-1.0.1.tar.gz.

File metadata

  • Download URL: random-cat-1.0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for random-cat-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8b7df9382665696333d3a1a5e95bc4142d0b4b0c98b1b6b24c541143ffa820ca
MD5 2d86f6ecfcc5799f5c2ecb7411b7b57e
BLAKE2b-256 3dbb6d2782f55b6d8c1cd57174440d005699e9f307bf6a6a61aab2d50abe9830

See more details on using hashes here.

File details

Details for the file random_cat-1.0.1-py3.4.egg.

File metadata

File hashes

Hashes for random_cat-1.0.1-py3.4.egg
Algorithm Hash digest
SHA256 22b55c6ba83ec2046af083ba15ee36538da366a4935fb49117ec64250993c70d
MD5 cceb6db9b970c44676d42f8c62029331
BLAKE2b-256 e51589163a68640d37632178d268b9bba783a06775ab7e9cd9ab64dffb3f8bf8

See more details on using hashes here.

File details

Details for the file random_cat-1.0.1-py2.7.egg.

File metadata

File hashes

Hashes for random_cat-1.0.1-py2.7.egg
Algorithm Hash digest
SHA256 de684000ef09616df507f961c8700a41ba792ba0a3e83b20f3e440d2c1024e26
MD5 aa8ab5dd06f443a9380570c0abf35c44
BLAKE2b-256 ca09f1df1d0553d577351a9bf0ea54e53a6f918d914a304ea024b90528c10a28

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page