Python

How To Use Templates in a Flask Application — step-by-step Python tutorial on Progressive Robot

How To Use Templates in a Flask Application

Jinja is the templating language that Flask uses to render HTML templates. Using templates allows you to separate the business logic of your application from the presentation logic. These templates provide many features that are not available in standard HTML, such as variables, if statements, for loops, filters, and template inheritance. This helps with maintenance of HTML pages, and prevents Cross-Site Scripting attacks.

Read more
How To Harden the Security of Your Production Django Project — step-by-step Python tutorial on Progressive Robot

How To Harden the Security of Your Production Django Project

Developing a Django application can be a quick and clean experience, because its approach is flexible and scalable. Django also offers a variety of security-oriented settings that can help you seamlessly prepare your project for production. In this tutorial, you will leverage a security-oriented workflow for your Django development by implementing and configuring environment-based settings, dotENV, and Django’s built-in security settings.

Read more
How To Perform Sentiment Analysis in Python 3 Using the Natural Language Toolkit (NLTK) — step-by-step Python tutorial on Progressive Robot

How To Perform Sentiment Analysis in Python 3 Using the Natural Language Toolkit (NLTK)

The process of analyzing natural language and making sense out of it falls under the field of Natural Language Processing (NLP). In this tutorial, you will prepare a dataset of sample tweets from the NLTK package for NLP with different data cleaning methods. You will also train a model on pre-classified tweets and use the model to classify them into negative and positives sentiments.

Read more
Python String Append — step-by-step Python tutorial on Progressive Robot

Python String Append

URL: https://www.progressiverobot.com/python-string-append/ Python string object is immutable. So every time we use + operator to concatenate two strings, a new string is created. If we have to append many strings, using + operator will unnecessarily create many temporary strings before we have the final result. Python String Append Let's look at a function to concatenate […]

Read more
How To Write Doctests in Python — step-by-step Python tutorial on Progressive Robot

How To Write Doctests in Python

Python’s standard library comes equipped with a test framework module called `doctest`. The `doctest` module programmatically searches Python code for pieces of text within comments that look like interactive Python sessions. Then, the module executes those sessions to confirm that the code referenced by a doctest runs as expected.

Read more
How To Use the Python Debugger — step-by-step Python tutorial on Progressive Robot

How To Use the Python Debugger

In software development, debugging is the process of looking for and resolving issues that prevent computer software from running correctly. The Python debugger pdb provides a debugging environment for Python programs. In this tutorial, we will go over how to work with pdb to implement an interactive debugging environment that you can use with any of your programs written in Python.

Read more
CHAT