Skip to content
Python API Client and CLI for StoplightIO
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Python3 API Client and CLI for StoplightIO


# clone the repo
git clone

# install requests python module used for HTTP calls
pip3 install requests

# move .py to user bin folder
cp stoplightiopy/ ~/bin


To authenticate API requests from the CLI, supply a token using the --token switch:

python --token {token} --build {domain_id}

Or, store the token in an environment variable called SL_API_TOKEN:

# run in terminal or add to .bashrc
export SL_API_TOKEN={token}

python --build {domain_id}

CLI Usage

usage: python [-h] [--build ID [ID ...]] [--token TK]
                             [--domains ID] [--config ID] [--redirects ID] CLI

optional arguments:
  -h, --help           show this help message and exit
  --build ID [ID ...]  build a list of domain ids
  --token TK           StoplightIO API Token
  --domains ID         return a list of domains for project [ID]
  --config ID          get the config for domain [ID]
  --redirects ID       get the redirects for domain [ID]
You can’t perform that action at this time.