项目作者: valohai

项目描述 :
A growing collection of tools for managing a G Suite organization.
高级语言: Python
项目地址: git://github.com/valohai/g-suite-tools.git
创建时间: 2019-11-19T12:41:06Z
项目社区:https://github.com/valohai/g-suite-tools

开源协议:MIT License

下载


G Suite Tools

A growing collection tools for managing a G Suite organization.

Before you begin

  • Install the requirements into a Python 3.8+ virtualenv. (pip install -e .)
  • Set up an OAuth application for Google APIs.
    Follow the instructions on this page
    for “installed software” authentication and once you have a client_secret.json file, plop it in the
    working directory here.

Retrieve all groups and their members

  1. python -m gst.get_group_info --domain=mydomain.com --write-json=groups.json

To convert groups.json into a mapping of group-email -> member-emails, using Jq:

  1. jq '.[]|[{"key":.email,"value":[._members[].email]}]|from_entries' groups.json

To convert groups.json into human-readable Markdown:

  1. python -m gst.format_group_info --json=groups.json --write-markdown=-

Retrieve information for all users

  1. python -m gst.get_user_info --domain=mydomain.com --write-json=users.json

To list users with their email aliases:

  1. python -m gst.list_user_emails --json=groups.json -w-