Metadata-Version: 2.2
Name: Pygrister
Version: 0.6.0
Summary: A Python client for the Grist API.
Author: Riccardo Polignieri
License: MIT License
        
        Copyright (c) 2024-2025 Riccardo Polignieri
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Repository, https://github.com/ricpol/pygrister
Project-URL: Bug Tracker, https://github.com/ricpol/pygrister/issues
Project-URL: Changelog, https://github.com/ricpol/pygrister/blob/main/NEWS.txt
Project-URL: Documentation, https://pygrister.readthedocs.io
Keywords: Grist,relational spreadsheet,database,API
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Database
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
Requires-Dist: requests>=2.31.0

Pygrister: a Python client for the Grist API.
=============================================

`Grist <https://www.getgrist.com/>`_ is a relational spreadsheet with tons of 
batteries included. The `Grist API <https://support.getgrist.com/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 <https://pygrister.readthedocs.io>`_, 
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 <https://support.getgrist.com/python/#supported-python-versions>`_ 
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
