pend
This is wrapper of pendulum.
Pendulum is too long and a hassle to type. But pend is easy. That’s just it.
Install
pip install pend
Use
>>> import pend
>>> now_in_paris = pend.now('Europe/Paris')
>>> now_in_paris
'2016-07-04T00:49:58.502116+02:00'
# Seamless timezone switching
>>> now_in_paris.in_timezone('UTC')
'2016-07-03T22:49:58.502116+00:00'
>>> tomorrow = pend.now().add(days=1)
>>> last_week = pend.now().subtract(weeks=1)
>>> past = pend.now().subtract(minutes=2)
>>> past.diff_for_humans()
>>> '2 minutes ago'
>>> delta = past - last_week
>>> delta.hours
23
>>> delta.in_words(locale='en')
'6 days 23 hours 58 minutes'
# Proper handling of datetime normalization
>>> pend.datetime(2013, 3, 31, 2, 30, tz='Europe/Paris')
'2013-03-31T03:30:00+02:00' # 2:30 does not exist (Skipped time)
# Proper handling of dst transitions
>>> just_before = pend.datetime(2013, 3, 31, 1, 59, 59, 999999, tz='Europe/Paris')
'2013-03-31T01:59:59.999999+01:00'
>>> just_before.add(microseconds=1)
'2013-03-31T03:00:00+02:00'
Metadata
Release files for pend 1.0.2
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 |
|---|---|---|---|---|
| pend-1.0.2.tar.gz | 2.4 kB | Without provenance | Details for pend-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pend-1.0.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for pend-1.0.2-py2.py3-none-any.whl |
Total release size: 4.5 kB
Release files / pend-1.0.2.tar.gz
| Download URL | pend-1.0.2.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d155144bb73ebf4bc85c6b0ac21f23b242ee204fb2e9d630e4f51a26cf903ef
|
|
BLAKE2b-256 checksum How to use checksums |
d268a0bc9a13ea60b46f19769ffe7d771a78b28660c5c3fd06e45a65345e08d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
|
Release files / pend-1.0.2-py2.py3-none-any.whl
| Download URL | pend-1.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 2.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5431fa9915a5743e8f273982207db7a201f8e3ddd09ba02195b99a66b50cfbc9
|
|
BLAKE2b-256 checksum How to use checksums |
6ebd3f323c3af31dad12bafeb0c463ef68935450391cbb9aeb9a8a69f55f0fff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
|
Security for pend 1.0.2
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.