Skip to main content

Command and Rule over your Shell

Project description

## What is Sultan?

Sultan is an interface to Bash from Python. Shell commands get to the point of
what you want them to do. For example,

```
sudo yum install tree
```

would install `tree` on your local machine. However, we normally access command
line utilities like `yum`, via bash, and Bash is just not as nice as Python.
Python's beautiful syntax make code readable and easy to maintain far more than
Bash.

Bash is great for small scripts, but when we get complex scripts, Bash just
gets very tough to use. This is why Sultan was created.

Sultan allows you to run bash commands from inside Python using simple function
calls. Here is a quick example to install tree via Sultan.

```
from sultan.api import Sultan

def install_tree():
s = Sultan()
s.sudo("yum install -y tree").run()
```

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

sultan-0.1.13.tar.gz (8.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page