使用Pythonic抽象与持久化键值存储进行交互。
项目描述
synced_collections - Pythonic abstractions over data collections
The signac 框架 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
.
资源
快速入门
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/
关闭
synced_collections-1.0.0.tar.gz的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | c5c72df4074ce95625f155d8bc1ac608ba4d9fbb0fffde4da3c0e3a88a1e30bd |
|
MD5 | 7e28741a93f7075c594cf4e86537fdb9 |
|
BLAKE2b-256 | 06f8dd1fcc92dfeed903be2e2e1d78c5c25e7d32afc73bd43da44fb75d547771 |
关闭
synced_collections-1.0.0-py3-none-any.whl的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | 1b0781bb887f8a0dc113bc07f7df545351e4e8d81a4808503a82952430c48392 |
|
MD5 | 1b6a55f4ee15c07d088650399a549901 |
|
BLAKE2b-256 | 4a62d47b056adb89c2e826f35d7d1ef16231bc3ce1d935c217725c38bd28a6b3 |