consibio-cloud-client


Nameconsibio-cloud-client JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryConnect with Consibio Cloud
upload_time2024-06-13 06:11:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseCopyright (c) 2024 Consibio 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 consibio-cloud data api-client data-analysis analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # consibio-cloud-client

## Data Client for Consibio Cloud

### Installation

To install the package, run the following command:

```bash
pip install consibio-cloud-client
```

### Usage

See the [examples](https://github.com/Consibio/consibio-cloud-python-client/tree/main/examples) folder for examples on how to use the client.

You'll need a Consibio Cloud account, to use the client.

The client can be imported with: `from consibio_cloud_client import Client, Project`

Initialize the client with `client = Client()`, login and initialize the `Project` with `project = Project(client)`, and get the datalog in `DataFrame` with `df = project.get_datalog()`.

#### `Client`

The `Client` exposes the following methods:

- `auth_valid`: to check if the authentication is valid
- `auth_login`: to login with the credentials
- `auto_output`: to get the output of the last command

The Client stores the session token in a `secrets.json` file.

#### `Project`

The `Project` exposes the following methods:

- `get_devices`: to get the devices, will return object with the devices
- `get_elements`: to get the elements, will return object with the elements
- `get_datalog`: to get the datalog, will return a `Datalog` object

The `Project` will use the `Client` to get the data, to remember to initialize the `Client` before initializing the `Project`, and login with the `auth_login` method, too.

#### `DataFrame`

The `get_datalog` method on the `Project` returns a `DataFrame` object, where you can use:

- `plot`: to plot the data, by providing `project=project`, it will render the element title and color the line, too.
- `get_data`: to get the data, each value in a `SingleValue` object
- `get_raw`: to get the raw data
- `get_pandas_df`: to get the Pandas DataFrame
- `add_many`: to add multiple elements to the datalog
- `add`: to add a single element to the datalog
- `remove_element`: to remove an element from the datalog
- `remove_specific`: to remove a specific element from the datalog, with a specific timestamp

#### `SingleValue`

The `SingleValue` object has the following methods:

- `get_element_id`: to get the element id
- `get_value`: to get the value
- `get_timestamp`: to get the timestamp

## Development

### Nox

Nox is a Python automation tool that automates testing in multiple Python environments, packaging, and more.

To install nox, run the following command:

```bash
pip install nox
```

To run the `tests` session, run the following command:

```bash
python3 -m nox -s tests
```

To run the `lint` session, run the following command:

```bash
python3 -m nox -s lint
```

It's recommended to use autopep8 to format the code. Install the extension in VS Code, and use the Workspace settings, which can be found in the `.vscode` folder.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "consibio-cloud-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Consibio <info@consibio.com>",
    "keywords": "consibio-cloud, data, api-client, data-analysis, analysis",
    "author": null,
    "author_email": "Consibio <info@consibio.com>",
    "download_url": "https://files.pythonhosted.org/packages/f4/e5/5e44d7922b371d4a2f8c9ad95ca19287ffab0ba5a30b77a1261c7c63c8b0/consibio_cloud_client-1.0.0.tar.gz",
    "platform": null,
    "description": "# consibio-cloud-client\n\n## Data Client for Consibio Cloud\n\n### Installation\n\nTo install the package, run the following command:\n\n```bash\npip install consibio-cloud-client\n```\n\n### Usage\n\nSee the [examples](https://github.com/Consibio/consibio-cloud-python-client/tree/main/examples) folder for examples on how to use the client.\n\nYou'll need a Consibio Cloud account, to use the client.\n\nThe client can be imported with: `from consibio_cloud_client import Client, Project`\n\nInitialize the client with `client = Client()`, login and initialize the `Project` with `project = Project(client)`, and get the datalog in `DataFrame` with `df = project.get_datalog()`.\n\n#### `Client`\n\nThe `Client` exposes the following methods:\n\n- `auth_valid`: to check if the authentication is valid\n- `auth_login`: to login with the credentials\n- `auto_output`: to get the output of the last command\n\nThe Client stores the session token in a `secrets.json` file.\n\n#### `Project`\n\nThe `Project` exposes the following methods:\n\n- `get_devices`: to get the devices, will return object with the devices\n- `get_elements`: to get the elements, will return object with the elements\n- `get_datalog`: to get the datalog, will return a `Datalog` object\n\nThe `Project` will use the `Client` to get the data, to remember to initialize the `Client` before initializing the `Project`, and login with the `auth_login` method, too.\n\n#### `DataFrame`\n\nThe `get_datalog` method on the `Project` returns a `DataFrame` object, where you can use:\n\n- `plot`: to plot the data, by providing `project=project`, it will render the element title and color the line, too.\n- `get_data`: to get the data, each value in a `SingleValue` object\n- `get_raw`: to get the raw data\n- `get_pandas_df`: to get the Pandas DataFrame\n- `add_many`: to add multiple elements to the datalog\n- `add`: to add a single element to the datalog\n- `remove_element`: to remove an element from the datalog\n- `remove_specific`: to remove a specific element from the datalog, with a specific timestamp\n\n#### `SingleValue`\n\nThe `SingleValue` object has the following methods:\n\n- `get_element_id`: to get the element id\n- `get_value`: to get the value\n- `get_timestamp`: to get the timestamp\n\n## Development\n\n### Nox\n\nNox is a Python automation tool that automates testing in multiple Python environments, packaging, and more.\n\nTo install nox, run the following command:\n\n```bash\npip install nox\n```\n\nTo run the `tests` session, run the following command:\n\n```bash\npython3 -m nox -s tests\n```\n\nTo run the `lint` session, run the following command:\n\n```bash\npython3 -m nox -s lint\n```\n\nIt's recommended to use autopep8 to format the code. Install the extension in VS Code, and use the Workspace settings, which can be found in the `.vscode` folder.\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2024 Consibio  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": "Connect with Consibio Cloud",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://www.consibio.com/"
    },
    "split_keywords": [
        "consibio-cloud",
        " data",
        " api-client",
        " data-analysis",
        " analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "36d1844ad92013abc75df917a419810d47f80e838eb69c4d7941c5604bfe089d",
                "md5": "f60b976bf22b313b6966a275d4ad5a11",
                "sha256": "0e305aafba8553ecf87b1756fbb083b5bc5cf1fbe0ab03baaf7151cbb2678d11"
            },
            "downloads": -1,
            "filename": "consibio_cloud_client-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f60b976bf22b313b6966a275d4ad5a11",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 11813,
            "upload_time": "2024-06-13T06:11:52",
            "upload_time_iso_8601": "2024-06-13T06:11:52.608362Z",
            "url": "https://files.pythonhosted.org/packages/36/d1/844ad92013abc75df917a419810d47f80e838eb69c4d7941c5604bfe089d/consibio_cloud_client-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f4e55e44d7922b371d4a2f8c9ad95ca19287ffab0ba5a30b77a1261c7c63c8b0",
                "md5": "046029df9a6775977c10db7bac715941",
                "sha256": "aef00c91abc06ce1f80315efce403770f67cf0772c12a7c47262bea5c6475a14"
            },
            "downloads": -1,
            "filename": "consibio_cloud_client-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "046029df9a6775977c10db7bac715941",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 13910,
            "upload_time": "2024-06-13T06:11:56",
            "upload_time_iso_8601": "2024-06-13T06:11:56.425856Z",
            "url": "https://files.pythonhosted.org/packages/f4/e5/5e44d7922b371d4a2f8c9ad95ca19287ffab0ba5a30b77a1261c7c63c8b0/consibio_cloud_client-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-13 06:11:56",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "consibio-cloud-client"
}
        
Elapsed time: 0.25976s