Handmade backend for Android app using Python Flask Framework

Mohammed Audhil
AndroidPub
Published in
2 min readNov 26, 2017

--

You are a mobile developer, you are very much happy with your handcrafted apps. Ever wondered of exploring/making backend services for your apps by own.? I recently encountered Python Flask framework. It is easy to understand and to do. I’ll roughly go through it.

Flask web app (Assumptions: Python3, Flask, PyCharm IDE)

Step 1 — Install Flask framework

$ pip3 install Flask

Step 2 — Start coding

I’ve discussed other ways of running a web app based on our need.

ways of running Flask web app

Step 3 Run the server

Since, I use PyCharm with Mac book, Ctrl + R -> to run server

PyCharm
Chrome browser — root
Chrome browser — GET
Postman (1) — POST
Postman (2) — POST

Android App (Assumptions: Retrofit2, Gradle 3.0.0, Kotlin, Android Studio)

Retrofit API service,

retrofit2 in App source code

POST request from the app,

making a POST request from app

GET request from the app,

making a GET request from app

It’ll work, goto github for full source code.

Happy Coding!

--

--

Mohammed Audhil
AndroidPub

Software Engineer @Blackhawk_Networks | more: https://github.com/Audhil (Pray. Eat. Code. Sleep.)