/saramPy

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Build Status Documentation

saramPy

saramPy is the Python bindings for the Saram API. It provides both a Python module to be used from Python scripts, and also a command line util called saram.

Requirements

saramPy is written and works only with Python 3.7+

Install

May have to install with sudo to ensure saram is placed on path.

pip3 install saramPy

Install dev version with pip

git clone https://github.com/securisec/saramPy.git
cd saramPy
pip3 install -e .
# to update future versions without reinstalling, use from inside saramPy folder
git pull

Usage

Init

Before using saramPy, make sure to setup the API key. Easiest way to set it up is to run

saram --init yourapikey

Script

Refer to the docs on how to user saramPy Python module.

Command line tool

$ saram --help
usage: saram [-h] -t TOKEN [-l] [--comment COMMENT] [-c ... | -f FILE]
             [--baseurl BASEURL]

optional arguments:
  -h, --help            show this help message and exit
  -t TOKEN, --token TOKEN
                        Token for the entry
  -l, --local           Dev mode. Use localhost
  --comment COMMENT     Add an optional comment
  -c ..., --command ...
                        Command to run inside quotes
  -f FILE, --file FILE  Read a file and send it to the server
  --baseurl BASEURL

Docs

Documentation is on readthedocs

To manually set up docs, run the following commands from inside the saram directory

pip3 install sphinx
cd docs/
make clean html

Then open the docs located in _build/html/index.html