Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

CLI to access RESTful service

Project description

A generic CLI to access any RESTful service with a little bit of configuration. Think of it as something in between curl and proper CLI.


  • Replace parts of JSON request body while sending the request using simple[index] notation
  • Print only part of JSON response using above described notation
  • History: Previously sent request are stored and can be resent using --last option
  • Templates: Store preset requests of a particular URL and send them using --template option
  • Service config: Store common headers, URL prefix, preset requests of a particular service in config

It has options similar to curl to fetch and provide request body. -d, -H and -d are same as curl. -X is changed to -m. Currently, the tool uses requests to send HTTP requests. In future, it may just be wrapper on top of curl delegating all options to curl.

Sample usage:

With following configuration in ~/.crest/raxid/

tokens_request = {
    "auth": {
config = {
    "name": "raxid",
    "description": "Rackspace Identity Service",
    "uriprefix": "",
    "headers": {
        "accept": "application/json",
        "content-type": "application/json"
    "resources": {
        "tokens/?$": {
            "templates": {"default": tokens_request},
            "aliases": {
                "username": "auth.passwordCredentials.username",
                "password": "auth.passwordCredentials.password",
            "help": "Authenticate via username/password"

one can authenticate to Rackspace Identity Service and extract token using following command:

crest -s raxid tokens -m post -t -r username=myuname -r password=mypwd -o

For more details check usage


pip install crest
mkdir -p ~/.crest/generic_history  # for --history and --service to work


Thanks to Rackspace for having a culture of hacking on side projects and allowing me to work on this, and having an excellent open source employee contribution policy

Project details

Release history Release notifications

This version


Download files

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

Files for crest, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size crest-0.0.1.tar.gz (7.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page