synced-collections


Namesynced-collections JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryInteract with persistent key-value stores using Pythonic abstractions.
upload_time2023-05-17 16:54:52
maintainer
docs_urlNone
author
requires_python>=3.8
licenseBSD 3-Clause License for the software synced_collections. Copyright (c) 2016, The Regents of the University of Michigan All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords database containers
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # <img src="https://raw.githubusercontent.com/glotzerlab/signac/main/doc/images/palette-header.png" width="75" height="58"> synced_collections - Pythonic abstractions over data collections

[![Affiliated with NumFOCUS](https://img.shields.io/badge/NumFOCUS-affiliated%20project-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org/sponsored-projects/affiliated-projects)
[![GitHub Actions](https://github.com/glotzerlab/synced_collections/actions/workflows/run-pytest.yml/badge.svg)](https://github.com/glotzerlab/synced_collections/actions)
[![License](https://img.shields.io/github/license/glotzerlab/synced_collections.svg)](https://github.com/glotzerlab/synced_collections/blob/main/LICENSE.txt)
[![Slack](https://img.shields.io/badge/Slack-chat%20support-brightgreen.svg?style=flat&logo=slack)](https://signac.io/slack-invite/)
[![Twitter](https://img.shields.io/twitter/follow/signacdata?style=social)](https://twitter.com/signacdata)
[![GitHub Stars](https://img.shields.io/github/stars/glotzerlab/synced_collections?style=social)](https://github.com/glotzerlab/synced_collections/)

The [**signac** framework](https://signac.io) 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

- [Slack Chat Support](https://signac.io/slack-invite/):
  Get help and ask questions on the **signac** Slack workspace.
- [**signac** website](https://signac.io/):
  Framework overview and news.

## Quickstart

This short example demonstrates what you can do with `synced_collections`.

```python
>>> 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:

```bash
$ python -m pytest tests/
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "synced-collections",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "signac Developers <signac-support@umich.edu>",
    "keywords": "database,containers",
    "author": "",
    "author_email": "\"Vyas Ramasubramani et al.\" <vyas.ramasubramani@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/06/f8/dd1fcc92dfeed903be2e2e1d78c5c25e7d32afc73bd43da44fb75d547771/synced_collections-1.0.0.tar.gz",
    "platform": null,
    "description": "# <img src=\"https://raw.githubusercontent.com/glotzerlab/signac/main/doc/images/palette-header.png\" width=\"75\" height=\"58\"> synced_collections - Pythonic abstractions over data collections\n\n[![Affiliated with NumFOCUS](https://img.shields.io/badge/NumFOCUS-affiliated%20project-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org/sponsored-projects/affiliated-projects)\n[![GitHub Actions](https://github.com/glotzerlab/synced_collections/actions/workflows/run-pytest.yml/badge.svg)](https://github.com/glotzerlab/synced_collections/actions)\n[![License](https://img.shields.io/github/license/glotzerlab/synced_collections.svg)](https://github.com/glotzerlab/synced_collections/blob/main/LICENSE.txt)\n[![Slack](https://img.shields.io/badge/Slack-chat%20support-brightgreen.svg?style=flat&logo=slack)](https://signac.io/slack-invite/)\n[![Twitter](https://img.shields.io/twitter/follow/signacdata?style=social)](https://twitter.com/signacdata)\n[![GitHub Stars](https://img.shields.io/github/stars/glotzerlab/synced_collections?style=social)](https://github.com/glotzerlab/synced_collections/)\n\nThe [**signac** framework](https://signac.io) helps users manage and scale file-based workflows, facilitating data reuse, sharing, and reproducibility.\n\nThe **synced_collections** package provides Pythonic abstractions over various underlying data stores, presenting APIs that behave like standard built-in Python collections like dicts.\n**synced_collections** form the backbone of **signac**'s data and metadata storage, but may be used just as easily outside of **signac**.\nFor instance, users wishing to access a JSON file on disk like a dictionary and automatically persist all changes could use the `synced_collections.JSONDict`.\n\n## Resources\n\n- [Slack Chat Support](https://signac.io/slack-invite/):\n  Get help and ask questions on the **signac** Slack workspace.\n- [**signac** website](https://signac.io/):\n  Framework overview and news.\n\n## Quickstart\n\nThis short example demonstrates what you can do with `synced_collections`.\n\n```python\n>>> from synced_collections.backends.collection_json import JSONDict\n>>> d = JSONDict(\"data.json\")\n>>> d[\"size\"] = 10\n>>> d[\"color\"] = \"blue\"\n>>> import json\n>>> with open(\"data.json\") as f:\n...     print(json.load(f))\n...\n{'size': 10, 'color': 'blue'}\n```\n\n## Testing\n\nYou can test this package by executing:\n\n```bash\n$ python -m pytest tests/\n```\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License for the software synced_collections.  Copyright (c) 2016, The Regents of the University of Michigan All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1.  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2.  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3.  Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "Interact with persistent key-value stores using Pythonic abstractions.",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://signac.io"
    },
    "split_keywords": [
        "database",
        "containers"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4a62d47b056adb89c2e826f35d7d1ef16231bc3ce1d935c217725c38bd28a6b3",
                "md5": "1b6a55f4ee15c07d088650399a549901",
                "sha256": "1b0781bb887f8a0dc113bc07f7df545351e4e8d81a4808503a82952430c48392"
            },
            "downloads": -1,
            "filename": "synced_collections-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1b6a55f4ee15c07d088650399a549901",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 57311,
            "upload_time": "2023-05-17T16:54:50",
            "upload_time_iso_8601": "2023-05-17T16:54:50.413167Z",
            "url": "https://files.pythonhosted.org/packages/4a/62/d47b056adb89c2e826f35d7d1ef16231bc3ce1d935c217725c38bd28a6b3/synced_collections-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "06f8dd1fcc92dfeed903be2e2e1d78c5c25e7d32afc73bd43da44fb75d547771",
                "md5": "7e28741a93f7075c594cf4e86537fdb9",
                "sha256": "c5c72df4074ce95625f155d8bc1ac608ba4d9fbb0fffde4da3c0e3a88a1e30bd"
            },
            "downloads": -1,
            "filename": "synced_collections-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7e28741a93f7075c594cf4e86537fdb9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 48819,
            "upload_time": "2023-05-17T16:54:52",
            "upload_time_iso_8601": "2023-05-17T16:54:52.209755Z",
            "url": "https://files.pythonhosted.org/packages/06/f8/dd1fcc92dfeed903be2e2e1d78c5c25e7d32afc73bd43da44fb75d547771/synced_collections-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-17 16:54:52",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "synced-collections"
}
        
Elapsed time: 0.10077s