Skip to main content

A Python client for the Grist API.

Project description

Grist is a relational spreadsheet with tons of batteries included. The Grist API allows you to programmatically retrieve/update your data stored on Grist, and manipulate most of the basic Grist objects, such as workspaces, documents, user permissions and so on.

Pygrister is a Grist client that covers all the documented APIs. Pygrister keeps track of basic configuration for you, remembering your team site, workspace, working document, so that you don’t have to type in the boring stuff every time. Apart from this and little else, Pygrister is rather low-level: it will call the api and retrieve the response, with only minor changes. If the api call is malformed, you will simply receive a bad HTTP status code.

Basic usage goes as follows:

from pygrister.api import GristApi

grist = GristApi()
# list users/permissions for the current document
status_code, response = grist.list_doc_users()
# fetch all rows in a table
status_code, response = grist.list_records('Table1')
# add a column to a table
cols = [{'id': 'age', 'fields': {'label':'age', 'type': 'Int'}}]
status_code, response = grist.add_cols('Table1', cols)

You should read the docs first, and then take a look at the test suite for more usage examples.

Python version required.

Pygrister will work with any Python>=3.9.

Note that Grist itself may have stricter Python requirements but don’t mix things up: the Grist’s Python lives on the server, supporting a Grist instance. You will likely run Pygrister from a client instead, with your Python of choice.

Install.

Any feedback and contribution is very welcome at this stage!

Right now, Pygrister is in beta stage, meaning that the overall interface should be fairly stable but I make no promises about further changes. The new Scim api support is still very experimental.

You can install Pygrister from PyPI:

python -m pip install pygrister

Note that this repo may have recent features not yet released on PyPI: see NEWS.txt and/or the commit history. To try the “bleeding edge” from GitHub:

python -m pip install git+https://github.com/ricpol/pygrister

License.

Pygrister is released under the MIT license (see LICENSE.rst). Copyright 2024-2025 Riccardo Polignieri

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygrister-0.7.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygrister-0.7.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file pygrister-0.7.0.tar.gz.

File metadata

  • Download URL: pygrister-0.7.0.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pygrister-0.7.0.tar.gz
Algorithm Hash digest
SHA256 fac4b982857febb7ed995e72ba8cbf7aa3168e8847e443d3f85e7dff9247add4
MD5 f955de96b198e70b6c60abc199758a06
BLAKE2b-256 2b5fb99618eff4ae44ccdf40f0d2d6a298dd6c80bed95f76c13907021f1b2295

See more details on using hashes here.

File details

Details for the file pygrister-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: pygrister-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pygrister-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 324bfb283a5103ea7a813465bf0f18636088cc3c2da2dc85534e6fe8ee0f5867
MD5 9298b2fe2894c93dcea88c9142fbb107
BLAKE2b-256 6f67b20cbae81094e5f2553d2b1e2d93d644562b0010d999bf0408d47c8e42ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page