Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

An argparse-extension for parsing command-line arguments as time-, date-, datetime-, or timedelta-objects.

Project Description

An argparse-extension for parsing command-line arguments as time-, date-, datetime-, or timedelta-objects.

Latest Version

The latest version of this project can be found at : http://github.com/thomst/timeparse.

Installation

  • Option 1 : Install via pip

    pip install timeparse
    
  • Option 2 : If you have downloaded the source

    python setup.py install
    

Dokumentaion:

Please visit the documentation on readthedocs.org: https://timeparse.readthedocs.org/en/latest/index.html

Usage

How to use?

>>> import argparse
>>> from timeparse import ParseDatetime
>>>
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--datetime', action=ParseDatetime, nargs='+')
>>>
>>> parser.parse_args("--datetime 2.4.2013 23:02".split()).datetime
datetime.datetime(2013, 4, 2, 23, 2)

Reporting Bugs

Please report bugs at github issue tracker: https://github.com/thomst/timeparse/issues

Author

thomst <thomaslfuss@gmx.de> Thomas Leichtfuß

Release History

Release History

This version
History Node

0.5.5

History Node

0.5.4

History Node

0.5.3

History Node

0.5.1

History Node

0.5.0

History Node

0.4.2

History Node

0.4.1

History Node

0.4

History Node

0.3.2

History Node

0.3.1

History Node

0.3

History Node

0.2

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
timeparse-0.5.5.tar.gz (3.0 kB) Copy SHA256 Checksum SHA256 Source Mar 25, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting