Save Time type in SQLAlchemy

The following code saves the current time using the Time type

import datetime
from sqlalchemy import (Text, Time)
class Tel(Base):
    __tablename__ = 'tel'
    no = Column(Text)
    updated_at = Column(Time, default=datetime.datetime.now().time())

I don't feel like I'm not good at handling time ...

If you look at "A type for ~" on the page here, you can see the mapping between SQLAlchemy type and Python type. I understand.

Recommended Posts

Save Time type in SQLAlchemy
OperationalError in SQLAlchemy + SQLite3
Save TOPIX time series in pickle, csv, Excel format
Override save method in django-models
Methods available in set type
Precautions when changing unix time to datetime type in pandas
Mastering type hinting in PyCharm
Use <input type = "date"> in Flask
How to handle session in SQLAlchemy
Function argument type definition in python
Save the binary file in Python
(sqlalchemy) Display text in select field
Dynamically load json type in python
Measure function execution time in Python
Type specified in python. Throw exceptions
Save a YAML-formatted file in PyYAML
Code tests around time in Python