Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grist Api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LEGOUX Laurent
Grist Api
Commits
ddc3234f
Commit
ddc3234f
authored
4 months ago
by
LEGOUX Laurent
Browse files
Options
Downloads
Patches
Plain Diff
Update README.rst
parent
bd7e91d7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.rst
+7
-10
7 additions, 10 deletions
README.rst
with
7 additions
and
10 deletions
README.rst
+
7
−
10
View file @
ddc3234f
...
...
@@ -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('Table
1
')
data = api.fetch_table('Table
2
')
print(data)
Tests
-----
Tests are in the ``tests/`` subdirectory. To run all tests, run::
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment