Talk given at Datapalooza Denver 2016 titled "(Your) Data as a Service: The Easy Way to Build an API for Your Data".
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

152 行
6.3 KiB

  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Creating Data APIs in Python</title>
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  9. <link rel="stylesheet" href="reveal/css/reveal.css">
  10. <link rel="stylesheet" href="reveal/css/theme/black.css" id="theme">
  11. <!-- Theme used for syntax highlighting of code -->
  12. <link rel="stylesheet" href="reveal/lib/css/zenburn.css">
  13. <!-- Printing and PDF exports -->
  14. <script>
  15. var link = document.createElement( 'link' );
  16. link.rel = 'stylesheet';
  17. link.type = 'text/css';
  18. link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
  19. document.getElementsByTagName( 'head' )[0].appendChild( link );
  20. </script>
  21. <!--[if lt IE 9]>
  22. <script src="reveal/lib/js/html5shiv.js"></script>
  23. <![endif]--></head>
  24. <!-- http://htmlcheats.com/reveal-js/reveal-js-tutorial-reveal-js-for-beginners/ -->
  25. <body>
  26. <div class="reveal">
  27. <div class="slides">
  28. <section data-background="images/14391226325_f4829d4315_k.jpg">
  29. <!-- image CCBY janneke staaks : https://www.flickr.com/photos/jannekestaaks/14391226325/in/photolist-nVGNcP-oYp6Gz-9jMMjh-pTGtd5-cbs9bj-pV9fLL-5A4Aas-mZGfF4-55VAZm-qbdkWE-pevGq2-cbs8SC-q8ZgEq-cbs96A-qbdmhQ-9AJncc-65RcDT-uiDy7-9RmxWY-bRR6a-Cnc9N7-pTQfMt-55RpEe-q8Zh6A-qbgxqP-5s5DkA-gTocSF-qbdkDL-gbFEen-q8ZhdE-rJExPG-cavATQ-a2saox-qf59G-usgzy-8kt895-cZGwz9-9AdKo4-8uvzaT-9jS7wv-aCnY66-9ZanXb-a2mPuH-a8fJsc-a8fJwH-bHrvT6-cbs9uw-PAERs-qb6knr-3FgBeG-->
  30. <h1>(Your) Data <br/>as a Service</h1>
  31. <p><b>The Easy Way to Build an API for Your Data</b></p>
  32. <p>Keith E. Maull, PhD</p>
  33. <p><h5>DATAPALOOZA/Denver<br/> 5-19-2016</h5></p>
  34. </section>
  35. <section>
  36. <section id="fragments_1">
  37. <h2>Say you have some data ...</h2>
  38. <p class="fragment"><span>Maybe it's big data ...</span></p>
  39. <p class="fragment"><span>or small.</span></p>
  40. </section>
  41. </section>
  42. <section>
  43. <section id="fragments_2">
  44. <h2>and maybe the data <br/>is useful to you </h2>
  45. <p class="fragment">... and maybe someone else</p>
  46. <p class="fragment">... and maybe even some other people.</p>
  47. </section>
  48. </section>
  49. <section data-markdown>
  50. ## But there are 3 things you've convinced yourself of:
  51. 1. Building an API is way more work than you have time for.
  52. 2. Writing **_useful_** documentation for an API is going to take even longer than building it.
  53. 3. There's nothing _really wrong_ with CSV files ... even the 1GB ZIP-bomb kind.
  54. </section>
  55. <section>
  56. <section data-background="images/Test-Pattern.jpg">
  57. <p>so you go on your merry way and do nothing</p>
  58. <p class="fragment">... or put that data on an FTP server <br/>and call it a day.</p>
  59. </section>
  60. </section>
  61. <section>
  62. <section>
  63. <h2>This talk is going explore the 'spec first' paradigm for building your data API ...</h2>
  64. </section>
  65. <section>
  66. <h2>Ingredient 0: The Data</h2>
  67. <a href="http://nces.ed.gov/ipeds/datacenter/DataFiles.aspx" target="_blank"><img src="images/ipeds-screenshot.JPG"/></a>
  68. <p>Any data will do, though!</p>
  69. </section>
  70. <section>
  71. <h2>Ingredient 1: The Spec</h2>
  72. <a href="https://github.com/kmaull-ucar/Final_Tutorials/blob/master/Apr-21-2016_BuildDataAPIsFast/code/server/apispec/data_api.yaml" target="_blank"><img src="images/apispec-screenshot.JPG" width="70%"/></a>
  73. <p><a href="https://openapis.org/">OpenAPI is really, really nice!</a></p>
  74. </section>
  75. <section>
  76. <h2>Ingredient 2: The Implementation</h2>
  77. <a href="https://github.com/kmaull-ucar/Final_Tutorials/blob/master/Apr-21-2016_BuildDataAPIsFast/code/server/api_server.py" target="_blank"><img src="images/code-screenshot.JPG" width="70%"/></a>
  78. <p><a href="https://github.com/zalando/connexion">Connexion</a> and <a href="https://github.com/python-excel/xlrd">XLRD</a> are your friends!</a></p>
  79. </section>
  80. <section>
  81. <h2>Ingredient 3: Run and test ...</h2>
  82. <img src="images/apidemo.JPG" width="70%"/>
  83. </section>
  84. </section>
  85. <section data-markdown>
  86. ## What you just learned to do
  87. * You can now make a spec first API,
  88. * with only a few lines of code,
  89. * that produce a running server, documentation and test-harness,
  90. * that can allow you to integrate almost any data source ...
  91. * (even a gnarly XLS file if you need to)!
  92. </section>
  93. <section data-background="images/7074872791_7569aa25e2_k.jpg">
  94. <!-- image CCBY TiEx_Bilder
  95. https://www.flickr.com/photos/tiex_bilder/7074872791/in/photolist-bMbzcn-fwLh3T-mqeDU-FcFG3y-5iXjpn-dsh6A7-7GgnWL-duBHv8-onVoQK-9bGcC6-29LYgB-fxDua2-suu94f-8Ju8zX-92gkw2-fxpJ2F-4wAnhL-8qucRb-4GyPH9-5yaCbm-nEQZfq-5nfAt9-a6Vp7t-8uzmZE-dYWiYd-2F7QwV-dYWk3o-7tAnHQ-fxDu86-dsh6sw-dYWkxE-anhgfY-4zNdmZ-dYQBQD-8uzmUj-5ZS8aG-6dXWD-9GzLJN-u2EMP-htoFf4-5ZMVuX-bvi4N1-htoQFP-4StkSQ-an1jQH-75LsAf-99WCiK-Mg622-agU5J2-2FduhD -->
  96. <p>BE BRAVE: go hack a data API today!</p>
  97. <br/><br/>
  98. <h2>Got Questions?</h2>
  99. <p>kmaull@ucar.edu</p>
  100. <p><a href="http://github.com/kmaull-ucar"><img src="images/GitHub-Mark-Light-64px.png"/></a></p>
  101. </section>
  102. </div>
  103. </div>
  104. <script src="reveal/lib/js/head.min.js"></script>
  105. <script src="reveal/js/reveal.js"></script>
  106. <script>
  107. // More info https://github.com/hakimel/reveal.js#configuration
  108. Reveal.initialize({
  109. controls: true,
  110. progress: true,
  111. history: true,
  112. center: true,
  113. transition: 'slide', // none/fade/slide/convex/concave/zoom
  114. // More info https://github.com/hakimel/reveal.js#dependencies
  115. dependencies: [
  116. { src: 'reveal/lib/js/classList.js', condition: function() { return !document.body.classList; } },
  117. { src: 'reveal/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
  118. { src: 'reveal/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
  119. { src: 'reveal/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
  120. { src: 'reveal/plugin/zoom-js/zoom.js', async: true },
  121. { src: 'reveal/plugin/notes/notes.js', async: true }
  122. ]
  123. });
  124. </script>
  125. </body>
  126. </html>