Welcome to iscowalive’s documentation!

This is the official documentation for iscowalive, a simple module that checks if url is available in Python.

Contents:

About iscowalive

From where does it come from?

iscowalive was born in a chat with Andrés and Diego while we were drafting the practical part of a minimum viable package of the cowlab meeting..

Installation instructions

Installing iscowalive is quite easy. If you have some experience installing Python packages [1], you already know how to do it. iscowalive is a standard Python package available on pypi [2] so just use your favourite tool (pip, easy_install, etc) to intall it:

pip install iscowalive
easy_install iscowalive
[1]http://docs.python.org/tutorial/modules.html#packages
[2]https://pypi.org/project/iscowalive/

How to use it

bin/ica

The library is provided with a cli: bin/ica. To ask if an url is alive:

$ ./bin/ica url

It should return “OK” if it is alive or “KO” if it is not.

examples

A couple of cli call examples:

$ ./bin/ica http://www.google.com
OK

$ ./bin/ica http://www.google.com/404
KO

How to run the tests

python setup.py test

Testing tool depends on py.test as we can see in the setup.cfg:

[aliases]
test=pytest
[tool:pytest]
addopts = --verbose --pep8 --cov iscowalive
python_files = tests/test_*.py

The python setup.py test command is an alias of pytest –verbose –pep8 –cov iscowalive so you can run both:

$ python setup.py test
$ pytest --verbose --pep8 --cov iscowalive

Indices and tables