From 6a7054fb2d3c422a4a8ed2423be237c3e4a7ad21 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 8 Dec 2019 23:26:01 +0100 Subject: [PATCH] Updated Home (markdown) --- Home.md | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/Home.md b/Home.md index 128b7ea..b1097cd 100644 --- a/Home.md +++ b/Home.md @@ -34,6 +34,17 @@ Check [our documentation](https://platypush.readthedocs.io/en/latest/events.html # Installation +First install Redis, as it's used as a bus for delivering messages to platypush. On Debian/Ubuntu for example: + +```shell +apt-get install redis-server +# Start and enable the service +systemctl start redis.service +systemctl enable redis.service +``` + +Then install platypush: + ```shell pip install platypush ``` @@ -43,12 +54,37 @@ pip install platypush ```shell git clone https://github.com/BlackLight/platypush cd platypush -python setup.py install +python setup.py build install ``` -Check `requirements.txt` for any extra dependencies you may want to install depending on your configuration. You can also install all the dependencies (may take some time on slow machines) by running `pip install -r requirements.txt`. +### Extra dependencies -After configuring the server, start it by simply running `platypush`, `python -m platypush`, or make your own service. +There are two advised ways to install extra dependencies for the plugins you want to run. + +#### `pip` extras + +You can easily install the optional dependencies for the extra plugins you want to use by using the [PEP-508 extras syntax](https://www.python.org/dev/peps/pep-0508/#extras). For example, if you want to run the [HTTP server](https://platypush.readthedocs.io/en/latest/platypush/backend/http.html) then you can install it through: + +```shell +pip install "platypush[http]" +``` + +You can check the supported extras in the [`setup.py` file](https://github.com/BlackLight/platypush/blob/master/setup.py#L145). Installation of comma-separated lists of extras is also supported. + +#### `requirements.txt` + +Alternatively, check [`requirements.txt`](https://github.com/BlackLight/platypush/blob/master/requirements.txt) for any extra dependencies you may want to install depending on your configuration. Uncomment the lines associated to the dependencies required by the integrations that you want to run and run: + +```shell +pip install -r requirements.txt +``` + +### Configuration +Copy the [example `config.yaml`](https://github.com/BlackLight/platypush/blob/master/examples/conf/config.yaml) to `/etc/platypush/config.yaml` (global installation, discouraged) or `~/.config/platypush/config/config.yaml` (user installation, recommended). Explore it to get a grasp of the basic components of platypush and their configuration and change it according to your needs. + +### Startup + +After configuring the server, start it by simply running `platypush`, `python -m platypush`. You can also a systemd service by copying the [example `platypush.service`](https://github.com/BlackLight/platypush/blob/master/examples/systemd/platypush.service) to either `/usr/lib/systemd/user/platypush.service` (global installation) or `~/.config/systemd/user/platypush.service` (user installation). **NOTE**: Platypush is only compatible with Python 3 and higher.