Skip to content

b3b/ipython-restmagic

Repository files navigation

ipython-restmagic

Latest version on PyPi Supported Python versions CI Status Travis-CI build status Code coverage Status Open examples in Binder

%%rest : IPython magic to execute HTTP requests.

Code repository:https://github.com/b3b/ipython-restmagic
Documentation:https://herethere.me/restmagic
Changelog:https://github.com/b3b/ipython-restmagic/blob/master/CHANGELOG.rst

Usage

In [1]: %load_ext restmagic
In [2]: %%rest
   ...: POST https://httpbin.org/post
   ...: Content-Type: application/json
   ...: Authorization: Bearer $mytoken
   ...:
   ...: {
   ...:     "some": "data",
   ...:     "array here": [
   ...:         "item 1",
   ...:         "item 2"
   ...:     ]
   ...: }
Out [2]: <Response [200]>

Installation

Package can be installed from the PyPI by executing:

pip install restmagic

Development version can be installed by executing:

pip install git+https://github.com/b3b/ipython-restmagic

Package can be uninstalled by executing:

pip uninstall restmagic

Related resources