rednest


Namerednest JSON
Version 0.7.0 PyPI version JSON
download
home_pageNone
SummaryRedis dictionary & list nesting for Python objects
upload_time2024-10-23 19:35:59
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT License Copyright (c) 2024 Nadav Tasher Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords redis rejson database dict
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # RedNest
Redis dictionary & list nesting for Python objects using `redis-py` and Redis `Hash`es and `List`s

## Usage example
```python
import redis

from rednest import Dictionary, List

# Initialize redis connection
redis = redis.Redis(...)

# Create your dictionary
my_dict = Dictionary(redis, "test-dict")
my_dict.test_value = "Hello World"
my_dict.numbers = [10, 20, 30]
my_dict.ages = {
	"User 1": 10,
	"User 2": 20,
	"User 3": 30,
}

# Change a user age
my_dict.ages["User 3"] = 40

# Show the variable types
print(type(my_dict.ages), type(my_dict.numbers))

# Show the entire dictionary
print(my_dict)
```

## Starting a test server locally
To run a test server, you can use the following command to run a Redis server locally:
```bash
docker run --rm -it -p 6379:6379 redis/redis-stack-server
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "rednest",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "Nadav Tasher <hey@nadav.app>",
    "keywords": "redis, rejson, database, dict",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/2f/e8/7bff458e6356a7f5dbbfdded574cf04dd345d65f57cb242830b936956b9c/rednest-0.7.0.tar.gz",
    "platform": null,
    "description": "# RedNest\nRedis dictionary & list nesting for Python objects using `redis-py` and Redis `Hash`es and `List`s\n\n## Usage example\n```python\nimport redis\n\nfrom rednest import Dictionary, List\n\n# Initialize redis connection\nredis = redis.Redis(...)\n\n# Create your dictionary\nmy_dict = Dictionary(redis, \"test-dict\")\nmy_dict.test_value = \"Hello World\"\nmy_dict.numbers = [10, 20, 30]\nmy_dict.ages = {\n\t\"User 1\": 10,\n\t\"User 2\": 20,\n\t\"User 3\": 30,\n}\n\n# Change a user age\nmy_dict.ages[\"User 3\"] = 40\n\n# Show the variable types\nprint(type(my_dict.ages), type(my_dict.numbers))\n\n# Show the entire dictionary\nprint(my_dict)\n```\n\n## Starting a test server locally\nTo run a test server, you can use the following command to run a Redis server locally:\n```bash\ndocker run --rm -it -p 6379:6379 redis/redis-stack-server\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Nadav Tasher  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Redis dictionary & list nesting for Python objects",
    "version": "0.7.0",
    "project_urls": {
        "Homepage": "https://github.com/NadavTasher/RedNest"
    },
    "split_keywords": [
        "redis",
        " rejson",
        " database",
        " dict"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d245926f7eb8651e4405f63e8dde8fa30b09093b68d5a00d2aad6ff8a42501b5",
                "md5": "327fdaaa90195aa68cd5bd03c6c945c1",
                "sha256": "5c7d55fec37a93fcf0dbd8b300a8ebcd5bf419cad1b90ec7b6c876afe76884df"
            },
            "downloads": -1,
            "filename": "rednest-0.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "327fdaaa90195aa68cd5bd03c6c945c1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 10468,
            "upload_time": "2024-10-23T19:35:58",
            "upload_time_iso_8601": "2024-10-23T19:35:58.213072Z",
            "url": "https://files.pythonhosted.org/packages/d2/45/926f7eb8651e4405f63e8dde8fa30b09093b68d5a00d2aad6ff8a42501b5/rednest-0.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2fe87bff458e6356a7f5dbbfdded574cf04dd345d65f57cb242830b936956b9c",
                "md5": "949f19532d8bcda9f766d04f500c48d8",
                "sha256": "ff75be467bcfd096d2ea9f234fc6f59203afcf1bc93d2322ec6d782bbfbe6946"
            },
            "downloads": -1,
            "filename": "rednest-0.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "949f19532d8bcda9f766d04f500c48d8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13583,
            "upload_time": "2024-10-23T19:35:59",
            "upload_time_iso_8601": "2024-10-23T19:35:59.370309Z",
            "url": "https://files.pythonhosted.org/packages/2f/e8/7bff458e6356a7f5dbbfdded574cf04dd345d65f57cb242830b936956b9c/rednest-0.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-23 19:35:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NadavTasher",
    "github_project": "RedNest",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "rednest"
}
        
Elapsed time: 1.46218s