Skip to main content

Python interface to the POSIX getent family of commands

Project description

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

Usage

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'}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

getent-0.1.1.tar.gz (4.5 kB view details)

Uploaded Source

File details

Details for the file getent-0.1.1.tar.gz.

File metadata

  • Download URL: getent-0.1.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for getent-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fff87d2bbd00b5463a2c6aab602460814bbfcc39294461a32aaf67416cd6f98e
MD5 0d8c178406e8a5214290a0e4abbb2328
BLAKE2b-256 9d0a51513701a143e1d83d649cf1b2769599d0749bc4fc92442a37a0599daec0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page