group — PyCI /etc/group Module

class Group(groupname, password, gid, users=None)

Class for referencing and saving group properties (GID and users)

GroupException()
A custom exception for reporting problems performing operations within Group()
asList()
Returns the group’s parameters as a list (identical to how it would be represented in self.group_obj.asList)
delete()
Permanently delete the group from /etc/group.
save()
Saves/updates the group’s properties in /etc/group
class GroupFile

ConfigFile class to read and write to /etc/group

gids()
Returns a list of gids in /etc/group
group(group_name)
If the group exists, returns a Group object generated from said group’s properties in /etc/group.
groups()
Returns a list of groups in /etc/group
read_group_file()
Read /etc/group and returns the data as a list of Group() objects.
remove(groupobj)
Meant to emulate the remove() built-in (for lists).
save()
Overwrites /etc/group with the data from self.asList().
list_etc_group()
Returns /etc/group as a list (skipping the password placeholder field)