Skip to main content

Modul/Command Line Tool to get dog images

Project description

random-dog

random-dog is a module for getting dog images, it uses dogAPI: https://dog.ceo/dog-api/ The module creation was inspired by random-cat module (https://github.com/gravmatt/random-cat)

Python 2 and 3 compatible

Installation

Install through pip.

$ pip install random-dog

or get from source

$ git clone https://github.com/Prasnal/random-dog
$ cd random-dog
$ python setup.py install

Usage

The dog module has just one function getDog() with two optional arguments.

Arguments

directory - default is the current directory

filename - default is a unique id

import dog

# dog.getDog(directory=None, filename=None)

dog.getDog(directory='/users/tor', filename='dog')

# /users/tor/dog.jpg

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.

$ randomdog [file]

# Example:

$ randomdog /users/tor/dog.jpg

The argument file is optional.

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

random_dog-1.0.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

random_dog-1.0.2-py2-none-any.whl (3.8 kB view details)

Uploaded Python 2

File details

Details for the file random_dog-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: random_dog-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.8

File hashes

Hashes for random_dog-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9eb1a9ce6fcd295d7198b5e05896058b5a2aeb4ade12759dd199a9b2e0f619c4
MD5 cbab604f55f5593517b7b5307f08f347
BLAKE2b-256 4444070324de9c44fd6020dd837f524318ec889047f5bbadeeac2d82594d3068

See more details on using hashes here.

File details

Details for the file random_dog-1.0.2-py2-none-any.whl.

File metadata

  • Download URL: random_dog-1.0.2-py2-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.8

File hashes

Hashes for random_dog-1.0.2-py2-none-any.whl
Algorithm Hash digest
SHA256 d1002e713c12449f059c55732c5c87b5d69d4cdb737f9a9fc265c918990d1aff
MD5 2a2e7f059ceba9857d5cb6462d3f4313
BLAKE2b-256 744756dc2f26a2011da9803a9689cb04a2b167f9ebc3ffe30599b9a0833b6392

See more details on using hashes here.

Supported by

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