comparison trafficintelligence/iframework.py @ 1248:c4c50678c856

clean api update in sqlalchemy
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Thu, 15 Feb 2024 14:09:23 -0500
parents 35725db5e83f
children 4dd446835e7d
comparison
equal deleted inserted replaced
1247:439207b6c146 1248:c4c50678c856
2 2
3 from enum import Enum 3 from enum import Enum
4 from pathlib import Path 4 from pathlib import Path
5 from datetime import datetime 5 from datetime import datetime
6 6
7 from sqlalchemy.ext.declarative import declarative_base, declared_attr 7 from sqlalchemy.ext.declarative import declared_attr
8 from sqlalchemy import Table, Column, Integer, Boolean, String, Float, DateTime, Enum as SQLEnum, ForeignKey, CheckConstraint, create_engine 8 from sqlalchemy import Table, Column, Integer, Boolean, String, Float, DateTime, Enum as SQLEnum, ForeignKey, CheckConstraint, create_engine
9 from sqlalchemy.orm import relationship, backref, sessionmaker 9 from sqlalchemy.orm import relationship, backref, sessionmaker, declarative_base
10 10
11 Base = declarative_base() 11 Base = declarative_base()
12 12
13 GenderEnum = Enum('GenderEnum', 'male female unknown') 13 GenderEnum = Enum('GenderEnum', 'male female unknown')
14 ModeEnum = Enum('ModeEnum', 'cardriver carpassenger transit taxi motorcycle cycling walking other') # the idea is that the mode could be sufficient to record all events (line and zone crossings), whether the actual, more precise vehicle, is 14 ModeEnum = Enum('ModeEnum', 'cardriver carpassenger transit taxi motorcycle cycling walking other') # the idea is that the mode could be sufficient to record all events (line and zone crossings), whether the actual, more precise vehicle, is