Pete Shadbolt hace 7 años
padre
commit
72d6e82d4d
Se han modificado 1 ficheros con 8 adiciones y 8 borrados
  1. +8
    -8
      templates/doc.md

+ 8
- 8
templates/doc.md Ver fichero

@@ -15,25 +15,25 @@ Arbitrary 3D structures can be constructed by rotating the grid.
The URL contains a unique ID such as `oranges-arkansas-mexico-fish`. You can share this URL with other people to share your screen and edit collaboratively.

## Python package
The underlying graph state simulator is based on Anders' and Briegel's method. Full docs for the Python package are [here](https://peteshadbolt.co.uk/static/abp/).
The underlying graph state simulator is based on Anders' and Briegel's method. Full docs for the Python package are [here](https://peteshadbolt.co.uk/static/abp/). You can install it like this:

:::bash
pip install abp


## API

Here's a complete example of sending a state from Python to the server:

:::python
import requests, json, abp
import abp
# Make a new graph and position the nodes
# Make a new graph and automatically position the nodes
g = abp.NXGraphState(range(10))
g.layout()
# Serialize
data = json.dumps(test_graph().to_json())
# Post to the server
URL = "https://abv.peteshadbolt.co.uk/oranges-arkansas-mexico-fish"
requests.post("{}/graph".format(URL), data=data)
g.push()

### Endpoints



Cargando…
Cancelar
Guardar