SOTP project



What is SOTP?

SOTP logoThe SOTP project is a simple tool for reading and writing config files. It allows to read as well as modify existing config files and also to create new ones.


Further information about the project.

Python poweredThe SOTP project is written in Python and platform independent.

Due to the fact, that the project is intended for shell and scripting purposes, it does not come with a graphical user interface.

Even though its name contains the string "OTP", it is neither related to Erfr nor to one-time pad encryption. It is an abbreviation for Simple Option Term Processor.

The main purpose of SOTP is to simplify reading and writing config files with shell scripts. It parses INI-like config files and returns a requested value as a string, but is also able to modify existing (add or delete sections as well as options and change values) or create new files.

Its core module can be easily added to other projects and used for their config file operations.


What the project consists of and what each component is for.

SOTP Reader

The reader parses a config file and returns the value of a requested option from that file.

SOTP Writer

The writer modifies existing or creates new config files.


Stuff that is required to get SOTP running.

Software requirements:

  • Python framework (either of them, further information can be found here)
    • Python 2.x (version 2.7 or higher is recommended, may also work with earlier versions)
    • Python 3.x (version 3.2 or higher is recommended, may also work with earlier versions)


How to use SOTP.

The following usage example shows how to execute the Python script on the shell of a Unix-like system.

If you do not know, how to run Python scripts on your operating system, you may click here.

The project also comes with some help files which contain fundamental documentation as well as usage examples for each component of the project.

Usually, each script requires command-line arguments to operate. So, to get an overview of all arguments available, simply run the script with the --help argument. For example:

$ ./ --help

Parse a config file and return the value of a requested option.

required arguments:
  -c CONFIG_FILE, --config-file CONFIG_FILE
                        config file to parse
  -o OPTION, --option OPTION
                        option to read out
  -s SECTION, --section SECTION
                        section that contains the option

optional arguments:
  -f FALLBACK, --fallback FALLBACK
                        value to return in case the given section or option
                        does not exist
  -h, --help            print this help message and exit
  --version             print the version number and exit

Further information and usage examples can be found inside the documentation
file for this script.


Download the project.

GitHub logoDownloads and further information can be found on GitHub.