FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

python-gitlab/docs/gl_objects/namespaces.rst at v8.1.0 · python-gitlab/python-gitlab · GitHub

Repository navigation

Latest commit

 

History

History
37 lines (23 loc) · 715 Bytes

File metadata and controls

37 lines (23 loc) · 715 Bytes

Namespaces

Reference

Examples

List namespaces:

namespaces = gl.namespaces.list(get_all=True)

Search namespaces:

namespaces = gl.namespaces.list(search='foo', get_all=True)

Get a namespace by ID or path:

namespace = gl.namespaces.get("my-namespace")

Get existence of a namespace by path:

namespace = gl.namespaces.exists("new-namespace")

if namespace.exists:
    # get suggestions of namespaces that don't already exist
    print(namespace.suggests)

Back | FazBrowse Home | New Git URL