Name | Pygrister JSON |
Version |
0.8.0
JSON |
| download |
home_page | None |
Summary | A Python client for the Grist API. |
upload_time | 2025-08-10 10:53:47 |
maintainer | None |
docs_url | None |
author | Riccardo Polignieri |
requires_python | >=3.9 |
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.
|
keywords |
grist
relational spreadsheet
database
api
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
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.
Gry: the Grist cli tool.
------------------------
Gry is a command line tool to query the Grist Api. Gry is based on Pygrister,
but you can use/vendor it as a stand-alone tool, with no prior Python/Pygrister
knowledge needed.
Gry is installed with Pygrister: to try it out, just type ::
% gry --help # % is your shell prompt
and find out what Gry can do for you (or, read the online documentation!).
Basic usage goes as follows::
% gry team see # get info on the "default" team as per config
% gry doc see # the "default" document as per config
% gry doc see -d f4Y8Tov7TRkTQfUuj7TVdh # select a specific document
# the best way to switch to another document, from now on:
% export GRIST_DOC_ID=f4Y8Tov7TRkTQfUuj7TVdh # or "set" in windows
% gry doc see # the same as above, but no need to add the "-d" option
% gry doc see -d bogus_doc # now this will fail...
% gry doc see -d bogus_doc -i # ...so let's see the request details
% gry ws see -w 42 # workspace info, in a nicely formatted table
% gry ws see -w 42 -vv # the same, in the original raw json
% gry table new --help # how do I add a table?
% gry table new name:Text:Name age:Int:Age --table People # like this!
% gry col list -b People # the columns of our new table
% gry rec new name:"John Doe" age:42 -b People # populate the table
% gry sql "select * from People where age>?" -p 35 # run an sql query
% gry python # let's open a Python shell now!
>>> gry.list_cols(table_id='People') # "gry" is now a python object
>>> exit() # and we are back to the shell
Python version required.
------------------------
Pygrister (and Gry) 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/Gry is released under the MIT license (see ``LICENSE.rst``).
Copyright 2024-2025 Riccardo Polignieri
Raw data
{
"_id": null,
"home_page": null,
"name": "Pygrister",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "Grist, relational spreadsheet, database, API",
"author": "Riccardo Polignieri",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/6a/a2/804b3e63bce91fb0c7f093b6f3e522e476d9f3074cd3384d713f73fff78b/pygrister-0.8.0.tar.gz",
"platform": null,
"description": "Pygrister: a Python client for the Grist API.\r\n=============================================\r\n\r\n`Grist <https://www.getgrist.com/>`_ is a relational spreadsheet with tons of \r\nbatteries included. The `Grist API <https://support.getgrist.com/api>`_ \r\nallows you to programmatically retrieve/update your data stored on Grist, \r\nand manipulate most of the basic Grist objects, such as workspaces, documents, \r\nuser permissions and so on. \r\n\r\nPygrister is a Grist client that covers all the documented APIs. \r\nPygrister keeps track of basic configuration for you, remembering your \r\nteam site, workspace, working document, so that you don't have to type in \r\nthe boring stuff every time. Apart from this and little else, Pygrister \r\nis rather low-level: it will call the api and retrieve the response, with \r\nonly minor changes. \r\nIf the api call is malformed, you will simply receive a bad HTTP status code. \r\n\r\nBasic usage goes as follows::\r\n\r\n from pygrister.api import GristApi\r\n\r\n grist = GristApi()\r\n # list users/permissions for the current document\r\n status_code, response = grist.list_doc_users()\r\n # fetch all rows in a table\r\n status_code, response = grist.list_records('Table1') \r\n # add a column to a table\r\n cols = [{'id': 'age', 'fields': {'label':'age', 'type': 'Int'}}]\r\n status_code, response = grist.add_cols('Table1', cols) \r\n\r\nYou should `read the docs first <https://pygrister.readthedocs.io>`_, \r\nand then take a look at the test suite for more usage examples. \r\n\r\nGry: the Grist cli tool.\r\n------------------------\r\n\r\nGry is a command line tool to query the Grist Api. Gry is based on Pygrister, \r\nbut you can use/vendor it as a stand-alone tool, with no prior Python/Pygrister \r\nknowledge needed. \r\n\r\nGry is installed with Pygrister: to try it out, just type ::\r\n\r\n % gry --help # % is your shell prompt\r\n\r\nand find out what Gry can do for you (or, read the online documentation!).\r\n\r\nBasic usage goes as follows::\r\n\r\n % gry team see # get info on the \"default\" team as per config\r\n % gry doc see # the \"default\" document as per config\r\n % gry doc see -d f4Y8Tov7TRkTQfUuj7TVdh # select a specific document\r\n \r\n # the best way to switch to another document, from now on: \r\n % export GRIST_DOC_ID=f4Y8Tov7TRkTQfUuj7TVdh # or \"set\" in windows\r\n % gry doc see # the same as above, but no need to add the \"-d\" option\r\n % gry doc see -d bogus_doc # now this will fail...\r\n % gry doc see -d bogus_doc -i # ...so let's see the request details \r\n \r\n % gry ws see -w 42 # workspace info, in a nicely formatted table\r\n % gry ws see -w 42 -vv # the same, in the original raw json\r\n \r\n % gry table new --help # how do I add a table?\r\n % gry table new name:Text:Name age:Int:Age --table People # like this!\r\n \r\n % gry col list -b People # the columns of our new table\r\n % gry rec new name:\"John Doe\" age:42 -b People # populate the table\r\n \r\n % gry sql \"select * from People where age>?\" -p 35 # run an sql query\r\n % gry python # let's open a Python shell now!\r\n >>> gry.list_cols(table_id='People') # \"gry\" is now a python object\r\n >>> exit() # and we are back to the shell\r\n\r\n\r\nPython version required.\r\n------------------------\r\n\r\nPygrister (and Gry) will work with any Python>=3.9. \r\n\r\nNote that Grist itself may have \r\n`stricter Python requirements <https://support.getgrist.com/python/#supported-python-versions>`_ \r\nbut don't mix things up: the Grist's Python lives on the server, supporting \r\na Grist instance. You will likely run Pygrister from a client instead, with \r\nyour Python of choice. \r\n\r\nInstall.\r\n--------\r\n\r\nAny feedback and contribution is *very welcome* at this stage! \r\n\r\nRight now, Pygrister is in beta stage, meaning that the overall interface \r\nshould be fairly stable but I make no promises about further changes. \r\nThe new Scim api support is still *very* experimental. \r\n\r\nYou can install Pygrister from PyPI::\r\n\r\n python -m pip install pygrister\r\n\r\nNote that this repo may have recent features not yet released on PyPI: \r\nsee ``NEWS.txt`` and/or the commit history. To try the \"bleeding edge\" \r\nfrom GitHub::\r\n\r\n python -m pip install git+https://github.com/ricpol/pygrister\r\n\r\nLicense.\r\n--------\r\n\r\nPygrister/Gry is released under the MIT license (see ``LICENSE.rst``). \r\nCopyright 2024-2025 Riccardo Polignieri\r\n",
"bugtrack_url": null,
"license": "MIT License\r\n \r\n Copyright (c) 2024-2025 Riccardo Polignieri\r\n \r\n Permission is hereby granted, free of charge, to any person obtaining a copy\r\n of this software and associated documentation files (the \"Software\"), to deal\r\n in the Software without restriction, including without limitation the rights\r\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n copies of the Software, and to permit persons to whom the Software is\r\n furnished to do so, subject to the following conditions:\r\n \r\n The above copyright notice and this permission notice shall be included in all\r\n copies or substantial portions of the Software.\r\n \r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n SOFTWARE.\r\n ",
"summary": "A Python client for the Grist API.",
"version": "0.8.0",
"project_urls": {
"Bug Tracker": "https://github.com/ricpol/pygrister/issues",
"Changelog": "https://github.com/ricpol/pygrister/blob/main/NEWS.txt",
"Documentation": "https://pygrister.readthedocs.io",
"Repository": "https://github.com/ricpol/pygrister"
},
"split_keywords": [
"grist",
" relational spreadsheet",
" database",
" api"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "f247e43f2d8b88477a9b27b39d97e3c61534ae3cda4c99771f8b3c81d2469486",
"md5": "ea852417a5f5769403bc1f37686fdb86",
"sha256": "b882a93db0aae642435d23f8e6f6a50f737befa35e3cce72f234bedd0ef4bee6"
},
"downloads": -1,
"filename": "pygrister-0.8.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ea852417a5f5769403bc1f37686fdb86",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 31863,
"upload_time": "2025-08-10T10:53:46",
"upload_time_iso_8601": "2025-08-10T10:53:46.345158Z",
"url": "https://files.pythonhosted.org/packages/f2/47/e43f2d8b88477a9b27b39d97e3c61534ae3cda4c99771f8b3c81d2469486/pygrister-0.8.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6aa2804b3e63bce91fb0c7f093b6f3e522e476d9f3074cd3384d713f73fff78b",
"md5": "398c52ae5a8004f91b0982fe1cf4d489",
"sha256": "4faaad23b27c9ae46dc7b321a0de376f3bfbdaa5faa7ffd769566105667cd478"
},
"downloads": -1,
"filename": "pygrister-0.8.0.tar.gz",
"has_sig": false,
"md5_digest": "398c52ae5a8004f91b0982fe1cf4d489",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 41472,
"upload_time": "2025-08-10T10:53:47",
"upload_time_iso_8601": "2025-08-10T10:53:47.561215Z",
"url": "https://files.pythonhosted.org/packages/6a/a2/804b3e63bce91fb0c7f093b6f3e522e476d9f3074cd3384d713f73fff78b/pygrister-0.8.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-10 10:53:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ricpol",
"github_project": "pygrister",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"tox": true,
"lcname": "pygrister"
}