Skip to content
Snippets Groups Projects
Commit ddc3234f authored by LEGOUX Laurent's avatar LEGOUX Laurent
Browse files

Update README.rst

parent bd7e91d7
No related branches found
No related tags found
No related merge requests found
......@@ -32,26 +32,23 @@ some rows to a table and then fetch all cells in the table could look like:
.. code-block:: python
from grist_api import GristDocAPI
import os
SERVER = "https://grist.numerique.gouv.fr" # your org goes here
DOC_ID = "fv3Gyy5DoKArxfrDmzqhre" # l'ID du document
SERVER = "https://subdomain.getgrist.com" # your org goes here
DOC_ID = "9dc7e414-2761-4ef2-bc28-310e634754fb" # document id goes here
# Get api key from your Profile Settings, and run with GRIST_API_KEY=<key>
GRIST_API_KEY = "66xxxxxxxxxxxxxxxde2" # la clef d'API du compte
api = GristDocAPI(DOC_ID, server=SERVER)
# add some rows to a table
rows = api.add_records('Table1', [
{'food': 'eggs'},
{'food': 'beets'}
])
rows = api.add_records('Table2', [{'food': 'eggs'},{'food': 'beets'}])
# fetch all the rows
data = api.fetch_table('Table1')
data = api.fetch_table('Table2')
print(data)
Tests
-----
Tests are in the ``tests/`` subdirectory. To run all tests, run::
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment