Skip to main content

Interact with persistent key-value stores using Pythonic abstractions.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synced_collections-1.0.1.tar.gz (49.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synced_collections-1.0.1-py3-none-any.whl (57.7 kB view details)

Uploaded Python 3

File details

Details for the file synced_collections-1.0.1.tar.gz.

File metadata

  • Download URL: synced_collections-1.0.1.tar.gz
  • Upload date:
  • Size: 49.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for synced_collections-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8c2e9b37e18f6235653c9044a98e0d86ee62a9d15299a77eb022f3b66903b2b0
MD5 9bb0ad35fc52fe933d833884cb306dba
BLAKE2b-256 d488f033fb40336bb2d59005865c7d39711d1774362f008efe977991e3a7da74

See more details on using hashes here.

File details

Details for the file synced_collections-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for synced_collections-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39728ae7b7e598da09f4ac9f8232724b499790c9dfc8797c9680b3e0b0b4a081
MD5 01d62c6100ead1fc6f8dd528817c582a
BLAKE2b-256 c2654200b7b9e95278ba528787827140c9d7e70e90e988e6f4bb05d03e6e9c24

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page