Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

Google-Group-Admin-API

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Google-Group-Admin-API

A Python library for managing Google Cloud Platform groups via Google Workspace Directory API

  • 1.0.0
  • PyPI
  • Socket score

Maintainers
1

Google-Group-Admin-API

A Python library for managing Google Cloud Platform (GCP) groups through the Google Workspace Directory API. This tool allows easy and efficient group management within Google Workspace, including adding members to groups, retrieving group information, listing all groups in a domain, and creating new groups.

Features

  • Add Members to Groups: Easily add users to specific Google Workspace groups with designated roles.
  • Get Group Information: Retrieve detailed information about specific groups.
  • List Groups: List all groups within a specified Google Workspace domain.
  • Create Groups: Facilitate the creation of new groups within the Google Workspace.

Prerequisites

  • Python 3.6 or higher
  • Google Workspace domain with admin access
  • Google Cloud Platform project with the Admin SDK API enabled
  • Service account with domain-wide delegation and the necessary permissions

Installation

Clone the repository to your local machine:

git clone https://github.com/martialo12/Google-Group-Admin-API
cd Google-Group-Admin-API

Install the require dependencies

pip install -r requirements.txt

Usage

First, set up your Google Workspace configuration:

from google_workspace_group_manager import GoogleWorkspaceConfig, GoogleWorkspaceGroupManager

scopes = ['https://www.googleapis.com/auth/admin.directory.group']
config = GoogleWorkspaceConfig('path_to_service_account.json', scopes)
group_manager = GoogleWorkspaceGroupManager(config)

Examples

Adding a member to a group:

group_manager.add_member_to_group('group@example.com', 'member@example.com', 'MEMBER')

Retrieving information about a group:

group_info = group_manager.get_group_info('group@example.com')

Listing all groups in a domain:

groups = group_manager.list_google_workspace_groups('example.com')

Creating a new group:

new_group = group_manager.create_group('newgroup@example.com', 'New Group', 'Description')

Contributing

Contributions are welcome! Please read our Contributing Guide for more information.

## License This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • Google APIs Client Library for Python
  • Google Workspace Admin SDK

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc