Skip to content
Snippets Groups Projects
Commit 82cfed9c authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Add documentation about pyscan

parent 133467aa
No related branches found
No related tags found
No related merge requests found
...@@ -20,11 +20,11 @@ You can use docker for development: ...@@ -20,11 +20,11 @@ You can use docker for development:
# Create the database # Create the database
$ docker-compose run web flask initdb $ docker-compose run web flask initdb
4. Start the application:: 3. Start the application::
$ docker-compose up $ docker-compose up
5. Open your browser and go to `http://localhost:8000 4. Open your browser and go to `http://localhost:8000
<http://localhost:8000>`_. <http://localhost:8000>`_.
...@@ -44,3 +44,29 @@ To restore the database:: ...@@ -44,3 +44,29 @@ To restore the database::
$ gunzip -c inventory_db.dump.g | docker run --rm --link inventory_postgres:postgres --net inventory_default $ gunzip -c inventory_db.dump.g | docker run --rm --link inventory_postgres:postgres --net inventory_default
-e PGPASSWORD="<inventory_password>" -i postgres:9.6 psql -h postgres -U inventory inventory_db -e PGPASSWORD="<inventory_password>" -i postgres:9.6 psql -h postgres -U inventory inventory_db
Client
------
The `pyscan.py` client can be found under the "client" directory.
You should first create a configuration file::
$ cat ~/.pyscan.yml
device: /dev/tty.usbmodem1421
url: http://localhost:8000/api
username: yourusername
To install the requirements, conda_ is recommended::
$ cd client
$ conda env create -n pyscan
$ source activate pyscan
Run::
$ python pyscan.py
.. _conda: https://conda.io/miniconda.html
name: pyscan
channels: !!python/tuple
- conda-forge
- defaults
dependencies:
- conda-forge::ca-certificates=2017.4.17=0
- conda-forge::certifi=2017.4.17=py36_0
- conda-forge::chardet=3.0.2=py36_1
- conda-forge::click=6.7=py36_0
- conda-forge::idna=2.5=py36_0
- conda-forge::ncurses=5.9=10
- conda-forge::openssl=1.0.2l=0
- conda-forge::pip=9.0.1=py36_0
- conda-forge::python=3.6.1=3
- conda-forge::pyyaml=3.12=py36_1
- conda-forge::readline=6.2=0
- conda-forge::requests=2.18.1=py36_0
- conda-forge::setuptools=33.1.1=py36_0
- conda-forge::sqlite=3.13.0=1
- conda-forge::tk=8.5.19=1
- conda-forge::urllib3=1.21.1=py36_0
- conda-forge::wheel=0.29.0=py36_0
- conda-forge::xz=5.2.2=0
- conda-forge::yaml=0.1.6=0
- conda-forge::zlib=1.2.11=0
- pip:
- daiquiri==1.2.1
- pyserial==3.3
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment