############################
Getting started with the API
############################
python-gitlab supports both GitLab v3 and v4 APIs.
.. note::
To use the v3 make sure to install python-gitlab 1.4. Only the v4 API is
documented here. See the documentation of earlier versions for the v3 API.
``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