question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add use of pendulum for date/datetime management

See original GitHub issue

Is your feature request related to a problem? Please describe. I recently found pendulum and started using it as my default date and datetime management library since the standard python datetime module is not very rich.

Describe the solution you’d like It would be nice if we could choose either to use the standard datetime module or to use pendulum as our default library to type date/datetime properties.

I’m already using pendulum types in pydantic models I coded manually and so far so good! These types are pendulum.Date and pendulum.DateTime and pendulum.Time.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
koxudaxicommented, Jan 11, 2022

@dreinon I’m sorry for my late reply. It’s interesting. I will add the task to a TODO list. Thank you!!

0reactions
karolzlotcommented, May 8, 2022

In order to make Arrow pydantic-compatible, the following page from the pydantic docs can be followed, that says that any class can be made pydantic compatible by setting a couple methods for validation and schema generation

@dreinon I think it won’t be enough. What is needed is discussed in this issue: https://github.com/samuelcolvin/pydantic/issues/951

Pydantic just doesn’t have all needed features yet, although various workarounds are possible.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation | Pendulum - Python datetimes made easy
Introduction. Pendulum is a Python package to ease datetimes manipulation. It provides classes that are drop-in replacements for the native ones (they inherit ......
Read more >
Human datetime diffs with Pendulum - python - Stack Overflow
From the Pendulum module readme: now = pendulum.now() future = now.add(years=10, weeks=5) delta = future - now delta.in_words() >>>'10 years ...
Read more >
Pendulum – Python datetimes made easy | Hacker News
Back in 2012, I filed a Python bug, "datetime: add ability to parse ... a date time library if you don't already use...
Read more >
How to use the pendulum.datetime function in pendulum - Snyk
How to use the pendulum.datetime function in pendulum · To help you get started, we've selected a few pendulum examples, based on popular...
Read more >
convert date to day in python pendulum - You.com | The AI ...
The pendulum is one of the popular Python DateTime libraries to ease DateTime manipulation. It provides a cleaner and easier to use API....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found