alwayson-py


Namealwayson-py JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/xudesheng/alwayson_py
SummaryPython bindings for ThingWorx AlwaysOn protocol encoding/decoding
upload_time2025-08-23 04:24:43
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords thingworx iot protocol alwayson codec
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AlwaysOn Python

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Python bindings for the [alwayson-codec](https://github.com/xudesheng/alwayson-codec) Rust library, enabling efficient encoding and decoding of ThingWorx AlwaysOn protocol messages in Python.

## Features

- 🚀 **High Performance** - Rust-powered encoding/decoding
- 🐍 **Pythonic API** - Familiar Python interfaces
- 📦 **Zero Dependencies** - Self-contained binary wheels
- 🔧 **Complete Protocol Support** - All ThingWorx primitive types and messages
- 🛡️ **Type Safety** - Comprehensive type hints
- 📊 **Multipart Messages** - Handle large message splitting/merging

## Installation

```bash
pip install alwayson-py
```

## Quick Start

```python
import alwayson

# Create an authentication message
auth_msg = alwayson.TwxMessage.build_auth(12345, "your-app-key")
binary_data = auth_msg.to_bytes()

# Parse binary message
parsed_msg = alwayson.TwxMessage.from_bytes(binary_data)

# Work with InfoTables
shape = alwayson.DataShape()
shape.add_field("temperature", alwayson.BaseType.NUMBER)
shape.add_field("timestamp", alwayson.BaseType.DATETIME)

table = alwayson.InfoTable(shape)
table.add_row({
    "temperature": 23.5,
    "timestamp": alwayson.datetime_now()
})
```

## Development

This project is built with [PyO3](https://pyo3.rs/) and [maturin](https://github.com/PyO3/maturin).

### Setup

```bash
# Clone the repository
git clone https://github.com/xudesheng/alwayson_py.git
cd alwayson_py

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

# Install maturin
pip install maturin[patchelf]

# Development build
maturin develop
```

### Testing

```bash
pip install pytest pytest-asyncio
pytest tests/
```

## Related Projects

- [alwayson-codec](https://github.com/xudesheng/alwayson-codec) - The underlying Rust library
- [alwayson-base](https://github.com/xudesheng/alwayson-base) - Full ThingWorx client implementation

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Author

**Desheng Xu** <xudesheng@gmail.com>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/xudesheng/alwayson_py",
    "name": "alwayson-py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "thingworx, iot, protocol, alwayson, codec",
    "author": null,
    "author_email": "Desheng Xu <xudesheng@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/da/ab/9b654d964cfb55a47240bc37072a67d4c1192fec24d7b696bb58ada94627/alwayson_py-0.1.1.tar.gz",
    "platform": null,
    "description": "# AlwaysOn Python\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nPython bindings for the [alwayson-codec](https://github.com/xudesheng/alwayson-codec) Rust library, enabling efficient encoding and decoding of ThingWorx AlwaysOn protocol messages in Python.\n\n## Features\n\n- \ud83d\ude80 **High Performance** - Rust-powered encoding/decoding\n- \ud83d\udc0d **Pythonic API** - Familiar Python interfaces\n- \ud83d\udce6 **Zero Dependencies** - Self-contained binary wheels\n- \ud83d\udd27 **Complete Protocol Support** - All ThingWorx primitive types and messages\n- \ud83d\udee1\ufe0f **Type Safety** - Comprehensive type hints\n- \ud83d\udcca **Multipart Messages** - Handle large message splitting/merging\n\n## Installation\n\n```bash\npip install alwayson-py\n```\n\n## Quick Start\n\n```python\nimport alwayson\n\n# Create an authentication message\nauth_msg = alwayson.TwxMessage.build_auth(12345, \"your-app-key\")\nbinary_data = auth_msg.to_bytes()\n\n# Parse binary message\nparsed_msg = alwayson.TwxMessage.from_bytes(binary_data)\n\n# Work with InfoTables\nshape = alwayson.DataShape()\nshape.add_field(\"temperature\", alwayson.BaseType.NUMBER)\nshape.add_field(\"timestamp\", alwayson.BaseType.DATETIME)\n\ntable = alwayson.InfoTable(shape)\ntable.add_row({\n    \"temperature\": 23.5,\n    \"timestamp\": alwayson.datetime_now()\n})\n```\n\n## Development\n\nThis project is built with [PyO3](https://pyo3.rs/) and [maturin](https://github.com/PyO3/maturin).\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/xudesheng/alwayson_py.git\ncd alwayson_py\n\n# Create virtual environment\npython -m venv venv\nsource venv/bin/activate  # Windows: venv\\Scripts\\activate\n\n# Install maturin\npip install maturin[patchelf]\n\n# Development build\nmaturin develop\n```\n\n### Testing\n\n```bash\npip install pytest pytest-asyncio\npytest tests/\n```\n\n## Related Projects\n\n- [alwayson-codec](https://github.com/xudesheng/alwayson-codec) - The underlying Rust library\n- [alwayson-base](https://github.com/xudesheng/alwayson-base) - Full ThingWorx client implementation\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Author\n\n**Desheng Xu** <xudesheng@gmail.com>\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python bindings for ThingWorx AlwaysOn protocol encoding/decoding",
    "version": "0.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/xudesheng/alwayson_py/issues",
        "Documentation": "https://github.com/xudesheng/alwayson_py/blob/main/README.md",
        "Homepage": "https://github.com/xudesheng/alwayson_py",
        "Repository": "https://github.com/xudesheng/alwayson_py"
    },
    "split_keywords": [
        "thingworx",
        " iot",
        " protocol",
        " alwayson",
        " codec"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c19d31d19d451d5d7f05c0bfc7537f8f2d4d16244c9fc8e1a5e094d309258359",
                "md5": "4e001cb642d452acc530e805cb3233b3",
                "sha256": "e20de906a684fa96f891dbcfe0e138999f086a3220d29df4366828355f7d6841"
            },
            "downloads": -1,
            "filename": "alwayson_py-0.1.1-cp312-cp312-macosx_10_12_x86_64.whl",
            "has_sig": false,
            "md5_digest": "4e001cb642d452acc530e805cb3233b3",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 482069,
            "upload_time": "2025-08-23T04:24:35",
            "upload_time_iso_8601": "2025-08-23T04:24:35.846619Z",
            "url": "https://files.pythonhosted.org/packages/c1/9d/31d19d451d5d7f05c0bfc7537f8f2d4d16244c9fc8e1a5e094d309258359/alwayson_py-0.1.1-cp312-cp312-macosx_10_12_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b137e8d8fd43f14bbb7d3914135efed47cbd8acd47248b2d0c72d35d9a349615",
                "md5": "cd0b42c9026d189d55d03fbdddde4d23",
                "sha256": "069c5fc7867b4818b6c0e45f194987fe451a29cbf0228f83bdf2f19d0213842f"
            },
            "downloads": -1,
            "filename": "alwayson_py-0.1.1-cp312-cp312-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "cd0b42c9026d189d55d03fbdddde4d23",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 463763,
            "upload_time": "2025-08-23T04:24:37",
            "upload_time_iso_8601": "2025-08-23T04:24:37.286957Z",
            "url": "https://files.pythonhosted.org/packages/b1/37/e8d8fd43f14bbb7d3914135efed47cbd8acd47248b2d0c72d35d9a349615/alwayson_py-0.1.1-cp312-cp312-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bc0f1c8ec5a600ec5b3f1aaaaa73f334ff79f9aebc08489c422e2c7c309e61d8",
                "md5": "86997e2e88750d606bacaebfecbe690a",
                "sha256": "281efc452c67198b263cf07e7d9fc0675ca88bd05b16f0d9ff63d80ecc3c9d69"
            },
            "downloads": -1,
            "filename": "alwayson_py-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "86997e2e88750d606bacaebfecbe690a",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 531233,
            "upload_time": "2025-08-23T04:24:38",
            "upload_time_iso_8601": "2025-08-23T04:24:38.602065Z",
            "url": "https://files.pythonhosted.org/packages/bc/0f/1c8ec5a600ec5b3f1aaaaa73f334ff79f9aebc08489c422e2c7c309e61d8/alwayson_py-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d828edb950f7b24242bb612dd6cc23b1681e2732763d7acec26c6abe71e9ba47",
                "md5": "c5455025cdece98200e0e01bab0adb9e",
                "sha256": "5e099686abe98fb94c1319cb45ad97a06d7c47154e2ce61f68cef8ba32ed5d19"
            },
            "downloads": -1,
            "filename": "alwayson_py-0.1.1-cp312-cp312-manylinux_2_28_aarch64.whl",
            "has_sig": false,
            "md5_digest": "c5455025cdece98200e0e01bab0adb9e",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 521650,
            "upload_time": "2025-08-23T04:24:39",
            "upload_time_iso_8601": "2025-08-23T04:24:39.912147Z",
            "url": "https://files.pythonhosted.org/packages/d8/28/edb950f7b24242bb612dd6cc23b1681e2732763d7acec26c6abe71e9ba47/alwayson_py-0.1.1-cp312-cp312-manylinux_2_28_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "21a96741e02db2b4ccc551e64b3939324fc5b71dccaf3d2be62e6681e9dc1b1e",
                "md5": "ebe1344ad5b2bb86503906955f4dd53d",
                "sha256": "1d46ca846feca95772d781c3ccbef4b8ac735f797813d3da6a4ec0e368574f4d"
            },
            "downloads": -1,
            "filename": "alwayson_py-0.1.1-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "ebe1344ad5b2bb86503906955f4dd53d",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 343138,
            "upload_time": "2025-08-23T04:24:41",
            "upload_time_iso_8601": "2025-08-23T04:24:41.382969Z",
            "url": "https://files.pythonhosted.org/packages/21/a9/6741e02db2b4ccc551e64b3939324fc5b71dccaf3d2be62e6681e9dc1b1e/alwayson_py-0.1.1-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "daab9b654d964cfb55a47240bc37072a67d4c1192fec24d7b696bb58ada94627",
                "md5": "6cdde171089b93f768ce5ac84f7cc9b7",
                "sha256": "0425a5a5a66f1a3b7ff1ec047eb5e47e58cc1ed3b1a4b7012aac6aae376cb2a7"
            },
            "downloads": -1,
            "filename": "alwayson_py-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6cdde171089b93f768ce5ac84f7cc9b7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 55697,
            "upload_time": "2025-08-23T04:24:43",
            "upload_time_iso_8601": "2025-08-23T04:24:43.287920Z",
            "url": "https://files.pythonhosted.org/packages/da/ab/9b654d964cfb55a47240bc37072a67d4c1192fec24d7b696bb58ada94627/alwayson_py-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-23 04:24:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "xudesheng",
    "github_project": "alwayson_py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "alwayson-py"
}
        
Elapsed time: 0.88122s