PolyNOM maps Python model instances to rows in relational Polypheny tables. It runs on top of the Python connector and adds schema definitions, session-based change tracking, and queries that return model instances.
PolyNOM 0.4.0 requires Python 3.11 or later and a Polypheny server with a Prism 2.2 interface. Its distribution name is polypheny-polynom, and its import name is polynom. It depends on the polypheny connector in the range >=2.0.0,<3. PyPI package
How the pieces fit together
| Component | What it does |
|---|---|
BaseSchema |
Defines a relational namespace, table, columns, and constraints. |
BaseModel |
Connects a Python class to a schema. Each instance represents one row. |
Application |
Connects to a Polypheny instance, creates missing schema objects, and optionally applies migrations. |
Session |
Uses its own connection and transaction to track models and persist changes. |
Query |
Selects rows as model instances and supports updating or deleting matching instances within a session. |
An application can connect directly to a running server or start a compatible Docker container. The Python connector also supports executing SQL, MQL, and other supported query languages directly when you need to work with data beyond PolyNOM’s relational model mapping. Python connector guide
Guides
- Install PolyNOM and insert and retrieve your first model. Getting started
- Configure connections and Docker, and understand application startup and migrations. Applications and configuration
- Define columns, data types, models, and relationships. Schemas, models, and relationships
- Work with transactions, filtering, and updates. Sessions and queries
- Execute statements, inspect logs, and export and restore data. Statements, logging, and dumps