
This is needed in running our db migrations from the command line flask-script - provides an extension for managing external scripts in flask.Migration basically refers to the management of incremental, reversible changes to relational database schemas flask-migrate - flask extension that handles SQLAlchemy database migration.psycopg2 - python postgresql adapter that provides some commands for simple CRUD queries and more on postgresql db.flask sqlalchemy - flask wrapper for Sqlalchemy, it adds Sqlalchemy support to flask apps.flask - Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions.The following are the required package dependencies we'll use to develop our blog API service So you may ask, why do we need a virtual environment in Python? using a virtual environment for python projects allows us to have an isolated working copy of python which gives us the opportunity to work on a specific project without worry of affecting other projects.Īctivate the project virtual environment with the following command $ pipenv shell NOTE: we will be using python 3.XX in this project Running pipenv -three will create a virtual environment if not already created using python3 - Read pipenv documentation here to learn more about how it works Open your terminal and run the following command to create blog_api directory $ mkdir blog_apiĬhange your working directory to the directory you just created above and run pipenv command to setup project virtual environment $ cd blog_api Let's create our project's directory and name it blog_api
Postico heroku install#
Install pipenv if you don't already have it installed on your system using pip or if you're using a mac system using brew $ pip install pipenv Setting up project virtual environment using pipenv Run the following commands to check if you have the above installed on your system $ python -version Pipenv - we'll use pipenv to create and manage our project virtual environment and to also install and uninstall packages.PostgreSQL - We'll use postgreSQL relational database for this project.Python3.x - We'll use python 3.XX for the blog service project.Make sure you have the following installed on your system DELETE /api/v1/blogs/ - Delete a blog post(DELETE).

Postico heroku update#

REST is an architectural style and approach to communications in web services development that defines a set of constraint and properties based on HTTP protocols which include GET, POST, PUT and DELETE.

Let's get started with some background context WHAT IS RESTFUL API?Ī RESTful API(Application Programming Interface) is an approach based on REST( REpresentational Stateless Transfer) technology. In this series, I'm going to take you through a very easy to learn path in creating RESTFUL API using Python and Flask micro-framework. You either make your accommodations with failure, or the work will become intolerable - Ellen Ullman

To be a programmer is to develop a carefully managed relationship with error.
