diff options
author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-01-09 03:06:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-09 03:06:40 +0100 |
commit | bdc19b162ca75c4a2eac70f3f9814ab31de97f7c (patch) | |
tree | c70282a8a15c9040692fed634051090c6d2cd706 /docs | |
parent | ac812727c26c9bde4ee5c1115029f2ff4ab1964b (diff) | |
parent | d69ba0479a4537bbc7a53f342661c1984382f939 (diff) | |
download | gitlab-bdc19b162ca75c4a2eac70f3f9814ab31de97f7c.tar.gz |
Merge pull request #1812 from python-gitlab/jlvillal/pprint
chore: add `pprint()` and `pformat()` methods to RESTObject
Diffstat (limited to 'docs')
-rw-r--r-- | docs/api-usage.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/api-usage.rst b/docs/api-usage.rst index 66e5887..8befc56 100644 --- a/docs/api-usage.rst +++ b/docs/api-usage.rst @@ -179,6 +179,20 @@ 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. + project.pprint() + + # Or explicitly via `pformat()`. This is equivalent to the above. + print(project.pformat()) + + Base types ========== |