datemore
This is a small python package that wraps useful extension helper methods around the standard library datetime package.
$ pip install datemore
This package extends date and datetime objects with useful methods for:
Localizing date and datetime objects
Adding and subtracting
Generating date ranges
Mocking (you cannot mock builtins, so why not use this library in the first place :wink:)
Example:
import datemore.date
sunday = datemore.date.Date(2020, 2, 2)
tuesday = sunday.add_days(2)
passed_days = sunday.range_to(tuesday)
tuesday.native() # Get the native datetime.date object
Do you want to add new extensions? Go ahead! Contributions are welcome, have a look at CONTRIBUTING.
Development
For detailed instructions see CONTRIBUTING.
Tests
You can run tests with
$ invoke test
$ invoke test --min-coverage=90 # Fail when code coverage is below 90%
$ invoke type-check # Run mypy type checks
Linting and formatting
Lint and format the code with
$ invoke format
$ invoke lint
All of this happens when you run invoke pre-commit.
Note
This project is still in the alpha stage and should not be considered production ready.
Metadata
Release files for datemore 1.0.1
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 | Actions |
|---|---|---|---|---|
| datemore-1.0.1.tar.gz | 8.9 kB | Without provenance | Details for datemore-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datemore-1.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for datemore-1.0.1-py2.py3-none-any.whl |
Total release size: 16.5 kB
Release files / datemore-1.0.1.tar.gz
| Download URL | datemore-1.0.1.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b2b98883d78da52d82861855b9c38c600971acd5688d70c9df1027c7cc6cc53
|
|
BLAKE2b-256 checksum How to use checksums |
03959191f069a5620aecebdf755c34d8cf28b5902773efd245d1d9c5bf03d6ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
|
Release files / datemore-1.0.1-py2.py3-none-any.whl
| Download URL | datemore-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
1ac270eda5914dc1edaaed3899e4158594d2c79583086bc34369726285c33b5c
|
|
BLAKE2b-256 checksum How to use checksums |
9ddbde185ef01451abab06b818dec321ebcd4a02697d005a524c18af3dceba00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
|
Security for datemore 1.0.1
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.