Python client for interacting with Grist
Project description
The grist_api module is a Python client library for interacting with Grist.
Installation
grist_api is available on PyPI: https://pypi-hypernode.com/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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file grist_api-0.1.1.tar.gz
.
File metadata
- Download URL: grist_api-0.1.1.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ada7b504f2fd7ed460a8b59e342f69010ce55b8e9cc79f0d234e32416f78393c |
|
MD5 | 091b8fa671e3d3dc40f8bd453456b9f2 |
|
BLAKE2b-256 | 2f5d5fee99c1d32ddf5245a52e6a508a9ae9221517ad6d761dc6a1ab2276e218 |
File details
Details for the file grist_api-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: grist_api-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f1f7892946a6432890795b2224121deac46fd7834c3e2fd78afddb83ab7d954 |
|
MD5 | 44fd46a089c146679b1b79aadc45235d |
|
BLAKE2b-256 | 3c964ce7443c3726118a4e927585c9a7dddb6c719044caed1af561da508aafa7 |