<metaname="description" content="RESTful web APIs are a crucial mechanism for machine-to-machine communication. Learn more about creating web APIs on Full Stack Python.">
APIs and provides hooks for running through other testing frameworks.</li>
</ul>
<h2>Hosted API testing services</h2>
<ul>
<li>
<p><ahref="https://www.runscope.com/">Runscope</a> is an API testing SaaS application
that can test both your own APIs and external APIs that your application
relies upon.</p>
</li>
<li>
<p><ahref="https://www.apiscience.com/">API Science</a> is focused on deep API testing,
including multi-step API calls and monitoring of external APIs.</p>
</li>
<li>
<p><ahref="http://smartbear.com/api-testing/">SmartBear</a> has several API monitoring
and testing tools for APIs.</p>
</li>
</ul>
<h2>API creation resources</h2>
<ul>
<li>
<p><ahref="http://pydanny.com/choosing-an-api-framework-for-django.html">Choosing an API framework for Django</a>
by <ahref="https://twitter.com/pydanny">PyDanny</a> contains questions and insight
into what makes a good API framework and which one you should currently
choose for Django.</p>
</li>
<li>
<p><ahref="http://www.slideshare.net/Solution4Future/python-restful-webservices-with-python-flask-and-django-solutions">RESTful web services with Python</a>
is an interesting overview of the Python API frameworks space.</p>
</li>
<li>
<p><ahref="http://www.slideshare.net/jmusser/ten-reasons-developershateyourapi">10 Reasons Why Developers Hate Your API (And what to do about it)</a>
goes through the top difficulties and annoyances developers face when
working with APIs and how you can avoid your API falling into the same
traps.</p>
</li>
<li>
<p>Versioning of RESTful APIs is a difficult and contentious topic in the
web API community. This two-part series covers
<ahref="http://urthen.github.io/2013/05/09/ways-to-version-your-api/">various ways to version your API</a>
and <ahref="http://urthen.github.io/2013/05/16/ways-to-version-your-api-part-2/">how to architect a version-less API</a>.</p>
</li>
<li>
<p><ahref="http://www.narwhl.com/">NARWHL</a> is a practical API design site for
developers confused about what is appropriate for RESTful APIs.</p>
</li>
<li>
<p><ahref="http://blog.luisrei.com/articles/flaskrest.html">Implementing a RESTful Web API with Python & Flask</a>
is a straightforward introduction to using Flask to create request
is an appeal that metadata makes a difference in whether APIs are descriptive
or not.</p>
</li>
<li>
<p><ahref="http://artsy.github.io/blog/2014/09/12/designing-the-public-artsy-api/">Designing the Artsy API</a>
has their recommendations list for building an API based on their recent
experiences.</p>
</li>
<li>
<p><ahref="https://bourgeois.me/rest/">Some REST Best Practices</a> is a high level
summary of rules to follow while creating your API.</p>
</li>
<li>
<p>Hacker News had a discussion on
<ahref="https://news.ycombinator.com/item?id=8912897">what's the best way to write an API spec?</a>
that provides a few different viewpoints on this topic.</p>
</li>
<li>
<p><ahref="https://pages.apigee.com/rs/apigee/images/api-design-ebook-2012-03.pdf">Apigee's Web API Design ebook</a>
is free and contains a wealth of practical advice for what design
decisions to make for your web API.</p>
</li>
<li>
<p><ahref="http://developers.lyst.com/2015/02/20/1-to-1-relationships-and-subresources-in-rest-apis/">1-to-1 Relationships and Subresources in REST APIs</a>
tells the story of design decisions that were made during an API's creation
and why those choices were made.</p>
</li>
<li>
<p><ahref="http://blog.luisrei.com/articles/flaskrest.html">Implementing a RESTful Web API with Python & Flask</a>
is a good walkthrough for coding a Flask app that provides standard
web API functionality such as proper HTTP responses, authentication
and logging.</p>
</li>
<li>
<p><ahref="http://resthooks.org/">REST Hooks</a> is an open source Python project that
makes it easier to implement subscription-based "REST hooks". These REST
hooks are similar to webhooks, but provide a different mechanism for
subscribing to updates via a REST interface. Both REST hooks and webhooks
are far more efficient than polling for updates and notifications.</p>
</li>
</ul>
<h2>API creation learning checklist</h2>
<p><iclass="fa fa-check-square-o"></i>
Pick an API framework appropriate for your web framework. For Django I
recommend Django REST framework and for Flask I recommend Flask-RESTful.</p>
<p><iclass="fa fa-check-square-o"></i>
Begin by building out a simple use case for the API. Generally the use case
will either involve data that users want in a machine-readable format or a
backend for alternative clients such as an iOS or Android mobile app.</p>
<p><iclass="fa fa-check-square-o"></i>
Add an authentication mechanism through OAuth or a token scheme.</p>
<p><iclass="fa fa-check-square-o"></i>
Add rate limiting to the API if data usage volume could be a performance issue.
Also add basic metrics so you can determine how often the API is being
accessed and whether it is performing properly.</p>
<p><iclass="fa fa-check-square-o"></i>
Provide ample documentation and a walkthrough for how the API can be accessed
and used.</p>
<p><iclass="fa fa-check-square-o"></i>
Figure out other use cases and expand based on what you learned with the
initial API use case.</p>
<h3>What's next after building an API for your web app?</h3>