Skip to main content

Generate client based on OpenAPI Specification and wrap it in a command line interface

Project description

# OpenCLI

A CLI for every service which exposes a OpenAPI (Swagger) specification endpoint.

From the OpenAPI Specification project:

> The goal of The OpenAPI Specification is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection.

## Demo

![Alt Text](https://github.com/sharbov/open-cli/blob/master/demo.gif)

## Docker

To start a CLI session run:

docker run -it sharbov/open-cli <swagger-spec-url>

e.g:

docker run -it sharbov/open-cli http://petstore.swagger.io/v2/swagger.json

## Python

### Installation

To install OpenCLI, simply:

pip install opencli

### Usage

To start a CLI session run:

open-cli <swagger-spec-url>

e.g:

open-cli http://petstore.swagger.io/v2/swagger.json

For more options run:

open-cli -h

Credits

This project relies on Yelps [bravado](https://github.com/Yelp/bravado) project & on Jonathan Slenders [python-prompt-toolkit](https://github.com/jonathanslenders/python-prompt-toolkit).

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

opencli-0.0.9.tar.gz (101.9 kB view details)

Uploaded Source

File details

Details for the file opencli-0.0.9.tar.gz.

File metadata

  • Download URL: opencli-0.0.9.tar.gz
  • Upload date:
  • Size: 101.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for opencli-0.0.9.tar.gz
Algorithm Hash digest
SHA256 99803fa7a9775c47675bb264905d70012b6976331203b18c8ecf7b96d0315846
MD5 fd4e995ba2313b4088e36a1a03432597
BLAKE2b-256 ff20a10dc4d7190b6df68f702933994d3dd34f44688f372d1365bd87f2f4b42d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page