SQLAlchemy-file is a SQLAlchemy extension for attaching files to SQLAlchemy model and uploading them to various storage such as Local Storage, Amazon S3, Rackspace CloudFiles, Google Storage and others using Apache Libcloud.
This replaces the call to datetime.utcnow() to datetime.now(timezone.utc).
datetime.utcnow() is deprecated since python 3.12, and as such shows a warning every time save_to_storage() is called.
We use timezone.utc instead of the more recent datetime.utc, since only the former is available in python 3.7
This replaces the call to
datetime.utcnow()
todatetime.now(timezone.utc)
.datetime.utcnow()
is deprecated since python 3.12, and as such shows a warning every timesave_to_storage()
is called.We use
timezone.utc
instead of the more recentdatetime.utc
, since only the former is available in python 3.7