Description
RestMapper takes the pain out of integrating with RESTful APIs. It removes all of the complexity with writing API-specific code, and lets you focus all your energy on the important stuff.
RestMapper alternatives and similar packages
Based on the "RESTful API" category.
Alternatively, view RestMapper alternatives based on common mentions on social networks and blogs.
-
doccano
Open source annotation tool for machine learning practitioners. -
falcon
The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale. -
hug
Embrace the APIs of the future. Hug aims to make developing APIs as simple as possible, but no simpler. -
django-tastypie
Creating delicious APIs for Django apps since 2010. -
connexion
Swagger/OpenAPI First framework for Python on top of Flask with automatic endpoint validation & OAuth2 support -
Django REST Swagger
Swagger Documentation Generator for Django REST Framework: deprecated -
Flask RestPlus
Fully featured framework for fast, easy and documented API development with Flask -
Dependency Injector
Dependency injection framework for Python -
pycord
Pycord, a maintained fork of discord.py, is a python wrapper for the Discord API -
django-sql-explorer
Easily share data across your company via SQL queries. From Grove Collab. -
sandman2
Automatically generate a RESTful API service for your legacy database. No code required! -
django-admin-interface
:superhero: :zap: django's default admin interface with superpowers - customizable themes, popup windows replaced by modals and many other features. -
flask-restless
NO LONGER MAINTAINED - A Flask extension for creating simple ReSTful JSON APIs from SQLAlchemy models. -
Blueprint/Boilerplate For Python Projects
Blueprint/Boilerplate For Python Projects -
apispec
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification).. -
Flask Google Maps
Easy way to add GoogleMaps to Flask applications. maintainer: @getcake -
PEP 8 Speaks
A GitHub :octocat: app to automatically review Python code style over Pull Requests -
django-treenode
:deciduous_tree: probably the best abstract model/admin for your tree based stuff. -
pyswagger
An OpenAPI (fka Swagger) client & converter in python, which is type-safe, dynamic, spec-compliant. -
django-maintenance-mode
:construction: :hammer_and_wrench: shows a 503 error page when maintenance-mode is on. -
flask_for_startups
Flask boilerplate using a services oriented structure -
ripozo
A tool for quickly creating REST/HATEOAS/Hypermedia APIs in python -
django-newsfeed
A news curator and newsletter subscription package for Django -
Flask-Diamond
:gem: Flask-Diamond is a batteries-included Flask framework. -
discord-interactions-python
Useful tools for building interactions in Python -
#<Sawyer::Resource:0x00007f160f191eb0>
Python package for webscraping in Natural language -
Changelog CI
Changelog CI is a GitHub Action that enables a project to automatically generate changelogs -
Flask Paper Kit
Flask Boilerplate - Paper Kit Design | AppSeed -
django-modern-rpc
Simple XML-RPC and JSON-RPC server for modern Django
Collect and Analyze Billions of Data Points in Real Time
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of RestMapper or a related project?
README
python-restmapper
RestMapper takes the pain out of integrating with RESTful APIs. It removes all of the complexity with writing API-specific code, and lets you focus all your energy on the important stuff. Here's a quick example (using Twitter):
Twitter = RestMapper("https://api.twitter.com/1.1/{path}.json")
auth = OAuth1('YOUR_APP_KEY', 'YOUR_APP_SECRET', 'USER_OAUTH_TOKEN', 'USER_OAUTH_TOKEN_SECRET')
twitter = Twitter(auth=auth)
response = twitter.statuses.mentions_timeline()
Whoa, easy, right? This will call https://api.twitter.com/1.1/statuses/mentions_timeline.json, authenticate the request using OAuth1, and return the response as JSON. The great thing is that there's not much else you need to learn to integrate with any other API. You just plug in the base URL format, provide any optional authentication handlers (that requests provides), and then just start making API calls.
See requests-cloudkit for an example of an authentication handler working with Apple's CloudKit which is compatible right out of the box with RestMapper.
Installation
RestMapper is available for download through the Python Package Index (PyPi). You can install it right away using pip or easy_install.
pip install restmapper
Usage
The first thing you need to do is generate a base RestMapper object that will allow you to instantiate a connection with a remote API.
>>> Twitter = RestMapper("https://api.twitter.com/1.1/{path}.json")
{path}
is just a placeholder for the rest of the path. You'll specify this later when making API calls.
Twitter's API is protected by OAuth1, so the next step is to provide authentication. When integrating with any other API, any requests-compatible auth object can be provided.
>>> from requests_oauthlib import OAuth1
>>> auth = OAuth1('YOUR_APP_KEY', 'YOUR_APP_SECRET', 'USER_OAUTH_TOKEN', 'USER_OAUTH_TOKEN_SECRET')
>>> twitter = Twitter(auth=auth)
Now you can start making calls. The API object's attributes and properties map one-to-one with the API you're integrating with. E.g., the below:
>>> response = twitter.statuses.mentions_timeline()
...will request https://api.twitter.com/1.1/statuses/mentions_timeline.json. The path implied by the attribute syntax is inserted right where the path
placeholder is in the Twitter
object's instantiation earlier.
If you want to pass in body data for a POST, provide a single argument to the call to the API, and specify "POST" as the first attribute. I.e.
>>> twitter.POST.my.request(data)
PATCH, PUT, GET, and POST are all supported. GET is currently the default.
Miscellaneous
By default, python-restmapper will return parsed JSON objects. If you'd like the raw response object for a request, just pass in parse_response=False
as an argument to the API object.
Support
If you like this library, or need help implementing it, send us an email: [email protected].
License [
][license-url]
Apache License, Version 2.0. See [LICENSE](LICENSE) for details.
<!-- Images -->
<!-- .. |downloads| image:: https://img.shields.io/pypi/dm/restmapper.svg?style=flat .. _downloads: https://pypi.python.org/pypi/restmapper -->
*Note that all licence references and agreements mentioned in the RestMapper README section above
are relevant to that project's source code only.