A small pure-python package for time-related utility functions.
A small pure-python package for utility decorators.
from utilitime.datetime import datetime_to_dateint from utilitime.dateint import shift_dateint, today_int, dateint_range start_dateint = datetime_to_dateint(some_dt_obj) day_after_tomorrow = shift_dateint(today_int, 2) dateints_to_process = dateint_range(start_dateint, day_after_tomorrow)
Install utilitime with:
pip install utilitime
The package is composed of several sub-components, each dedicated to functions dealing with mainly one type of time representation.
The dateint format uses integer objects to decipt a specific calendaric day; e.g. 20161225. This components deals with converintg and transforming objects of this type.
Utilitu methods for standard dateime.dateime objects.
Utilitu methods for standard dateime.time objects.
The timestamp format uses integer objects to decipt a specific moment in time by seconds (or sometimes milliseconds) since the epoc;h e.g. 1506984924. This components deals with converintg and transforming objects of this type.
Utility methods for ordered lists of weekday names.
Defines a type corresponding to a time interval between two specific points in time (and not their difference, like datetime.timedelta).
Package author and current maintainer is Shay Palachy (email@example.com); You are more than welcome to approach him for help. Contributions are very welcomed.
git clone firstname.lastname@example.org:shaypal5/utilitime.git
Install in development mode with test dependencies:
cd utilitime pip install -e ".[test]"
To run the tests, use:
python -m pytest --cov=utilitime
This project is documented using the numpy docstring conventions, which were chosen as they are perhaps the most widely-spread conventions that are both supported by common tools such as Sphinx and result in human-readable docstrings (in my personal opinion, of course). When documenting code you add to this project, please follow these conventions.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size utilitime-0.0.3-py2.py3-none-any.whl (14.0 kB)||File type Wheel||Python version 3.6||Upload date||Hashes View|
|Filename, size utilitime-0.0.3.tar.gz (25.6 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for utilitime-0.0.3-py2.py3-none-any.whl