Simply put it is used for deserialization(converting data to application object) and serialization(converting application object to simple types). marshmallow - marshmallow is a library for converting complex datatypes to and from native Python datatypes.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 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
0 Comments
Leave a Reply. |