Libtimed v1.0.0
This release will include many breaking features and will while in development live on the v1 branch
Features
Add dataclasses / pydantic models (#14)
Instead of:
print(timed.reports.get()[0]["relationships"]["task"]["data"]["id"])
It should be usable something like this:
>>> reports = timed.reports.get()
>>> some_report = reports[0]
>>> type(some_report)
<class 'libtimed.Report'>
>>> task = some_report.task
>>> type(task)
<class 'libtimed.Task'>
>>> print(task.id)
1234
To retain backwards compatibility allow using old API with __dict__
Breaking Changes
transforms.Time should return datetime.time (#23)
|
def __init__(self, return_datetime: bool = False): |
|
# return_datetime will be removed at some point |
|
# it defaults to True to maintain backwards compatibility |
|
self.return_datetime = return_datetime |
Time transform should return a
datetime.time instead of a
datetime.datetime(1900, 1, 1, time.hours, time.minutes, time.seconds). (see
#17)
Libtimed v1.0.0
This release will include many breaking features and will while in development live on the
v1branchFeatures
Add dataclasses / pydantic models (#14)
Instead of:
It should be usable something like this:
To retain backwards compatibility allow using old API with
__dict__Breaking Changes
transforms.Timeshould returndatetime.time(#23)libtimed/src/libtimed/transforms.py
Lines 156 to 159 in df5db3c
Time transform should return a
datetime.timeinstead of adatetime.datetime(1900, 1, 1, time.hours, time.minutes, time.seconds). (see #17)