reduct-py


Namereduct-py JSON
Version 1.9.1 PyPI version JSON
download
home_pageNone
SummaryReductStore Client SDK for Python
upload_time2024-04-26 10:09:24
maintainerNone
docs_urlNone
authorCiaran Moyne
requires_python>=3.8
licenseMIT License Copyright (c) 2022 Alexey Timin 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 sdk reductstore api client database time series database
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ReductStore Client SDK for Python

[![PyPI](https://img.shields.io/pypi/v/reduct-py)](https://pypi.org/project/reduct-py/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/reduct-py)](https://pypi.org/project/reduct-py/)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/reductstore/reduct-py/ci.yml?branch=main)](https://github.com/reductstore/reduct-py/actions)

This package provides an asynchronous HTTP client for interacting with the [ReductStore](https://www.reduct.store) service.

## Features

* Supports the [ReductStore HTTP API v1.9](https://reduct.store/docs/http-api)
* Bucket management
* API Token management
* Write, read and query data
* Labels
* Batching records for read and write operations
* Subscription on new data

## Install

To install this package, run the following command:

```
pip install reduct-py
```

## Example

Here is an example of how to use this package to create a bucket, write data to it, and read data from it:

```python
from datetime import datetime
import asyncio
from reduct import Client, Bucket

async def main():
    # Create a client for interacting with a ReductStore service
    client = Client("http://localhost:8383")

    # Create a bucket and store a reference to it in the `bucket` variable
    bucket: Bucket = await client.create_bucket("my-bucket", exist_ok=True)

    # Write data to the bucket
    ts = datetime.now()
    await bucket.write("entry-1", b"Hey!!", ts)

    # Read data from the bucket
    async with bucket.read("entry-1", ts) as record:
        data = await record.read_all()
        print(data)

# Run the main function
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
```

For more examples, see the [Quick Start](https://py.reduct.store/en/latest/docs/quick-start/).

## References

* [Documentation](https://py.reduct.store/)
* [ReductStore HTTP API](https://reduct.store/docs/http-api)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "reduct-py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Alexey Timin <atimin@gmail.com>",
    "keywords": "sdk, reductstore, api client, database, time series database",
    "author": "Ciaran Moyne",
    "author_email": "Alexey Timin <atimin@gmail.com>, Anthony Cavin <anthony@reduct.store>",
    "download_url": null,
    "platform": null,
    "description": "# ReductStore Client SDK for Python\n\n[![PyPI](https://img.shields.io/pypi/v/reduct-py)](https://pypi.org/project/reduct-py/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/reduct-py)](https://pypi.org/project/reduct-py/)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/reductstore/reduct-py/ci.yml?branch=main)](https://github.com/reductstore/reduct-py/actions)\n\nThis package provides an asynchronous HTTP client for interacting with the [ReductStore](https://www.reduct.store) service.\n\n## Features\n\n* Supports the [ReductStore HTTP API v1.9](https://reduct.store/docs/http-api)\n* Bucket management\n* API Token management\n* Write, read and query data\n* Labels\n* Batching records for read and write operations\n* Subscription on new data\n\n## Install\n\nTo install this package, run the following command:\n\n```\npip install reduct-py\n```\n\n## Example\n\nHere is an example of how to use this package to create a bucket, write data to it, and read data from it:\n\n```python\nfrom datetime import datetime\nimport asyncio\nfrom reduct import Client, Bucket\n\nasync def main():\n    # Create a client for interacting with a ReductStore service\n    client = Client(\"http://localhost:8383\")\n\n    # Create a bucket and store a reference to it in the `bucket` variable\n    bucket: Bucket = await client.create_bucket(\"my-bucket\", exist_ok=True)\n\n    # Write data to the bucket\n    ts = datetime.now()\n    await bucket.write(\"entry-1\", b\"Hey!!\", ts)\n\n    # Read data from the bucket\n    async with bucket.read(\"entry-1\", ts) as record:\n        data = await record.read_all()\n        print(data)\n\n# Run the main function\nloop = asyncio.get_event_loop()\nloop.run_until_complete(main())\n```\n\nFor more examples, see the [Quick Start](https://py.reduct.store/en/latest/docs/quick-start/).\n\n## References\n\n* [Documentation](https://py.reduct.store/)\n* [ReductStore HTTP API](https://reduct.store/docs/http-api)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 Alexey Timin  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": "ReductStore Client SDK for Python",
    "version": "1.9.1",
    "project_urls": {
        "Blog": "https://dev.to/reductstore",
        "Changelog": "https://github.com/reductstore/reduct-py/blob/main/CHANGELOG.md",
        "Documentation": "https://py.reduct.store/",
        "ReductStore": "https://www.reduct.store",
        "Source": "https://github.com/reductstore/reduct-py",
        "Twitter": "https://twitter.com/ReductStore"
    },
    "split_keywords": [
        "sdk",
        " reductstore",
        " api client",
        " database",
        " time series database"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fcfb54d905d113483cc8df2c5e0c5495cbee3a9eb1f21aba7ecc72a1cb423ebd",
                "md5": "1d2c3e5b2631d3828fa30b3e9083c4b1",
                "sha256": "6f72b380544277f6b222c682dd1ec092d6d6118c2f5939c9cbf529cc188da12f"
            },
            "downloads": -1,
            "filename": "reduct_py-1.9.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1d2c3e5b2631d3828fa30b3e9083c4b1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 15223,
            "upload_time": "2024-04-26T10:09:24",
            "upload_time_iso_8601": "2024-04-26T10:09:24.112744Z",
            "url": "https://files.pythonhosted.org/packages/fc/fb/54d905d113483cc8df2c5e0c5495cbee3a9eb1f21aba7ecc72a1cb423ebd/reduct_py-1.9.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-26 10:09:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "reductstore",
    "github_project": "reduct-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "reduct-py"
}
        
Elapsed time: 0.24389s