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)
1 Installation
Install utilitime with:
pip install utilitime
2 Components
The package is composed of several sub-components, each dedicated to functions dealing with mainly one type of time representation.
2.1 dateint
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.
2.2 datetime
Utilitu methods for standard dateime.dateime objects.
2.3 time
Utilitu methods for standard dateime.time objects.
2.4 timestamp
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.
2.5 weekday
Utility methods for ordered lists of weekday names.
2.6 TimeInterval
Defines a type corresponding to a time interval between two specific points in time (and not their difference, like datetime.timedelta).
3 Contributing
Package author and current maintainer is Shay Palachy (shay.palachy@gmail.com); You are more than welcome to approach him for help. Contributions are very welcomed.
3.1 Installing for development
Clone:
git clone git@github.com:shaypal5/utilitime.git
Install in development mode with test dependencies:
cd utilitime
pip install -e ".[test]"
3.2 Running the tests
To run the tests, use:
python -m pytest --cov=utilitime
3.3 Adding documentation
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.
4 Credits
Created by Shay Palachy (shay.palachy@gmail.com).
Metadata
Release files for utilitime 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| utilitime-0.0.3.tar.gz | 25.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| utilitime-0.0.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 39.6 kB
Release files / utilitime-0.0.3.tar.gz
| Download URL | utilitime-0.0.3.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
872181bdb6585570c5684b62d325853ffd07f274153b82dcbcd8fe6f44dd2bbe
|
|
BLAKE2b-256 checksum How to use checksums |
46fd67823945cb39b330b9aa99d5958ecb511d53af654694bfd90504450f6451
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / utilitime-0.0.3-py2.py3-none-any.whl
| Download URL | utilitime-0.0.3-py2.py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
fe47681538dfa2328332edf6284e2103daadc8e5bc8cdee97321626183ec5618
|
|
BLAKE2b-256 checksum How to use checksums |
983cd91245e9489abadee1b34f9947ec2011b877843ecd5aebf949c8da4f828e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for utilitime 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.