HPI/my/core
Sean Breckenridge 46198a6447
my.core.serialize: simplejson support, more types (#176)
* my.core.serialize: simplejson support, more types

I added a couple extra checks to the default function,
serializing datetime, dates and dataclasses (incase
orjson isn't installed)

(copied from below)

if orjson couldn't be imported, try simplejson
This is included for compatibility reasons because orjson
is rust-based and compiling on rarer architectures may not work
out of the box

as an example, I've been having issues getting it to install
on my phone (termux/android)

unlike the builtin JSON modue which serializes NamedTuples as lists
(even if you provide a default function), simplejson correctly
serializes namedtuples to dictionaries

this just gives another option to people, simplejson is pure python
so no one should have issues with that. orjson is still way faster,
so still preferable if its easy and theres a precompiled build
for your architecture (which there typically is)

If you're ever running this with simplejson installed and not orjson,
its pretty easy to tell as the JSON styling is different; orjson has
no spaces between tokens, simplejson puts spaces between tokens. e.g.

simplejson: {"a": 5, "b": 10}
orjson: {"a":5,"b":10}
2021-07-08 23:02:56 +01:00
..
__init__.py new: basic arbtt module 2021-02-25 19:56:35 +00:00
__main__.py cli/query: bugfix, convert output to list (#170) 2021-04-28 21:19:49 +01:00
cachew.py core: add helper to 'freeze' dataclasses, in order to derive a schema from the properties 2021-02-25 19:56:35 +00:00
cfg.py cleanup; remove unused imports 2021-04-02 08:38:06 +01:00
common.py core/structure: help locate/extract gdpr exports (#175) 2021-07-08 00:44:55 +01:00
compat.py core: add hpi query command (#157) 2021-04-06 17:19:58 +01:00
core_config.py core: add tmp_dir for global access to a tmp dir (#173) 2021-05-17 00:28:26 +01:00
dataset.py core/sqlite: extract immutable connection helper 2021-04-05 08:37:07 +01:00
discovery_pure.py core: discovery_pure; allow multiple package roots (#152) 2021-04-02 15:46:18 +01:00
error.py core: add hpi query command (#157) 2021-04-06 17:19:58 +01:00
freezer.py fix mypy errors 2021-03-22 06:34:07 +00:00
influxdb.py core/influx: reuse _locate_functions_or_prompt to choose the data provider 2021-04-27 20:10:10 +01:00
init.py cleanup; remove unused imports 2021-04-02 08:38:06 +01:00
kompress.py kyhton.kompress: move to core (with a fallback, used in promnesia) 2020-10-29 03:13:18 +01:00
konsume.py my.kython.konsume: move to core 2020-10-29 03:13:18 +01:00
logging.py fix spelling mistakes 2021-03-28 06:53:24 +01:00
orgmode.py cleanup; remove unused imports 2021-04-02 08:38:06 +01:00
pandas.py cleanup; remove unused imports 2021-04-02 08:38:06 +01:00
preinit.py cli: add 'config init' command 2020-05-25 12:25:41 +01:00
py37.py add py37 compatilibity helper for datetime.fromisoformat 2020-05-13 22:52:23 +01:00
query.py cli/query: interactive fallback, improve guess_stats (#163) 2021-04-19 18:57:42 +01:00
query_range.py core: add hpi query command (#157) 2021-04-06 17:19:58 +01:00
serialize.py my.core.serialize: simplejson support, more types (#176) 2021-07-08 23:02:56 +01:00
sqlite.py core/sqlite: add compat version for backup() for python3.6 2021-04-05 08:37:07 +01:00
stats.py stats/is_data_provider: ignore 'inputs' func 2021-04-28 18:00:49 +01:00
structure.py core/structure: help locate/extract gdpr exports (#175) 2021-07-08 00:44:55 +01:00
time.py cleanup; remove unused imports 2021-04-02 08:38:06 +01:00
util.py cleanup; remove unused imports 2021-04-02 08:38:06 +01:00
warnings.py core/cli: switch to using click library #155 2021-04-04 10:06:59 +01:00