ironflock


Nameironflock JSON
Version 1.0.3 PyPI version JSON
download
home_pagehttps://github.com/RecordEvolution/ironflock-py
SummarySDK to integrate your IronFlock Industry 4 Apps with the IronFlock Data Infrastructure
upload_time2024-10-11 16:41:33
maintainerNone
docs_urlNone
authorRecord Evolution GmbH
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ironflock

## About

With this library you can publish data from your apps on your IoT edge hardware to the fleet data storage of the [IronFlock](https://studio.ironflock.com) devops platform.
When this library is used on a certain device the library automatically uses the private messaging realm (Unified Name Space)
of the device's fleet and the data is collected in the respective fleet database.

So if you use the library in your app, the data collection will always be private to the app user's fleet.

For more information on the IronFlock IoT Devops Platform for engineers and developers visit our [IronFlock](https://www.ironflock.com) home page.
## Usage

```python
import asyncio
from ironflock import IronFlock

# create an IronFlock instance to connect to the IronFlock platform data infrastructure.
# The IronFlock instance handles authentication when run on a device registered in IronFlock.
ironflock = IronFlock()

async def main():
    while True:
        # publish an event (if connection is not established the publish is skipped)
        publication = await ironflock.publish("test.publish.com", {"temperature": 20})
        print(publication)
        await asyncio.sleep(3)


if __name__ == "__main__":
    ironflock = IronFlock(mainFunc=main)
    ironflock.run()
```

## Options

The `IronFlock` `__init__` function can be configured with the following options:

```ts
{
    serial_number: string;
}
```

**serial_number**: Used to set the serial_number of the device if the `DEVICE_SERIAL_NUMBER` environment variable does not exist. It can also be used if the user wishes to authenticate as another device.

## Advanced Usage

If you need more control, e.g. acting on lifecycle events (`onJoin`, `onLeave`) take a look at
the [examples](https://github.com/RecordEvolution/ironflock-py/tree/main/examples) folder.


## Development

Install the necessary components if you don't have them already:

```shell
pip install --upgrade setuptools wheel twine
```

Build and publish a new pypi package:

```shell
make publish
```

Check the package at https://pypi.org/project/ironflock/.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/RecordEvolution/ironflock-py",
    "name": "ironflock",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Record Evolution GmbH",
    "author_email": "marko.petzold@record-evolution.de",
    "download_url": "https://files.pythonhosted.org/packages/42/9e/635494be7918e60f1a3d63fd02d8da8e43aa8e9e34f80bc8ccdc017dee89/ironflock-1.0.3.tar.gz",
    "platform": null,
    "description": "# ironflock\n\n## About\n\nWith this library you can publish data from your apps on your IoT edge hardware to the fleet data storage of the [IronFlock](https://studio.ironflock.com) devops platform.\nWhen this library is used on a certain device the library automatically uses the private messaging realm (Unified Name Space)\nof the device's fleet and the data is collected in the respective fleet database.\n\nSo if you use the library in your app, the data collection will always be private to the app user's fleet.\n\nFor more information on the IronFlock IoT Devops Platform for engineers and developers visit our [IronFlock](https://www.ironflock.com) home page.\n## Usage\n\n```python\nimport asyncio\nfrom ironflock import IronFlock\n\n# create an IronFlock instance to connect to the IronFlock platform data infrastructure.\n# The IronFlock instance handles authentication when run on a device registered in IronFlock.\nironflock = IronFlock()\n\nasync def main():\n    while True:\n        # publish an event (if connection is not established the publish is skipped)\n        publication = await ironflock.publish(\"test.publish.com\", {\"temperature\": 20})\n        print(publication)\n        await asyncio.sleep(3)\n\n\nif __name__ == \"__main__\":\n    ironflock = IronFlock(mainFunc=main)\n    ironflock.run()\n```\n\n## Options\n\nThe `IronFlock` `__init__` function can be configured with the following options:\n\n```ts\n{\n    serial_number: string;\n}\n```\n\n**serial_number**: Used to set the serial_number of the device if the `DEVICE_SERIAL_NUMBER` environment variable does not exist. It can also be used if the user wishes to authenticate as another device.\n\n## Advanced Usage\n\nIf you need more control, e.g. acting on lifecycle events (`onJoin`, `onLeave`) take a look at\nthe [examples](https://github.com/RecordEvolution/ironflock-py/tree/main/examples) folder.\n\n\n## Development\n\nInstall the necessary components if you don't have them already:\n\n```shell\npip install --upgrade setuptools wheel twine\n```\n\nBuild and publish a new pypi package:\n\n```shell\nmake publish\n```\n\nCheck the package at https://pypi.org/project/ironflock/.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "SDK to integrate your IronFlock Industry 4 Apps with the IronFlock Data Infrastructure",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://github.com/RecordEvolution/ironflock-py"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f1bf5ed98c63f5dbd2c890907fcd48abcc95705b85b8fda80af5b7e73f537ab",
                "md5": "a61f496ca6f9917083ccec962fbfaaa1",
                "sha256": "e974154768a5e02335616ec478f8fe126c91dc00cdf2699773b7dca764baaf75"
            },
            "downloads": -1,
            "filename": "ironflock-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a61f496ca6f9917083ccec962fbfaaa1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6625,
            "upload_time": "2024-10-11T16:41:32",
            "upload_time_iso_8601": "2024-10-11T16:41:32.151022Z",
            "url": "https://files.pythonhosted.org/packages/7f/1b/f5ed98c63f5dbd2c890907fcd48abcc95705b85b8fda80af5b7e73f537ab/ironflock-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "429e635494be7918e60f1a3d63fd02d8da8e43aa8e9e34f80bc8ccdc017dee89",
                "md5": "d6ffaddd2d6544f0272382de705fb5f1",
                "sha256": "73e5fddae7223ff2acf90a0718f591b8f6084be582b77d6a7e1e2ebccc7799c7"
            },
            "downloads": -1,
            "filename": "ironflock-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "d6ffaddd2d6544f0272382de705fb5f1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6037,
            "upload_time": "2024-10-11T16:41:33",
            "upload_time_iso_8601": "2024-10-11T16:41:33.877483Z",
            "url": "https://files.pythonhosted.org/packages/42/9e/635494be7918e60f1a3d63fd02d8da8e43aa8e9e34f80bc8ccdc017dee89/ironflock-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-11 16:41:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "RecordEvolution",
    "github_project": "ironflock-py",
    "github_not_found": true,
    "lcname": "ironflock"
}
        
Elapsed time: 5.01780s