Skip to main content

Admin escalator module for Python

Project description

adminpy - Python Admin access for most platforms

This module makes it easy to check system platform type and gain admin rights for scripts that require it.

This utilises PyUAC on the Windows platform and requires the use of Sudo on *NIX systems for admin rights escalation.

The purpose of this is to try and make people's life easier when needed more rights for python scripts.

adminpy on Github

Usage of the module

There are 3 functions of this module

  1. The sysinfo() function outputs whether the script recognises which type of system it's running on.

Example: On a Windows system, the script will output,"You are running on a Windows-based system."

  1. The admincheck() function will output a "Yes" or "No", depending on if it has root or admin privilege

  2. The runadmin() function will utilise ctypes function or Sudo (for linux) to relaunch script if does not have root or admin privilege

Requirements

  • This module requires PyUAC and PyWin32 package to be installed on a Windows system.
  • This module requires Python 3, and does not support Python 2.

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

adminpy-0.5.1.tar.gz (15.0 kB view hashes)

Uploaded Source

Built Distribution

adminpy-0.5.1-py3-none-any.whl (15.0 kB view hashes)

Uploaded Python 3

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