Barebone Serverless Python JSON API on Zeit Now

Learn how to set up a Serverless JSON API running on Python and deploy it to Zeit Now

In this post you’ll learn how to set up a boilerplate serverless JSON API serving as a starting point for your project. We’ll use Python 3. If you know some Python, you will be able to go through the steps below to successfully set up the project. Note: I’m using Python 3.6.3.

The full source code can be found on Github:

What we’ll use:

  • Zeit Now, a serverless platform
  • Python 3 and PyCharm as an IDE
  • PostgreSQL and psycopg2, the most popular PostgreSQL adapter for Python

The end result is a fully working Serverless JSON API serving as a starting point for your project (for instance, hosting your Python microservices without having to provision any servers).

Updated full version of this article:

Please view the updated version of this article (including full source code + syntax highlighting of all code snippets) on my website:

Thanks for reading!

Originally published on