Handy REST API client on your terminal
Project description
# RESTEasyCLI
Handy REST API client on your terminal
[![PyPI version](https://img.shields.io/pypi/v/RESTEasyCLI.svg)](https://pypi-hypernode.com/project/RESTEasyCLI)
[![Build Status](https://travis-ci.org/rapidstack/RESTEasyCLI.svg?branch=master)](https://travis-ci.org/rapidstack/RESTEasyCLI)
[![asciicast](https://asciinema.org/a/219065.svg)](https://asciinema.org/a/219065)
- [RESTEasyCLI](#resteasycli)
- [Installation](#installation)
- [Usage](#usage)
- [Help menu](#help-menu)
- [Initialize workspace](#initialize-workspace)
- [Do CRUD requests](#do-crud-requests)
- [Special formatting of data](#special-formatting-of-data)
- [List](#list)
- [Show](#show)
- [Save a request for later use](#save-a-request-for-later-use)
- [Do or redo a saved request](#do-or-redo-a-saved-request)
- [Most importantly fake a request](#most-importantly-fake-a-request)
- [TODO list](#todo-list)
- [Contribution guide](#contribution-guide)
## Installation
```bash
pip install resteasycli
# OR
pipenv install resteasycli
```
## Usage
### Help menu
```bash
recli help
```
### Initialize workspace
```bash
mkdir myworkspace
cd myworkspace
recli init
# Few template files should be generated namely: auth.yml headers.yml saved.yml sites.yml
```
### Do CRUD requests
```bash
recli get testing/todos
recli post testing/todos --kwargs title=abcd userId=10
recli put testing/todos/1 --kwargs title=abcd
recli patch testing/todo1 --kwargs title=xyz
recli delete testing/todos/1
```
### Special formatting of data
#### List
```bash
recli list testing/todos
```
#### Show
```bash
recli show testing/todos/1
```
### Save a request for later use
```bash
recli get testing/todos/1 -s my_request
# Request will be saved in saved.yml as "my_request"
```
### Do or redo a saved request
```bash
# Without formatting
recli do remind_shopping
# Same as
recli redo remind_shopping
# With formatting
recli dolst remind_shopping -m GET -k
# Same as
recli redo-list remind_shopping --method GET --kwargs
```
### Most importantly fake a request
```bash
recli redo-show remind_shopping -m GET -k --fake
# It can be used with -s to save the request for later use without doing it
recli redo-show remind_shopping -m GET -k --fake -s get_todos
```
## TODO list
- [x] CRUD requests
- [x] Formatted outputs
- [x] Save requests feature
- [x] Refactored sites, headers, authentication methods, saved requests
- [ ] Design a icon for it and it's dependency [RESTEasy](https://github.com/rapidstack/RESTEasy)
- [ ] Add full usage documentation with examples
- [ ] Add smart auto completions
- [ ] Fix interactive mode
- [ ] Code coverage > 90%
- [ ] Release version 1
- [ ] Test cases with different environment variables
- [ ] API server for full end to end test with custom headers, authentication
- [ ] Add more authentication methods
- [ ] Add proxy support
- [ ] Token detection for automatic authentication headers update
- [ ] Generate and publish API documentation feature
- [ ] Initialize workspace from generated API documentation
- [ ] Write a blog post, create a youtube video on it
- [ ] [Postman](https://www.getpostman.com) compatibility
...[add more goals](https://github.com/rapidstack/RESTEasyCLI/issues/new)
## Contribution guide
This is a new born project and has lots of scope for improvements.
If you feel that you can help with any of above TODO list or if you have a totally unique idea, feel free to jump right in.
Here are some tips to get started with contributing to this project right away.
- Instead of directly creating pull requests, [create a issue](https://github.com/rapidstack/RESTEasyCLI/issues/new) first to check it's relevence and save efforts. However,
- If you find a bug, feel free to directly create pull requests by forking master branch
- Awesome if commit messages and pull request description are clear and concise
- One of it's depedency [RESTEasy](https://github.com/rapidstack/RESTEasy) has a gitter channel for any doubt or discussion related to this project or [RESTEasy](https://github.com/rapidstack/RESTEasy)
Handy REST API client on your terminal
[![PyPI version](https://img.shields.io/pypi/v/RESTEasyCLI.svg)](https://pypi-hypernode.com/project/RESTEasyCLI)
[![Build Status](https://travis-ci.org/rapidstack/RESTEasyCLI.svg?branch=master)](https://travis-ci.org/rapidstack/RESTEasyCLI)
[![asciicast](https://asciinema.org/a/219065.svg)](https://asciinema.org/a/219065)
- [RESTEasyCLI](#resteasycli)
- [Installation](#installation)
- [Usage](#usage)
- [Help menu](#help-menu)
- [Initialize workspace](#initialize-workspace)
- [Do CRUD requests](#do-crud-requests)
- [Special formatting of data](#special-formatting-of-data)
- [List](#list)
- [Show](#show)
- [Save a request for later use](#save-a-request-for-later-use)
- [Do or redo a saved request](#do-or-redo-a-saved-request)
- [Most importantly fake a request](#most-importantly-fake-a-request)
- [TODO list](#todo-list)
- [Contribution guide](#contribution-guide)
## Installation
```bash
pip install resteasycli
# OR
pipenv install resteasycli
```
## Usage
### Help menu
```bash
recli help
```
### Initialize workspace
```bash
mkdir myworkspace
cd myworkspace
recli init
# Few template files should be generated namely: auth.yml headers.yml saved.yml sites.yml
```
### Do CRUD requests
```bash
recli get testing/todos
recli post testing/todos --kwargs title=abcd userId=10
recli put testing/todos/1 --kwargs title=abcd
recli patch testing/todo1 --kwargs title=xyz
recli delete testing/todos/1
```
### Special formatting of data
#### List
```bash
recli list testing/todos
```
#### Show
```bash
recli show testing/todos/1
```
### Save a request for later use
```bash
recli get testing/todos/1 -s my_request
# Request will be saved in saved.yml as "my_request"
```
### Do or redo a saved request
```bash
# Without formatting
recli do remind_shopping
# Same as
recli redo remind_shopping
# With formatting
recli dolst remind_shopping -m GET -k
# Same as
recli redo-list remind_shopping --method GET --kwargs
```
### Most importantly fake a request
```bash
recli redo-show remind_shopping -m GET -k --fake
# It can be used with -s to save the request for later use without doing it
recli redo-show remind_shopping -m GET -k --fake -s get_todos
```
## TODO list
- [x] CRUD requests
- [x] Formatted outputs
- [x] Save requests feature
- [x] Refactored sites, headers, authentication methods, saved requests
- [ ] Design a icon for it and it's dependency [RESTEasy](https://github.com/rapidstack/RESTEasy)
- [ ] Add full usage documentation with examples
- [ ] Add smart auto completions
- [ ] Fix interactive mode
- [ ] Code coverage > 90%
- [ ] Release version 1
- [ ] Test cases with different environment variables
- [ ] API server for full end to end test with custom headers, authentication
- [ ] Add more authentication methods
- [ ] Add proxy support
- [ ] Token detection for automatic authentication headers update
- [ ] Generate and publish API documentation feature
- [ ] Initialize workspace from generated API documentation
- [ ] Write a blog post, create a youtube video on it
- [ ] [Postman](https://www.getpostman.com) compatibility
...[add more goals](https://github.com/rapidstack/RESTEasyCLI/issues/new)
## Contribution guide
This is a new born project and has lots of scope for improvements.
If you feel that you can help with any of above TODO list or if you have a totally unique idea, feel free to jump right in.
Here are some tips to get started with contributing to this project right away.
- Instead of directly creating pull requests, [create a issue](https://github.com/rapidstack/RESTEasyCLI/issues/new) first to check it's relevence and save efforts. However,
- If you find a bug, feel free to directly create pull requests by forking master branch
- Awesome if commit messages and pull request description are clear and concise
- One of it's depedency [RESTEasy](https://github.com/rapidstack/RESTEasy) has a gitter channel for any doubt or discussion related to this project or [RESTEasy](https://github.com/rapidstack/RESTEasy)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
RESTEasyCLI-0.2.2.tar.gz
(12.9 kB
view details)
Built Distributions
RESTEasyCLI-0.2.2-py3.5.egg
(17.2 kB
view details)
File details
Details for the file RESTEasyCLI-0.2.2.tar.gz
.
File metadata
- Download URL: RESTEasyCLI-0.2.2.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8173df83ec9cdc8c4c24699b0565c2c84e9a95c2b88fcfc443d77497cbe74697 |
|
MD5 | 655c1f8863c09912322bb2d4a962cc7d |
|
BLAKE2b-256 | 582b4808935d48407412173fea675ebe7db27711d2d9c00ef0ae57da5ad6dac7 |
Provenance
File details
Details for the file RESTEasyCLI-0.2.2-py3.5.egg
.
File metadata
- Download URL: RESTEasyCLI-0.2.2-py3.5.egg
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef48667f7f87fb7d5a7382a2b1d27ed390ed21ae6e4eda3a6a9e31d3ad4235bd |
|
MD5 | 9c14c930f034186b8bf72c5c8c7993d2 |
|
BLAKE2b-256 | 0ca5ee4f5e2ec73daa72d5d356c6d65d78653960261549cb03e15a5cd6939d42 |
Provenance
File details
Details for the file RESTEasyCLI-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: RESTEasyCLI-0.2.2-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a9fd3a7cefe19d820bb5d90a103fe422b06c28cae942512b796e293171b4009 |
|
MD5 | d960c63f9cf6bb1e5092cf8d2150a475 |
|
BLAKE2b-256 | 53dfe3f17e6f57c0f93afba18dab4d0c4e8604f4feaaa1a4fe9a37a9c345ace0 |
Provenance
File details
Details for the file RESTEasyCLI-0.2.2-py2-none-any.whl
.
File metadata
- Download URL: RESTEasyCLI-0.2.2-py2-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b7e388d9e3e96cd1f3f3f7d82be7575ef62a28f402af656c0329155acea3a92 |
|
MD5 | 3fd0006cbe218e22e295edef6a131367 |
|
BLAKE2b-256 | 5f7d65c880589344740fa27253a5a12f0b68d1f3f998168cfb4db2a51abb5eec |