--- id: elevate version: "0.1.3" license: MIT license_treatment: permissive maintenance: dormant --- # elevate — Python library for requesting root privileges License: permissive · Maintenance: dormant · Downloads: 111.9K/mo ## What it is and what it does Elevate is a small library that re-launches your Python process with elevated privileges, handling the platform-specific details of privilege escalation. When you call elevate() early in your script, it checks whether the process is already running as root; if not, it uses the appropriate system mechanism for your platform to request elevation and replace or restart the process. On Windows it uses UAC, on macOS it tries AppleScript before falling back to sudo, and on Linux it tries graphical tools like pkexec before sudo. The library has no runtime dependencies and is designed to be called once at script startup. Its main constraint is that it depends entirely on system-level privilege escalation infrastructure, which varies across platforms and may not be available in all environments. The package has received no updates since its initial release. Use it for: - System administration scripts that need to perform privileged operations but should prompt for elevation only once at startup. - Cross-platform tools that require root access on Unix-like systems and admin access on Windows. - Installation or configuration utilities that need to modify system files or settings. - Daemon or service launchers that must run with elevated privileges from a user-initiated script. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Elevate re-launches the current Python process with root or admin privileges using platform-specific mechanisms (UAC on Windows, AppleScript on macOS, pkexec/sudo on Linux). No. The package has not been updated since 2018-05-22 and is dormant, raising serious concerns about compatibility with modern Python versions and contemporary privilege escalation mechanisms. While the MIT license is permissive and there are no known vulnerabilities, the age and lack of maintenance make it a poor choice for new projects. Consider using platform-specific elevation mechanisms directly or evaluating actively maintained alternatives. ## Install pip install elevate uv add elevate poetry add elevate ## Installing elevate Before you install: High install friction: the package has not been updated since its latest release on 2018-05-22 and is marked dormant. No runtime dependencies, but the underlying mechanism depends on system-level privilege escalation tools being available. License in practice: MIT license is permissive and imposes no significant restrictions on use, modification, or distribution. Quickstart: import os from elevate import elevate elevate() print(os.getuid() == 0) # True if now running as root Requires system privilege escalation tools (sudo, pkexec, UAC, or AppleScript) to be available and configured; behavior differs significantly across Windows, macOS, and Linux. Verify before relying: - Whether the package works correctly with modern Python versions (no explicit version support declared). - Current compatibility with contemporary UAC, AppleScript, and Linux privilege escalation mechanisms. - Whether dormancy since 2018-05-22 indicates unresolved bugs or simply stable, feature-complete code. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: high - Maintenance: dormant - Downloads: 111.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags request root privileges python, elevate to admin python, sudo wrapper python, uac elevation python, privilege escalation script, run as root python, administrative privileges python, privilege-escalation, cross-platform, system-admin [View on SkillFed](https://skillfed.io/packages/elevate) · [View on PyPI](https://pypi.org/project/elevate/)