synced_collections - Pythonic abstractions over data collections
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.
Resources
- Framework documentation: Examples, tutorials, topic guides, and package Python APIs.
- Package documentation: API reference for the synced_collections package.
Installation
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.
Quickstart
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'}
Testing
You can test this package by executing:
$ python -m pytest tests/
Acknowledgment
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.
Release files for synced-collections 1.0.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 | |
|---|---|---|---|
| synced_collections-1.0.1.tar.gz | 49.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| synced_collections-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 107.6 kB
Release files / synced_collections-1.0.1.tar.gz
| Download URL | synced_collections-1.0.1.tar.gz |
|---|---|
| Size | 49.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c2e9b37e18f6235653c9044a98e0d86ee62a9d15299a77eb022f3b66903b2b0
|
|
BLAKE2b-256 checksum How to use checksums |
d488f033fb40336bb2d59005865c7d39711d1774362f008efe977991e3a7da74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / synced_collections-1.0.1-py3-none-any.whl
| Download URL | synced_collections-1.0.1-py3-none-any.whl |
|---|---|
| Size | 57.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39728ae7b7e598da09f4ac9f8232724b499790c9dfc8797c9680b3e0b0b4a081
|
|
BLAKE2b-256 checksum How to use checksums |
c2654200b7b9e95278ba528787827140c9d7e70e90e988e6f4bb05d03e6e9c24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|