Skip to main content

Smart timestamp utility

Project description

wttime - A fuzzy time parser

DISCLAIMER: At this point, the code is a dirty initial sketch of what I want to build. Assume I have no idea what I'm doing.

Tired of figuring out what this timestamp means? Done with format strings? Cannot be bothered to care about all the seconds, millis, and jiffies?

You don't have to! wttime is a fuzzy parser that can recover and disambiguate virtually any time specification you can throw at it.

Getting Started

Installation

pip install wttime

Examples

Guessing the most likely meaning:

$ wttime 1231312312
UTC:     2009-01-07 07:11:52 (+0000)
$ wttime 1231231233000000
UTC:     2009-01-06 08:40:33 (+0000)

Help

wttime --help

TODOs

  • add CI
  • add parsers for standard timestrings
  • add more output options
  • get more data about format frequency in the wild
  • refactor main to pull out logic and test it
  • add type annotations and start checking

Development

Run tests

pytest

Publish to PyPI

python setup.py sdist
twine upload dist/*

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wttime-0.1.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page