yarr.client 0.2.1
Web-based client for Yarr!
License: MIT
Keywords: yarr,the pirate bay,web based,client

Yarr! client
============

|Circle CI| |Dependency Status| |PyPI version| |Docker pulls|

Web client for `Yarr!`_ in Python.

Install
-------

Using Docker
~~~~~~~~~~~~

.. code:: console

    $ docker run -d -p 80:5000 bluecap/yarr.client:latest

Using a package manager
~~~~~~~~~~~~~~~~~~~~~~~

.. code:: console

    $ pip install yarr.client

From source
~~~~~~~~~~~

.. code:: console

    $ git clone https://github.com/bluecap-se/yarr.client.git
    $ cd yarr.client
    $ pip install -r requirements.txt
    $ pip install -e .

Usage
-----

Quickstart
~~~~~~~~~~

.. code:: console

    $ yarr.client

     * Running on http://0.0.0.0:5000/
     * Restarting with reloader

Options
~~~~~~~

The configuration file params are defined in the `Flask documentation`_.

Additional, app-specific params are ``YARR_URL`` and ``YARR_API_TOKEN``.
``YARR_URL`` is the path to the `Yarr!`_ server, and ``YARR_API_TOKEN``
needs to be set if the server has a corresponding token specified in its
config.

.. code:: console

    $ yarr.client -h

    Yarr.client - Web Client for Yarr!

    Usage:
          yarr.client runserver [--config FILE] [options]

    Options:
      -c, --config FILE         Path to Flask config file (params: bit.ly/1uamUo1)
      -h, --help                Output this help and exit
      -v, --version             Output version and exit

    Examples:
      yarr.client runserver
      yarr.client runserver -c /etc/production.cfg

Options with Docker
^^^^^^^^^^^^^^^^^^^

To use a custom configuration file in Docker, map your file using
volumes.

.. code:: console

    $ docker run -d -p 80:5000 -v /path/to/your/config.cfg:/yarr.config.cfg bluecap/yarr.client:latest

Run tests
---------

.. code:: console

    $ pip install -r test_requirements.txt
    $ py.test

Watch for changes
~~~~~~~~~~~~~~~~~

To run the tests continuously, run the test command with the watch or
follow flag ``-f``:

.. code:: console

    $ py.test -f

Test coverage
~~~~~~~~~~~~~

.. code:: console

    $ coverage run --source yarr_client -m py.test
    $ coverage html
    $ open htmlcov/index.html

License
-------

Published under `MIT License`_.

.. _Yarr!: https://github.com/bluecap-se/yarr
.. _Flask documentation: http://flask.pocoo.org/docs/0.10/config/#builtin-configuration-values
.. _MIT License: https://github.com/bluecap-se/yarr.client/blob/master/LICENSE

.. |Circle CI| image:: https://img.shields.io/circleci/project/bluecap-se/yarr.client.svg?style=flat-square
   :target: https://circleci.com/gh/bluecap-se/yarr.client
.. |Dependency Status| image:: https://img.shields.io/gemnasium/bluecap-se/yarr.client.svg?style=flat-square
   :target: https://gemnasium.com/bluecap-se/yarr.client
.. |PyPI version| image:: https://img.shields.io/pypi/v/yarr.client.svg?style=flat-square
   :target: https://pypi.python.org/pypi/yarr.client/
.. |Docker pulls| image:: https://img.shields.io/docker/pulls/bluecap/yarr.client.svg?style=flat-square
   :target: https://registry.hub.docker.com/u/bluecap/yarr.client/