Keith dd133115cd | 8 yıl önce | |
---|---|---|
.. | ||
code | 8 yıl önce | |
slides | 8 yıl önce | |
README.md | 8 yıl önce |
Got data? Sure you do. But, Is it useful? How about that documentation and, oh yeah, sample use scenarios?
While “useful” is a relative term, your FTP server doesn’t need another undocumented CSV in it, and we already know the “download” metrics for that file aren’t really telling us the truth ... the same IP keeps downloading every file from 1am-4am everyday.
Why not wrap an API around your data and exposure something really useful? Not only will you gain a great deal of flexibility in what you expose, you can continue to improve what you expose, understand how it is being used and provide documentation and even an online test harness for end users. They can learn about how your API works, what the return data looks like and what the real value of what you have to offer might be. All the while, if you need to work on adding data, enhancing performance or adapting to format changes, the end user has continuous access to your data API while you work.
Well it isn’t ... in less than an hour we’ll go through the steps of building a real (RESTish) API around a dataset to turn your imaginary users into real ones. Using the OpenAPI specification, Python and a super-useful Python package called Connexion, we’ll work our way toward a fully functional API with documentation and a test harness.
Resource | Notes |
---|---|
OpenAPI Specification | Check out the full documentation of the spec. |
Connexion | Core repo for the Connexion framework built on top of Flask. |
Connexion Example Service | Example that inspired this talk. |
XLRD | The MS Excel file reader in Python (a prerequisite for this demo). |
Zalando’s Restful API Guidelines | A nice guide to explore for some best practices about REST-based APIs |
The slides for this can be found here liberally borrowing from the most awesome reveal.js.
Want to reach out, make a comment or otherwise collaborate? Connect with me kmaull@ucar.edu!