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 Slack Twitter GitHub Stars

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

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/

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.0.tar.gz (48.8 kB view details)

Uploaded Source

Built Distribution

synced_collections-1.0.0-py3-none-any.whl (57.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: synced_collections-1.0.0.tar.gz
  • Upload date:
  • Size: 48.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for synced_collections-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c5c72df4074ce95625f155d8bc1ac608ba4d9fbb0fffde4da3c0e3a88a1e30bd
MD5 7e28741a93f7075c594cf4e86537fdb9
BLAKE2b-256 06f8dd1fcc92dfeed903be2e2e1d78c5c25e7d32afc73bd43da44fb75d547771

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for synced_collections-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b0781bb887f8a0dc113bc07f7df545351e4e8d81a4808503a82952430c48392
MD5 1b6a55f4ee15c07d088650399a549901
BLAKE2b-256 4a62d47b056adb89c2e826f35d7d1ef16231bc3ce1d935c217725c38bd28a6b3

See more details on using hashes here.

Provenance

Supported by

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