Skip to main content

Python version of linux sudo command without password prompt

Project description

Pudo Package

This is an Python Package for running Linux commands with root permission. We can see this as an alternative to Linux sudo command without password prompt. This is very handy when you are writing python automation scripts and need to deal with root privileges. You can use this as an python module or an Linux command.

Before using the pudo, please accept the Disclaimer:

user$ sudo /usr/local/bin/pudo --accept-disclamer
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

	#1) Respect the privacy of others.
	#2) Think before you type.
	#3) With great power comes great responsibility.

PLEASE NOTE:
	Pudo Developers are not responsible for any misuse of Root Privileges

Thank You for Accepting the Disclaimer:
    It is great quality of you to respect other's privacy

Below is the code snippet for using in python automation for running commands under root privilege:

user$ python3 # or python2
>>> from pudo import pudo
>>> (ret, out) = pudo.run(('ls', '/root')) # or pudo.run('ls /root')
>>> print(ret)
0
>>> print(out)
b'Desktop\nDownloads\nPictures\nMusic\n'

Below is the cmd example for running commands under root privilege:

user$ pudo ls /root
Desktop  Downloads  Pictures  Music

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pudo-1.6.1-py3-none-any.whl (364.3 kB view details)

Uploaded Python 3

File details

Details for the file pudo-1.6.1-py3-none-any.whl.

File metadata

  • Download URL: pudo-1.6.1-py3-none-any.whl
  • Upload date:
  • Size: 364.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pudo-1.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38e9e1bc83fc5009ededf9217fd8c949e0cd768c9b298a34a5cabd37793f77bc
MD5 bad549a65f0c9fd726d0a52d62ddf480
BLAKE2b-256 deed16dcc617d1f6cc5365fffe1cf60eeee6910ec44a12e838614d707011a0da

See more details on using hashes here.

Supported by

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