trusty


Nametrusty JSON
Version 1.1.0 PyPI version JSON
download
home_page
SummaryPersistent dictionaries
upload_time2023-06-01 03:50:31
maintainer
docs_urlNone
authorChris Varga
requires_python
license
keywords trusty dictionary json persistent
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Trusty
Persistent dictionaries

## Example Usage
```python
import os
import trusty

# Create a trusty dictionary at location `pack`.
pack = trusty.get('pack')

# Set a key value pair.
pack['food'] = 'lembas'

# Persist the dictionary to disk.
pack.save()

# Confirm that the dictionary was saved.
# The `location` specifies the path on disk.
print(pack.location)
print(os.path.abspath(pack.location))
print(os.path.exists(pack.location))
```

We can later retrieve the dictionary like so:
```python
import trusty

new_session = trusty.get('pack')
print(new_session)

# We can then further edit the data, and store it to the same location.
new_session['supplies'] = 'taters'
new_session.save()
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "trusty",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "trusty dictionary json persistent",
    "author": "Chris Varga",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/a3/bf/481f3f8094cfeef00345525e9ee7355dec74ba0f7b3698addae544ff0a08/trusty-1.1.0.tar.gz",
    "platform": null,
    "description": "# Trusty\nPersistent dictionaries\n\n## Example Usage\n```python\nimport os\nimport trusty\n\n# Create a trusty dictionary at location `pack`.\npack = trusty.get('pack')\n\n# Set a key value pair.\npack['food'] = 'lembas'\n\n# Persist the dictionary to disk.\npack.save()\n\n# Confirm that the dictionary was saved.\n# The `location` specifies the path on disk.\nprint(pack.location)\nprint(os.path.abspath(pack.location))\nprint(os.path.exists(pack.location))\n```\n\nWe can later retrieve the dictionary like so:\n```python\nimport trusty\n\nnew_session = trusty.get('pack')\nprint(new_session)\n\n# We can then further edit the data, and store it to the same location.\nnew_session['supplies'] = 'taters'\nnew_session.save()\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Persistent dictionaries",
    "version": "1.1.0",
    "project_urls": null,
    "split_keywords": [
        "trusty",
        "dictionary",
        "json",
        "persistent"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1cc611df2b2e74629ccb1daf6da05db4ac78e565ad77610564d359979e63722c",
                "md5": "ffb0f492260e9eda3584f801317d4e47",
                "sha256": "663815bff1e22ba43ecf2845e02b6f5d917b611d1f7ad390df3da4a3ebd31285"
            },
            "downloads": -1,
            "filename": "trusty-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ffb0f492260e9eda3584f801317d4e47",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 2029,
            "upload_time": "2023-06-01T03:50:29",
            "upload_time_iso_8601": "2023-06-01T03:50:29.592588Z",
            "url": "https://files.pythonhosted.org/packages/1c/c6/11df2b2e74629ccb1daf6da05db4ac78e565ad77610564d359979e63722c/trusty-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a3bf481f3f8094cfeef00345525e9ee7355dec74ba0f7b3698addae544ff0a08",
                "md5": "f3ca90db376f0c2cb68e4cf88b80ab00",
                "sha256": "14d315832164f8b6f7eb8db1e2e9724e1694e33837847fbf3fb4f3122d7be104"
            },
            "downloads": -1,
            "filename": "trusty-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f3ca90db376f0c2cb68e4cf88b80ab00",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1749,
            "upload_time": "2023-06-01T03:50:31",
            "upload_time_iso_8601": "2023-06-01T03:50:31.809987Z",
            "url": "https://files.pythonhosted.org/packages/a3/bf/481f3f8094cfeef00345525e9ee7355dec74ba0f7b3698addae544ff0a08/trusty-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-01 03:50:31",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "trusty"
}
        
Elapsed time: 0.07034s