Handy REST API client on your terminal
Project description
RESTEasyCLI
===========
Handy REST API client on your terminal
.. image:: https://img.shields.io/pypi/v/RESTEasyCLI.svg
:target: https://pypi-hypernode.com/project/RESTEasyCLI
:alt: PyPI version
.. image:: https://travis-ci.org/rapidstack/RESTEasyCLI.svg?branch=master
:target: https://travis-ci.org/rapidstack/RESTEasyCLI
:alt: Build Status
.. image:: https://asciinema.org/a/219207.svg
:target: https://asciinema.org/a/219207
:alt: asciicast
* `RESTEasyCLI <#resteasycli>`_
* `Get started with an interactive demo <#get-started-with-an-interactive-demo>`_
* `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>`_
Get started with an interactive demo
------------------------------------
NOTE: This demo requires supported version of python and ``virtualenv`` to be installed
.. code-block:: bash
curl -L https://raw.githubusercontent.com/sayanarijit/RESTEasyCLI/master/tools/demo.sh -o demo.sh
chmod +x demo.sh
./demo.sh
Installation
------------
.. code-block:: bash
# Install it globally
sudo pip install -U resteasycli
# OR
# Install it locally
pip install -U --user resteasycli
Usage
-----
Help menu
^^^^^^^^^
.. code-block:: bash
recli help
Initialize workspace
^^^^^^^^^^^^^^^^^^^^
.. code-block:: 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
^^^^^^^^^^^^^^^^
.. code-block:: 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
~~~~
.. code-block:: bash
recli list testing/todos
Show
~~~~
.. code-block:: bash
recli show testing/todos/1
Save a request for later use
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: 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
^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: 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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: 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
---------
**\ `Check the great TODO list on project board <https://github.com/rapidstack/RESTEasyCLI/projects>`_\ **
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 start 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 <https://gitter.im/rapidstack/RESTEasy>`_ for any doubt or discussion related to this project or `RESTEasy <https://github.com/rapidstack/RESTEasy>`_
* Use `pipenv <https://github.com/pypa/pipenv>`_ to install/update dependencies
* Do not modify ``README.rst`` file. It's auto generated using `m2r <https://github.com/miyakogi/m2r>`_ (Installed as a dev dependency). While updating ``README.md`` file, use `plugin for auto TOC update <https://github.com/ekalinin/github-markdown-toc>`_.
* Run ``./tools/before_push.sh`` before pushing. It will take care of house keeping stuffs like generating ``README.rst``\ , checking if VERSOIN info is updated correctly in all files etc.
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.3.2.tar.gz
(15.0 kB
view details)
Built Distribution
File details
Details for the file RESTEasyCLI-0.3.2.tar.gz
.
File metadata
- Download URL: RESTEasyCLI-0.3.2.tar.gz
- Upload date:
- Size: 15.0 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.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc9ee906f4f6b0b2e7b3806c24502763a669fb8d758b5e7bfbd576ec98c11edb |
|
MD5 | 753f60c53e56cd5db5a572f5d10254c3 |
|
BLAKE2b-256 | 399eb621d55b1f1723969bdf978a34302d723f32d516b9b371c8ae21b0b94591 |
Provenance
File details
Details for the file RESTEasyCLI-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: RESTEasyCLI-0.3.2-py3-none-any.whl
- Upload date:
- Size: 19.0 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.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3819d1e000866ee6783b4116a3219f9366f2151c0d0978fce34594e2ec83a6fb |
|
MD5 | 031b9eb7d0ecb9b4f9daa1c0a2437c41 |
|
BLAKE2b-256 | 6c54149627f237586100d898ee9b63dee28e2dc15e39f27d774a8e3de23fff3a |