python

Parsing and validating data in Python using Pydantic

Parsing and validating data in Python using Pydantic

  • March 23, 2021

The introduction of type hinting opened the gates for many great new features in Python. And data validation and parsing became easier to do with the use of type hints. Pydantic is one such package that enforces type hints at runtime. It throws errors, allowing developers to catch invalid data....

Statically type checking Python code using Pyright

Statically type checking Python code using Pyright

  • March 16, 2021

With the introduction of type hinting in Python 3.5, static typing and checking Python codes has started to gain popularity. While MyPy was the first tool to do static type checking of Python code, many other frameworks have been built after it. Pyright is one such tool built by Microsoft...

Testing Python applications using Pytest

Testing Python applications using Pytest

  • March 9, 2021

Testing our code brings in a variety of benefits, including building confidence in the code’s functioning and having lesser regressions. Writing and maintaining tests requires some additional work, and that is why we want to leverage tools as much as we can. Python does provide inbuilt tools such as unittest...

Getting started with Flask: a Python microframework

Getting started with Flask: a Python microframework

  • February 25, 2021

Flask is a python framework for writing web applications. It is a microframework, which as the name suggests, is a small, clean, and simple to use framework. It comes with a minimal set of features, which sounds like a strange choice at first. So why would we choose Flask if...

Managing Python dependencies using Virtual Environments

Managing Python dependencies using Virtual Environments

  • February 23, 2021

When we start building a Python project that goes beyond simple scripts, we tend to start using third-party dependencies. When working on a larger project, we need to think about managing these dependencies in an efficient manner. And when installing dependencies, we always want to be inside virtual environments. It...