Skip to content

libtimed v1.0.0 #22

Description

@c0rydoras

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions