[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/axl89/python-gitlab/docs/gitlab-pages/docs/api-usage.rst [Back]  [Original]

############################
Getting started with the API
############################

python-gitlab only supports GitLab APIs v4.

``gitlab.Gitlab`` class
=======================

To connect to a GitLab server, create a ``gitlab.Gitlab`` object:

.. code-block:: python

   import gitlab

   # private token or personal token authentication
   gl = gitlab.Gitlab('http://10.0.0.1', private_token='JVNSESs8EwWRx5yDxM5q')

   # oauth token authentication
   gl = gitlab.Gitlab('http://10.0.0.1', oauth_token='my_long_token_here')

   # username/password authentication (for GitLab 

Web Proxy Viewer  |  New URL  |  Original Page