Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Intro to Flask and AT API's
Search
Ian Juma
October 15, 2016
Programming
83
0
Share
Intro to Flask and AT API's
Flask introduction; AfricasTalking API's introduction
Ian Juma
October 15, 2016
More Decks by Ian Juma
See All by Ian Juma
Scaling notifications; notification-service V2
ianjuma
0
33
Building Infrastructure for the Next Generation of Successful African Ventures - Africa's Talking
ianjuma
0
91
Change Management: Building a CI/CD Pipeline
ianjuma
0
130
Ian J, Salama A.B
ianjuma
0
110
Innovation
ianjuma
0
140
Asynchronous Python with gevent and asyncIO
ianjuma
1
2.5k
Scaling AfricasTalking - DevCraft nairobi
ianjuma
0
260
Other Decks in Programming
See All in Programming
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
240
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
780
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
130
ドメインイベントでビジネスロジックを解きほぐす #phpcon_odawara
kajitack
3
770
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
330
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
1
150
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
22
13k
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
250
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
370
Angular Signal Forms
debug_mode
0
110
Making the RBS Parser Faster
soutaro
0
310
iOS機能開発のAI環境と起きた変化
ryunakayama
0
180
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6.1k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
210
Become a Pro
speakerdeck
PRO
31
5.9k
Claude Code のすすめ
schroneko
67
220k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
350
Abbi's Birthday
coloredviolet
2
7.1k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
730
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Exploring anti-patterns in Rails
aemeredith
3
320
How to Talk to Developers About Accessibility
jct
2
180
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
450
Transcript
API’s with Flask Python, Flask, API’s, AT API’s
whoami @IanJuma github.com/ianjuma medium.com/@IanJuma
API
What’s an API A contract between two pieces of software
or services
Setup Python 2.7 / 3. PIP Flask ngrok (local tunneling)
Sample project
Why Flask Simple Un-opinionated Minimal 100% WSGI Lots of extensions
Class based views
Flask API from flask import Flask app = Flask(__name__) @app.route("/api")
def resource(): # perform task return "resource" if __name__ == "__main__": app.run()
API methods from flask import Flask app = Flask(__name__) @app.route("/api”,
methods=[’POST’, ‘GET’, ‘DELETE’, ‘PUT’]) def resource(): # perform task return "resource" if __name__ == "__main__": app.run()
methods... GET - fetch a resource POST - add a
resource DELETE - remove a resource PUT - update a resource HEAD - fetch information about a resource without fetching the resource (options)
Library text API from flask import Flask app = Flask(__name__)
@app.route("/library/api") def resource(): # fetch text from harry potter return harry_potter if __name__ == "__main__": app.run()
Code ... Deep dive
Send SMS from AfricasTalkingGateway import AfricasTalkingGateway # gateway instance gateway
= AfricasTalkingGateway(username, apikey) # send message gateway.sendMessage("+254 703567XXX", "hello...")
Send Airtime from AfricasTalkingGateway import AfricasTalkingGateway # gateway instance gateway
= AfricasTalkingGateway(username, apikey) # send message gateway.sendAirtime("+254 703567XXX", "amount")
Making a voice call gateway = AfricasTalkingGateway(username, apikey) results =
gateway.call(callFrom, callTo)
Handling a call from flask import Flask app = Flask(__name__)
@app.route("/voice/api") def voice(): res = '<Response><Say>"hi, I am testing"</Say></Response>' return res if __name__ == "__main__": app.run()