What IS Python
Short introduction to Python
Python is a general-purpose coding language—which means that, unlike HTML, CSS, and JavaScript, it can be used for other types of programming and software development besides web development. Python is interpreted, easy to learn surrounded by a huge ecosystem, actively supported and used in many industries and domains - Resources:
Python - the official website
Python For Beginners - a starting guide
Python Cheatsheet - this site should make you curious
Flask - popular Python web framework
Can be used for things like: (starting from the simple ones)
Basic programming: using strings, adding numbers, open files
Writing system scripts (creating instructions that tell a computer system to “do” something)
Back end (or server-side) web and mobile app development
Desktop apps and software development
Processing big data and performing mathematical computations
Install Python
The Python can be downloaded from the official website. Choose the installer for your operating system, download, and click a few times. By typing python --version in a terminal window, you should see something like this:
Coding in Python
To start using Python we need to open a terminal, type python
and we should be see the python console waiting for input.
Define variables
Use a variable
Concatenate strings
Multiply a string
Concatenate a string with a number
Install libraries
Python is an open-source software actively supported by a huge ecosystem where programmers expose their work to be reused by others. Flask and Django are just a few examples. The full-index with available packages can be found on PyPI - Python Package Index.
In this section we will write code to extract the title from a web page. To do this, we will reuse two popular libraries putbished on PyPI and use them in the python console to extract the title from google.com
.
PIP is a official package installer for Python and usually is shipped by Python installer.
Once the libraries are installed succesfully, we can write code in the Python console.
Just for fun, we can scan and extract the title from Google
site with a few lines of code:
Flask - Available under the BSD license, Flask is another popular Python framework. Inspired by the Sinatra Ruby framework, the microframework requires Jinja2 library and Werkzeug WSGI toolkit.
Django - Full-stack framework Django is one of the most beloved web development frameworks for developing Python applications.
FastAPI - a high performance, easy to learn, ready for production framework
Resources
Flask Dashboards - provided by AppSeed
Django Dashboards - a curated list
Join AppSeed - For support and
production-ready
starters
Last updated