Skip to main content

synced_collections - Pythonic abstractions over data collections

Affiliated with NumFOCUS GitHub Actions License GitHub Stars PyPI conda-forge

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

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)

Source distribution for synced-collections 1.0.1
File Size Uploaded
synced_collections-1.0.1.tar.gz 49.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for synced-collections 1.0.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page