Metadata-Version: 2.4
Name: gitlab-users
Version: 1.0.3
Summary: Export GitLab users information and automate user accounts creation
Author-email: Matthieu Boileau <matthieu.boileau@math.unistra.fr>
License: MIT License
        
        Copyright (c) 2021 IRMA
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/boileaum/gitlab-users
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-gitlab
Provides-Extra: dev
Requires-Dist: ruff; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: python-gitlab; extra == "dev"
Dynamic: license-file

# gitlab-users

A simple command line interface to manage GitLab user accounts, based on [python-gitlab](https://github.com/python-gitlab/python-gitlab).

## Installation

* Install the package on your system

```sh
pip install gitlab-users
```

* Edit the `~/.python-gitlab.cfg` following the [python-gitlab package instructions](http://python-gitlab.readthedocs.io/en/stable/cli.html) to setup the GitLab instance to connect with (present version only targets default instance).

## Usage

* Get help

```sh
gitlab-users -h
```

* List all users with their email

```sh
gitlab-users
```

* List emails from a given group

```sh
gitlab-users -g a_group --email-only
```

* Create multiple user accounts at once from a csv file

```sh
gitlab-users --create-from example.csv
```

where `example.csv` contains

```csv
# username, name, email, [organization], [location], [group], [access_level]
wayne,Bruce Wayne,bruce.wayne@wayne-entreprises.com,Wayne Entreprises,Gotham City,Board,owner
kent,Clark Kent,clark.kent@krypton.univ,,Smallville
```

* List unused accounts (never sign-in or last connection is older than 1 year)

```sh
gitlab-users --unused
```
