Reader small image

You're reading from  Developing Modern Database Applications with PostgreSQL

Product typeBook
Published inAug 2021
PublisherPackt
ISBN-139781838648145
Edition1st Edition
Right arrow
Authors (2):
Dr. Quan Ha Le
Dr. Quan Ha Le
author image
Dr. Quan Ha Le

Dr. Quan Ha Le graduated with a Ph.D. in computer science from the Queen's University of Belfast, United Kingdom, in 2005. Since his Ph.D. graduation, he has been working as a PostgreSQL database administrator all over Alberta and Ontario, Canada, until now. From 2008 to 2019, Dr. Le Quan Ha administered, designed, and developed 24 small, medium, large, and huge PostgreSQL databases in Canada. Since 2016, after writing a good publication on PostgreSQL database clusters on clouds, he has been a member of the United States PostgreSQL Association (PgUS) in New York City. Dr. Le Quan Ha has also been a board member of the PgUS Diversity committee since 2018.
Read more about Dr. Quan Ha Le

Marcelo Diaz
Marcelo Diaz
author image
Marcelo Diaz

Marcelo Diaz is a software engineer with more than 15 years of experience, with a special focus on PostgreSQL. He is passionate about open source software and has promoted its application in critical and high-demand environments where he has worked as a software developer and consultant for both private and public companies. He currently works very happily at Cybertec and as a technical reviewer for Packt Publishing. He enjoys spending his leisure time with his daughter, Malvina, and his wife, Romina. He also likes playing football.
Read more about Marcelo Diaz

View More author details
Right arrow

Features of PostgreSQL with Python

Many Python developers prefer to use PostgreSQL for their applications. Therefore, Python's sample code for using PostgreSQL has been better documented with typical usage scenarios. Both PostgreSQL and Python are popular because of the following:

  • PostgreSQL's open source license is free, so developers can easily operate as many databases as they wish without any cost.
  • We can now find developers who have PostgreSQL experience more easily than other relational databases.
  • Django is a Python Model-View-Template (MVT) web framework, which defines itself as a "batteries included" web framework.
  • Django is simple and robust, and it is one of the most famous frameworks used by websites such as Instagram, YouTube, Google, and NASA.

The following features are emphasized by developers of Python (Django):

  • PostgreSQL's connection with Python: Python developers connect to PostgreSQL databases via the psycopg2 database driver and then use an object-relational mapper (ORM) to turn PostgreSQL tables into objects; finally, these objects can be utilized in their Python applications.
  • A "batteries included" philosophy: The philosophy of "batteries included" means that Python provides plenty of functionalities, including magical ORM, multisite and multi-language support, MVT layouts, RSS and Atom feeds, AJAX support, free APIs, URL routing, easy database migrations, session handling, HTTP libraries and templating libraries, code layouts, and a default admin section.
  • Good tutorials: Django has very good documentation that developers can quickly update with the latest information, such as technical requirements and quick-start details, detailed release notes, backward-incompatible changes, and online topics on Python development.
  • The Django admin interface: The admin interface is one of the key advantages of Django. From a few simple lines of Python code, developers can get a good featured admin interface. 
  • Built-in templates: One of the advantages of Django is its robust built-in template system that facilitates the process of application development.
  • Good scalability: Django can handle heavy traffic and the mobile app usage of many users; it maximizes scalability while minimizing web hosting costs. Django can also execute fine for a large number of hosts while maintaining a relatively cheap or even free hosting price.
  • Best web application securityDjango has protection against SQL injections, XSS and CSRF attacks, and clickjacking, as it hides the source code of websites.
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Developing Modern Database Applications with PostgreSQL
Published in: Aug 2021Publisher: PacktISBN-13: 9781838648145

Authors (2)

author image
Dr. Quan Ha Le

Dr. Quan Ha Le graduated with a Ph.D. in computer science from the Queen's University of Belfast, United Kingdom, in 2005. Since his Ph.D. graduation, he has been working as a PostgreSQL database administrator all over Alberta and Ontario, Canada, until now. From 2008 to 2019, Dr. Le Quan Ha administered, designed, and developed 24 small, medium, large, and huge PostgreSQL databases in Canada. Since 2016, after writing a good publication on PostgreSQL database clusters on clouds, he has been a member of the United States PostgreSQL Association (PgUS) in New York City. Dr. Le Quan Ha has also been a board member of the PgUS Diversity committee since 2018.
Read more about Dr. Quan Ha Le

author image
Marcelo Diaz

Marcelo Diaz is a software engineer with more than 15 years of experience, with a special focus on PostgreSQL. He is passionate about open source software and has promoted its application in critical and high-demand environments where he has worked as a software developer and consultant for both private and public companies. He currently works very happily at Cybertec and as a technical reviewer for Packt Publishing. He enjoys spending his leisure time with his daughter, Malvina, and his wife, Romina. He also likes playing football.
Read more about Marcelo Diaz