Setting up the projects
The PCCS project has two versions: ch10-relational
, which uses a PostgreSQL database with Piccolo ORM as the data mapper, and ch10-mongo
, which saves data as MongoDB documents using Beanie ODM.
Using the Piccolo ORM
ch10-relational
uses a fast Piccolo ORM that can support both sync and async CRUD transactions. This ORM was not introduced in Chapter 5, Connecting to a Relational Database, because it is more appropriate for computational, data science-related, and big data applications. The Piccolo ORM is different from other ORMs because it scaffolds a project containing the initial project structure and templates for customization. But before creating the project, we need to install the piccolo
module using pip
:
pip install piccolo
Afterward, install the piccolo-admin
module, which provides helper classes for the GUI administrator page of its projects:
pip install piccolo-admin
Now, we can create a project inside a newly created root project...