Python Tutorials

Python Command Line and Web Tutorials for Beginners. Python Automation Tutorials, Machine Learning Tutorials, Python Database Tutorials, Python Flask Tutorials

Getting started with Machine learning on Linux with Python 3 and Scikit-learn

Getting started with Machine learning on Linux with Python 3 and Scikit-learnIn this Tutorial I will describe how you can get started with Machine Learning on Linux using Scikit-Learn and Python 3 Introduction What is Machine Learning ? Machine Learning is a way in which a Computing System like your Linux Computer can predict an output by learning from a sample set of Input Data. For... Read More »

Running Asynchronous background Tasks on Linux with Python 3 Flask and Celery

Running Asynchronous background Tasks on Linux with Python 3 Flask and CeleryIn this tutorial I will describe how you can run asynchronous tasks on Linux using Celery an asynchronous task queue manager. While running scripts on Linux some tasks which take time to complete can be done asynchronously. For example a System Update. With Celery you can run such tasks asynchronously in the background and then... Read More »

How to Build Database driven RESTFUL API Applications with Flask, Flask-RESTFUL and Angularjs’s $resource service

How to Build  Database driven RESTFUL API Applications with Flask, Flask-RESTFUL and Angularjs’s $resource serviceIn this tutorial I will describe how you can Build a RESTFUL API CRUD(Create, Read, Update and Delete) application with the Flask Python Micro-framework, and the Angularjs $resource Service. I be will using the Flask-RESTFUL API extension to create an API backend and then use Angularjs’s $resource service to communicate with it. Prerequisites This Tutorial... Read More »

Buidling a database driven RESTFUL JSON API in Python 3 with Flask Flask-Restful and SQLAlchemy

Buidling a database driven RESTFUL JSON API  in Python 3 with Flask Flask-Restful and  SQLAlchemyIn this tutorial I will be describing how you can quickly build a simple database driven Create,  Read,  Update and Delete JSON API in Python 3 with  Flask and it’s extensions namely Flask-Restful and Flask-SQLAlchemy. Before we start, here’s what you should know about REST. What is REST? REST is  a programming style which describes... Read More »

JSON web token authentication with Flask and Angularjs

JSON web token authentication with  Flask and AngularjsJSON  web tokens  (JWT)  are a mechanism in which a  token is used instead of a username/password to authenticate  API users.  Token’s are  more secure because they can contain a scope ( Access Level) and an Expiry. Thus in case of a compromise the attacker has very limited access to your data. They can also... Read More »

Continuously deploying your Flask/Python code to your Linux production server with GitHub webhooks

Continuously deploying your Flask/Python code  to your Linux production server with GitHub webhooksIn this article I will describe how you can deploy your Flask or python code in your GitHub Repository to your Linux production server as soon as you have committed a change. What is a GitHub Webhook? GitHub Webhooks allow you to set triggers for specific events like a PUSH to your GitHub repository. When... Read More »

One to Many Relationships with Flask-SQLAlchemy

One to Many Relationships with Flask-SQLAlchemyWhile building database applications with Flask-SQLAlchemy, you will come across a situation where you need to define a relationship between two database tables. While creating blogging application I came across such a situation where I had to define a One to Many Relationship between a blog post (Post Table) and post comments(Comments Table). In order... Read More »

Python PostgreSQL example

Python PostgreSQL exampleIn this post I will describe how you can connect to a  PostgreSQL database  with Psycop2 , SQLAlchemy and Flask. Update: I have written a  python script which lets you create a CRUD app along with validations in Python and PostgreSQL by simply specifying the  database fields, You can download it from https://github.com/Leo-G/Flask-Scaffold. Software versions Python 3.4 PostgreSQL 9.3... Read More »

Launching your Flask web application on Linux with Gunicorn and Nginx

Launching your Flask web application on Linux  with Gunicorn and NginxFlask is a web framework for python, Flask tackles Routing, HTML template rendering, Sessions etc. If you are building web applications on Linux then I highly recommend using Flask, here’s how quickly you can build an app with it on Linux. The inbuilt server with Flask is good for development, but sooner or later you... Read More »

How to install Selenium on Linux and automate your web tests

How to  install Selenium on Linux and automate your web testsSelenium is a web testing toolkit that allows you to test a web application in any browser of your choice. It does this with the help of a software called WebDriver which allows you to emulate a web browser and test your web application in it. In this post I am going to show you... Read More »

Page 1 of 212