sqlite-utils-sqlite-dateutil 0.1a0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sqlite-utils-sqlite-dateutil
|
|
3
|
+
Version: 0.1a0
|
|
4
|
+
Summary: sqlite-utils plugin that loads the sqlite-dateutil SQLite extension
|
|
5
|
+
Author: Simon Willison
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Requires-Python: >=3.11
|
|
8
|
+
Project-URL: Homepage, https://github.com/simonw/sqlite-dateutil
|
|
9
|
+
Project-URL: Issues, https://github.com/simonw/sqlite-dateutil/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/simonw/sqlite-dateutil/releases
|
|
11
|
+
Project-URL: CI, https://github.com/simonw/sqlite-dateutil/actions
|
|
12
|
+
Requires-Dist: sqlite-utils
|
|
13
|
+
Requires-Dist: sqlite-dateutil==0.1a0
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# sqlite-utils-sqlite-dateutil
|
|
17
|
+
|
|
18
|
+
sqlite-utils plugin that loads the sqlite-dateutil SQLite extension. [sqlite-dateutil](https://github.com/simonw/sqlite-dateutil) is a C port of [python-dateutil](https://github.com/dateutil/dateutil)'s `parser.parse()`, about 38x faster than calling dateutil from Python.
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
sqlite-utils install sqlite-utils-sqlite-dateutil
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
Once installed, the functions are available to `sqlite-utils query` and `sqlite-utils memory`:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
sqlite-utils memory "select dateutil_parse_fuzzy('Today is January 1, 2047 at 8:21:00AM') as d"
|
|
32
|
+
# [{"d": "2047-01-01T08:21:00"}]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
They are also available to Python code that uses `sqlite_utils.Database()`.
|
|
36
|
+
|
|
37
|
+
Each function returns an ISO 8601 string, or `NULL` where dateutil would raise an exception:
|
|
38
|
+
|
|
39
|
+
| SQL function | Python equivalent |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `dateutil_parse(text)` | `parse(text).isoformat()` |
|
|
42
|
+
| `dateutil_parse_fuzzy(text)` | `parse(text, fuzzy=True).isoformat()` |
|
|
43
|
+
| `dateutil_parse_dayfirst(text)` | `parse(text, dayfirst=True).isoformat()` |
|
|
44
|
+
| `dateutil_parse_fuzzy_dayfirst(text)` | `parse(text, fuzzy=True, dayfirst=True).isoformat()` |
|
|
45
|
+
|
|
46
|
+
See the [sqlite-dateutil documentation](https://github.com/simonw/sqlite-dateutil) for details and the known differences from dateutil.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
sqlite_utils_sqlite_dateutil/__init__.py,sha256=tR7NvRBGKKKqhIQOm1BTI797FOZPz6hyUjGNnKLfMTs,153
|
|
2
|
+
sqlite_utils_sqlite_dateutil-0.1a0.dist-info/METADATA,sha256=aonJfABzN0ul0P9AT1k_R-WGyvGAkujaHdn3xKUwooM,1908
|
|
3
|
+
sqlite_utils_sqlite_dateutil-0.1a0.dist-info/WHEEL,sha256=8K9zzzCZkiOKg1UAZcHRzAjvM9pLKf0diGzeZ7lbRqM,108
|
|
4
|
+
sqlite_utils_sqlite_dateutil-0.1a0.dist-info/entry_points.txt,sha256=FfmzWTeQw9g-dE_dibnL2nDtYQhUoOvDY-R_KLzVFaM,62
|
|
5
|
+
sqlite_utils_sqlite_dateutil-0.1a0.dist-info/RECORD,,
|