소스 검색

Docs

master
Pete Shadbolt 6 년 전
부모
커밋
72d6e82d4d
1개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. +8
    -8
      templates/doc.md

+ 8
- 8
templates/doc.md 파일 보기

@@ -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



불러오는 중...
취소
저장