The signac framework helps users manage and scale file-based workflows, facilitating data reuse, sharing, and reproducibility.
The synced_collections package provides Pythonic abstractions over various underlying data stores, presenting APIs that behave like standard built-in Python collections like dicts.
synced_collections form the backbone of signac's data and metadata storage, but may be used just as easily outside of signac.
For instance, users wishing to access a JSON file on disk like a dictionary and automatically persist all changes could use the synced_collections.JSONDict
.
- Slack Chat Support: Get help and ask questions on the signac Slack workspace.
- signac website: Framework overview and news.
- Framework documentation: Examples, tutorials, topic guides, and package Python APIs.
- Package documentation: API reference for the synced_collections package.
The recommended installation method for synced_collections is through conda or pip. The software is tested for Python 3.8+ and is built for all major platforms.
To install synced_collections via the conda-forge channel, execute:
conda install -c conda-forge synced_collections
To install synced_collections via pip, execute:
pip install synced_collections
Detailed information about alternative installation methods can be found in the documentation.
This short example demonstrates what you can do with synced_collections
.
>>> from synced_collections.backends.collection_json import JSONDict
>>> d = JSONDict("data.json")
>>> d["size"] = 10
>>> d["color"] = "blue"
>>> import json
>>> with open("data.json") as f:
... print(json.load(f))
...
{'size': 10, 'color': 'blue'}
You can test this package by executing:
$ python -m pytest tests/
When using synced_collections as part of your work towards a publication, we would really appreciate that you acknowledge the signac frameworkf appropriately. We have prepared examples on how to do that here. Thank you very much!
The signac framework is a NumFOCUS Affiliated Project.