dateglob converts a set of dates into a list of globs. For example:
>>> import dateglob; from datetime import date, timedelta >>> # build list of dates from 2009-12-31 thru 2011-02-01 >>> dates = [date(2009, 12, 31) + timedelta(i) for i in xrange(1+365+31+1)] >>> dateglob.strftime(dates, '%Y-%m-%d') ['2009-12-31', '2010-*-*', '2011-01-*', '2011-02-01']
The original use case for this library was to generate compact command lines for command that take daily log files as input, for example:
>>> args += dateglob.strftime(dates, '/logs/foo/%Y/%m/%d/*.gz')
dateglob.strftime() handles all of the standard arguments to datetime.strftime(). Currently, it only does something special with full months, years, and full ten-day periods (we don’t glob weeks).
source: <http://github.com/Yelp/dateglob>
documentation: <http://packages.python.org/dateglob/>
datetime.strftime(): <http://docs.python.org/library/datetime.html#strftime-and-strptime-behavior>
Metadata
Release files for dateglob 1.1.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 | |
|---|---|---|---|
| dateglob-1.1.1.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dateglob-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / dateglob-1.1.1.tar.gz
| Download URL | dateglob-1.1.1.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a19080a0191d4f3e5e9d1dbff14e0fd60f782d7bce1748c685be6d059cc91407
|
|
BLAKE2b-256 checksum How to use checksums |
e1112eb67baf9e55cec5a9f3b9642f8283d271d1ec7f41722b43f195708eddbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / dateglob-1.1.1-py3-none-any.whl
| Download URL | dateglob-1.1.1-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ccc218e81468dce131749d1a6c46fb4c33b845bf7e578be1c13ac12ec52d2b57
|
|
BLAKE2b-256 checksum How to use checksums |
65f1944b1b0a6d5d4a1b3d23ce1433f3c45b3e19ac1f7faa7acfd0a293fa2817
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|