Skip to content

Commit

Permalink
gchqgh-14 - Added some clarifications to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
t616178 committed Nov 29, 2016
1 parent 115bca7 commit da45ac9
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions python-shell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,40 +24,46 @@ You can start the Gaffer example rest server (see Gaffer repository example-rest
mvn clean install -Pquick -Pstandalone
```

Once this is running you can run the python example using the command:
Once this is running you can run the python example by using the command (all commands are run from the root of the python-shell project):

```
python3 python-shell/src/gafferpy/example.py
python3 src/example.py
```

Alternatively if you have you own REST API running that is authenticated with
PKI certificates then you can follow the pki example. Before using the example you
will need to export your PKI certificate into a .pem file:

```
python3 python-shell/src/gafferpy/examplePki.py
python3 src/examplePki.py
```

## Installation

The python shell can be compiled and distributed for inclusion in other Python projects.

The project can be compiled by running the following command from the root of the python-shell project:
Compilation of the project requires the bdist package, this can be installed using pip:

```bash
pip3 install bdist
```

The project can then be compiled by running the following command from the root of the python-shell project:

```bash
python3 setup.py bdist_wheel
```

This creates a distributable Python wheel which can installed locally to provide the Gaffer Python shell to other applications.

The wheel file is install using pip:

```
```bash
pip3 install gaffer_shell-0.4.6-py2.py3-none-any.whl
```

After installation the shell can be imported into an application as below:

```python
from gaffer_shell import gaffer as g
```
```

0 comments on commit da45ac9

Please sign in to comment.