SciSave - Python Data Loader/Dumper for Science
Project description
SciSave - Python Data Loader/Dumper for Science
- Repository: github.com/otvam/scisave
- PyPi: pypi.org/project/scisave
- Conda: anaconda.org/conda-forge/scisave
Summary
SciSave is a Python serialization/deserialization module:
- Specially targeted for scientific applications.
- Load JSON/YAML configuration files.
- Load and write JSON/Pickle data files.
For YAML files, the following custom extensions are used:
!path- parse relative paths (with respect to the YAML file).!include- include other YAML files (recursion possible).!eval- evaluate a Python literal (using literal_eval).!env- substitute YAML strings with values from environment variables.!sub- substitute YAML strings with values from a provided dictionary.!merge_dict- merge a list of dicts.!merge_list- merge a list of lists.
For JSON files, the following custom extensions are used:
- Allows the serialization/deserialization of complex numbers (
__complex__). - Allows the serialization/deserialization of NumPy arrays (
__numpy__). - Allows the serialization/deserialization as/from text and gzip files
The following file extensions are used:
.yaml, .yml- for YAML files.json, .js- for JSON text files.gz, .gzip- for JSON gzip files.pck, .pkl, .pickle- for Pickle files
The JSON/YAML files with the custom extensions are still valid JSON/YAML files.
SciSave is written in Python (NumPy and PyYAML are the only dependencies).
Warning
- Pickling data is not secure.
- Only load pickle files that you trust.
Example
An example is located in the example folder of the repository:
run_data.pycontains an example file for the loader/dumperconfig_main.yamlYAML configuration file with custom extensionsconfig_include.yamlYAML configuration file for include extensiondump.jsonJSON plain text file for testing data dumping/loadingdump.gzJSON plain gzip file for testing data dumping/loadingdump.picklePickle file for testing data dumping/loading
Project Links
- Repository: https://github.com/otvam/scisave
- Releases: https://github.com/otvam/scisave/releases
- Tags: https://github.com/otvam/scisave/tags
- Issues: https://github.com/otvam/scisave/issues
- PyPi: https://pypi.org/project/scisave
- Conda: https://anaconda.org/conda-forge/scisave
Author
- Thomas Guillod
- Email: guillod@otvam.ch
- Website: https://otvam.ch
Copyright
(c) 2023 - Thomas Guillod
BSD 2-Clause "Simplified" License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scisave-1.4.1.tar.gz.
File metadata
- Download URL: scisave-1.4.1.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57e5b234c73897eccd990255eda5d50a55015b50aab9aa1a9f52e58c0c7788e6
|
|
| MD5 |
7855d6e7881ccd3e655f5c0ab3a19c1a
|
|
| BLAKE2b-256 |
faa9d425b4d573944f2f4c667164619cc3a08f5bc09417ecc1b5d7588a0fe538
|
File details
Details for the file scisave-1.4.1-py3-none-any.whl.
File metadata
- Download URL: scisave-1.4.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5d0746182553f6221891b982e193bc5393d901d6e9c8db65e09dc36111e2838
|
|
| MD5 |
b058d63f67f924e03ade5adde09e5039
|
|
| BLAKE2b-256 |
9c72cc1782d1dabe357242f31489f9cdbca028018ad47017c4d2128402388e44
|