Package: ipyrest
IpyrestIpyrest is an emerging Jupyter notebook widget for exploring RESTful APIs. It has two main goals: provide a more convenient interface in the spirit of Postman, and allow for plug-in components, starting with output renderers for various MIME types, e.g. GeoJSON, see below.AboutAt its core ipyrest is a wrapper for the excellent requests package based on the equally excellent ipywidgets package. The idea is to provide more interactive exploration capabilities when working with RESTful APIs. It does so by letting you build requests for an API call and understand more quickly the responses you receive. To that end you can use existing views for requests and responses or build your own. It is inspired by Postman, but without the bloat, and goes beyond it to make sure you can extend it the way you want. In essence, it's for data scientists rather than web developers.Examplefrom ipyrest import Api

# Fix content-type as it is not set for gists.
def reset_content_type(resp):
    resp.headers['Content-Type'] = 'application/vnd.geo+json'

url = 'https://gist.githubusercontent.com/' \
      'deeplook/71e9ded257cfc2d8e5e9/raw/f0cfbab5f266fcb8056e8aea046f1f222346b76b/2013.geojson'
Api(url, post_process_resp=reset_content_type)FeaturesIpyrest deals with the following concepts, implemented to varying degrees: HTTP Server, Service, Request, Response, Data, MIME-Types, Compression, Logging, Caching, Time-Outs, Errors, Views, Plugins, Testing, and UI.At the moment the following plugins are available for rendering output from HTTP responses in common formats: Plain Text, CSV, HTML, Bitmaps, SVG, JSON, GeoJSON, GPX, Protobuf, (and some experimental 3D stuff).The main dependencies are: Python >= 3.6, jupyter, ipywidgets, timeout_decorator, requests, and vcr. Plugin dependencies are: ipyleaflet, ipyvolume, geojson, qgrid, protobuf. Testing dependencies are flask, mypy, and pytest.InstallationReleased versions of ipyrest can be installed from PyPI with:pip install ipyrestDevelopment versions of ipyrest can be installed either directly from GitHub or after downloading/cloning and unpacking like this in its top-level directory:pip install git+https://github.com/deeplook/ipyrest

pip install -e .TestingRunpip install -r requirements_test.txtandPYTHONPATH=. pytest -s -v testsin the root directory. Some tests will automatically start a local flask webserver intests/api_server.pywhich implements a set of sample API endpoints for local testing. And some of these tests need keys/tokens defined as environment variables for the respective APIs being tested. If not present these tests will be skipped.DocumentationThedocsfolder is only a stub for now. At the moment it is recommended to look atexamples/meetup.ipynb, mostly a tutorial-like collection of examples given as a presentation at a meetup. Some of these need appropriate API keys.How to ContributeCheck for open issues or open a fresh issue to start a discussion
around a feature idea or a bug or example for some API (ideally without
authentication), e.g. from the extensive collection ofPublic APIs.Forkthe repositoryon
GitHub to start making your changes to themasterbranch (or
branch off of it).Write a test which shows that the bug was fixed or that the feature
works as expected.Send a pull request and bug the maintainer until it gets merged and
published. :) Make sure to add yourself toAUTHORS.History0.1.0 (2018-11-24):First release on PyPI.0.1.1 (2018-11-25):Minor test refactoring.Minor code/text/formating changes.Minor packaging cleanup.0.1.2 (2018-11-26):Finally rendering README.md on PyPI(?).Enable classic notebook extension for qgrid.0.1.3 (2018-11-27):Minor text formatting issues.0.1.4 (2019-01-28):Refactored test code partly into tools.py.Wrapped execute_request function as method in Api class.