diff options
author | John L. Villalovos <john@sodarock.com> | 2022-01-07 12:12:24 -0800 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2022-01-07 12:12:24 -0800 |
commit | e34a2e28f2aee2ab3314927bb51891b6ace78908 (patch) | |
tree | fc331ea13daca0b10d95174a861f50c4855906e0 /docs/api-usage.rst | |
parent | 989634055b0c5ab622ac7774b546928a564a31ef (diff) | |
download | gitlab-jlvillal/pprint.tar.gz |
chore: add `pprint()` and `pformat()` methods to RESTObjectjlvillal/pprint
This is useful in debugging and testing. As can easily print out the
values from an instance in a more human-readable form.
Diffstat (limited to 'docs/api-usage.rst')
-rw-r--r-- | docs/api-usage.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/api-usage.rst b/docs/api-usage.rst index 66e5887..a544bdd 100644 --- a/docs/api-usage.rst +++ b/docs/api-usage.rst @@ -179,6 +179,17 @@ resources. For example: project = gl.projects.get(1) project.star() +You can print a Gitlab Object. For example: + +.. code-block:: python + + project = gl.projects.get(1) + print(project) + # Or in a prettier format. These two are equivalent. + print(project.pformat()) + project.pprint() + + Base types ========== |