Installation and Change Log
doctable is on PyPI, so you can install it with pip:
For sqlalchemy >= 2.0: pip install doctable==2.0
For sqlalchemy <= 1.4: pip install doctable==1.0
Changes in Version 2.0
-
Create database connections using
ConnectCoreobjects instead ofConnectEngineorDocTableobjects. -
Database tables represented by
DBTableobjects instead ofDocTableobjects. AllDBTableinstances originate from aConnectCoreobject. -
Create schemas using the
doctable.table_schemadecorator instead of thedoctable.schemadecorator. This new decorator includes constraint and index parameters as well as those for thedataclassobjects. -
The
Columnfunction replacesColas generic default parameter values with more fine-grained control over column properties. This function provides a clearer separation between parameters that affect the behavior of the object as a dataclass (supplied as aFieldArgsobject) and those that affect the database column schema (supplied via aColumnArgsobject). -
New command line interface: you may execute doctable functions through the command line. Just use
python -m doctable execute {args here}to see how to use it.