grist_api
The grist_api module is a Python client library for interacting with Grist.
Installation
grist_api is available on PyPI: https://pypi.python.org/pypi/grist_api/:
pip install grist_api
The code is on GitHub: https://github.com/gristlabs/py_grist_api.
The API Reference is here: https://py-grist-api.readthedocs.io/en/latest/grist_api.html.
Usage
See tests/test_grist_api.py for usage examples. A simple script to add some rows to a table and then fetch all cells in the table could look like:
from grist_api import GristDocAPI
import os
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>
api = GristDocAPI(DOC_ID, server=SERVER)
# add some rows to a table
rows = api.add_records('Table1', [
{'food': 'eggs'},
{'food': 'beets'}
])
# fetch all the rows
data = api.fetch_table('Table1')
print(data)
Tests
Tests are in the tests/ subdirectory. To run all tests, run:
nosetests
Metadata
Release files for grist-api 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| grist_api-0.1.1.tar.gz | 14.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| grist_api-0.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 26.5 kB
Release files / grist_api-0.1.1.tar.gz
| Download URL | grist_api-0.1.1.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ada7b504f2fd7ed460a8b59e342f69010ce55b8e9cc79f0d234e32416f78393c
|
|
BLAKE2b-256 checksum How to use checksums |
2f5d5fee99c1d32ddf5245a52e6a508a9ae9221517ad6d761dc6a1ab2276e218
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.10
|
Release files / grist_api-0.1.1-py2.py3-none-any.whl
| Download URL | grist_api-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5f1f7892946a6432890795b2224121deac46fd7834c3e2fd78afddb83ab7d954
|
|
BLAKE2b-256 checksum How to use checksums |
3c964ce7443c3726118a4e927585c9a7dddb6c719044caed1af561da508aafa7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.10
|