Skip to content

Python interface to the POSIX getent family of commands (getpwent, getgrent, getnetent, etc.)

License

Notifications You must be signed in to change notification settings

ScreamingPigeon/getent

 
 

Repository files navigation

getent

Python interface to the POSIX getent family of commands (getpwent, getgrent, getnetent, etc.)

Usage

Installation: https://pypi.org/project/pygetent/

Here a few examples.

Load the interface:

>>> import getent

Doing a passwd lookup:

>>> print dict(getent.passwd('root'))
{'dir': '/root',
 'gecos': 'root',
 'gid': 0,
 'name': 'root',
 'password': 'x',
 'shell': '/bin/bash',
 'uid': 0}

Doing a group lookup:

>>> print dict(getent.group('root'))
{'gid': 0, 'members': [], 'name': 'root', 'password': 'x'}

Bugs

Please use the bug tracker at GitHub for bugs or feature requests.

Authors

Build status

Why was this forked?

Originally forked from https://github.com/tehmaze/getent. This fork was created since
  1. the original repository is now archived
  2. The package published to pypi has a broken setup.py, which leads to installation failure. This was due to the file() function being called on this very Readme. While the original repository reflects an update that uses 'read()`, the PyPi source has not been updated. This repository exists to republish to PyPI

About

Python interface to the POSIX getent family of commands (getpwent, getgrent, getnetent, etc.)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.8%
  • Makefile 1.2%