Skip to main content

Implementing a RESTful Web API with Python & Flask for beginner

Before start working restful api with python with flask run following commands(i am using mac)


A) python -m pip install mysql-connecto
1)  pip install requests 
2) pip install flask-restful
3) git clone https://github.com/flask-restful/flask-restful.git
4) python
5) pip install requests
6) cd flask-restful/ source bin/activate
8) python setup.py develop
   curl http://127.0.0.1:5000/

   curl http://127.0.0.1:5000/aticle
     DONE


Commands history-

lsb_release -a
mkdir ~/.virtualenvs
pip freeze
pip install virtualenvwrapper
vim ~/.bashrc
mkvirtualenv ashish
deactivate
ls .virtualenvs/
mkvirtualenv devendra
deactivate
rmvirtualenv ashish
rmvirtualenv devendra
mkvirtualenv test
deactivate
workon test
deactivate
source ~/.virtualenvs/test/bin/activate
deactivate

Comments

Popular posts from this blog

GIT command

https://kbroman.org/github_tutorial/pages/branching.html Note:- Always get pull request before working on any branch git pull  branch name or  git pull  origin branch name To commit code git commit -m"comment for changes" To push the code git push origin staging To hold the branch in the same state git stash To get the stashed branch in normal mode git stash pop If code conflict during git command or reverting conflict occur while git pull or branch chekout git reset -hard HEAD To get in working branch or switch to another branch git checkout staging To create a new branch git checkout -b branch name