unitelabs-sila


Nameunitelabs-sila JSON
Version 0.1.7 PyPI version JSON
download
home_pagehttps://sila-standard.com
SummaryAn un-opinionated SiLA 2 library.
upload_time2024-12-11 10:58:54
maintainerNone
docs_urlNone
authorUniteLabs
requires_python<4.0,>=3.9
licenseMIT
keywords sila 2 laboratory automation connectivity
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Unitelabs SiLA Python Library

A Python library for creating SiLA 2 clients and servers. This flexible and unopinionated library gives you everything needed to create a SiLA 2 1.1 compliant Python application. It adheres to the [SiLA 2 specification](https://sila2.gitlab.io/sila_base/) and is used by the [UniteLabs CDK](https://gitlab.com/unitelabs/cdk/python-cdk) to enable rapid development of cloud-native SiLA Servers with a code-first approach.

## Getting Started

### Prerequisites

Ensure you have Python 3.9+ installed. You can install Python from [python.org](https://www.python.org/downloads/).

### Quickstart

To get started quickly with your first connector, we recommend to use our [UniteLabs CDK](https://gitlab.com/unitelabs/cdk/python-cdk). Use [Cookiecutter](https://www.cookiecutter.io) to create your project base on our [Connector Factory](https://gitlab.com/unitelabs/cdk/connector-factory) starter template:

```
cookiecutter git@gitlab.com:unitelabs/cdk/connector-factory.git
```

### Installation

Install the latest version of the library into your Python project:

```python
pip install unitelabs-sila
```

## Usage

To start using the SiLA Python library in your project:

1. Import and configure your SiLA server instance:

    ```python
    import asyncio

    from sila.server import Server
    from your_project.features import your_feature

    async def main():
        server = Server({"port": 50000})
        server.add_feature(your_feature)
        await server.start()

    asyncio.run(main())
    ```

2. To implement a custom SiLA Feature, create a feature definition following the SiLA2 specification:

    ```python
    from sila.server import Feature, UnobservableCommand

    your_feature = Feature(...)
    your_method = UnobservableCommand(...)
    your_method.add_to_feature(your_feature)
    ```

3. Run your server:

    ```bash
    $ python your_script.py
    ```

> Important: Without implementing the required SiLA Service Feature, your SiLA Server will not be fully compliant with the standard. For easier compliance, consider using the [UniteLabs CDK](https://gitlab.com/unitelabs/cdk/python-cdk), which handles this automatically.

## Contribute

Submit and share your work!  
https://hub.unitelabs.io

We encourage you to submit feature requests and bug reports through the GitLab issue system. Please include a clear description of the issue or feature you are proposing. If you have further questions, issues, or suggestions for improvement, don't hesitate to reach out to us at [developers@unitelabs.io](mailto:developers+sila@unitelabs.io).

Join the conversation! Stay up to date with the latest developments by joining the Python channel in the [SiLA Slack](https://sila-standard.org/slack).

## License

Distributed under the MIT License. See [MIT license](LICENSE) for more information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://sila-standard.com",
    "name": "unitelabs-sila",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "SiLA 2, laboratory, automation, connectivity",
    "author": "UniteLabs",
    "author_email": "developers@unitelabs.io",
    "download_url": "https://files.pythonhosted.org/packages/f9/68/1000605cbff6b81972879af8cd70de6cc5ca2b59fa8dcc7d58db478658f9/unitelabs_sila-0.1.7.tar.gz",
    "platform": null,
    "description": "# Unitelabs SiLA Python Library\n\nA Python library for creating SiLA 2 clients and servers. This flexible and unopinionated library gives you everything needed to create a SiLA 2 1.1 compliant Python application. It adheres to the [SiLA 2 specification](https://sila2.gitlab.io/sila_base/) and is used by the [UniteLabs CDK](https://gitlab.com/unitelabs/cdk/python-cdk) to enable rapid development of cloud-native SiLA Servers with a code-first approach.\n\n## Getting Started\n\n### Prerequisites\n\nEnsure you have Python 3.9+ installed. You can install Python from [python.org](https://www.python.org/downloads/).\n\n### Quickstart\n\nTo get started quickly with your first connector, we recommend to use our [UniteLabs CDK](https://gitlab.com/unitelabs/cdk/python-cdk). Use [Cookiecutter](https://www.cookiecutter.io) to create your project base on our [Connector Factory](https://gitlab.com/unitelabs/cdk/connector-factory) starter template:\n\n```\ncookiecutter git@gitlab.com:unitelabs/cdk/connector-factory.git\n```\n\n### Installation\n\nInstall the latest version of the library into your Python project:\n\n```python\npip install unitelabs-sila\n```\n\n## Usage\n\nTo start using the SiLA Python library in your project:\n\n1. Import and configure your SiLA server instance:\n\n    ```python\n    import asyncio\n\n    from sila.server import Server\n    from your_project.features import your_feature\n\n    async def main():\n        server = Server({\"port\": 50000})\n        server.add_feature(your_feature)\n        await server.start()\n\n    asyncio.run(main())\n    ```\n\n2. To implement a custom SiLA Feature, create a feature definition following the SiLA2 specification:\n\n    ```python\n    from sila.server import Feature, UnobservableCommand\n\n    your_feature = Feature(...)\n    your_method = UnobservableCommand(...)\n    your_method.add_to_feature(your_feature)\n    ```\n\n3. Run your server:\n\n    ```bash\n    $ python your_script.py\n    ```\n\n> Important: Without implementing the required SiLA Service Feature, your SiLA Server will not be fully compliant with the standard. For easier compliance, consider using the [UniteLabs CDK](https://gitlab.com/unitelabs/cdk/python-cdk), which handles this automatically.\n\n## Contribute\n\nSubmit and share your work!  \nhttps://hub.unitelabs.io\n\nWe encourage you to submit feature requests and bug reports through the GitLab issue system. Please include a clear description of the issue or feature you are proposing. If you have further questions, issues, or suggestions for improvement, don't hesitate to reach out to us at [developers@unitelabs.io](mailto:developers+sila@unitelabs.io).\n\nJoin the conversation! Stay up to date with the latest developments by joining the Python channel in the [SiLA Slack](https://sila-standard.org/slack).\n\n## License\n\nDistributed under the MIT License. See [MIT license](LICENSE) for more information.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An un-opinionated SiLA 2 library.",
    "version": "0.1.7",
    "project_urls": {
        "Bug Tracker": "https://gitlab.com/unitelabs/sila2/sila-python/-/issues",
        "Documentation": "https://gitlab.com/unitelabs/sila2/sila-python/-/README.md",
        "Homepage": "https://sila-standard.com",
        "Repository": "https://gitlab.com/unitelabs/sila2/sila-python"
    },
    "split_keywords": [
        "sila 2",
        " laboratory",
        " automation",
        " connectivity"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f4e8db90b9fc31e8235c31499812dbea08d2ccc513f02ecaa27e3187b696c04d",
                "md5": "07334e0a648de85b1a83a245243849b0",
                "sha256": "462a05db292b37222417d1bdec3c74837c5cadda2734b8e5dff949c00c9eead5"
            },
            "downloads": -1,
            "filename": "unitelabs_sila-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "07334e0a648de85b1a83a245243849b0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 84697,
            "upload_time": "2024-12-11T10:58:52",
            "upload_time_iso_8601": "2024-12-11T10:58:52.819019Z",
            "url": "https://files.pythonhosted.org/packages/f4/e8/db90b9fc31e8235c31499812dbea08d2ccc513f02ecaa27e3187b696c04d/unitelabs_sila-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f9681000605cbff6b81972879af8cd70de6cc5ca2b59fa8dcc7d58db478658f9",
                "md5": "0eef16885c11965bfcbe53c18acd7f61",
                "sha256": "420a62ecb5ec5beb17ff03ba5f72ca50bd40e825c7f17f61640f659d269e7975"
            },
            "downloads": -1,
            "filename": "unitelabs_sila-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "0eef16885c11965bfcbe53c18acd7f61",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 42782,
            "upload_time": "2024-12-11T10:58:54",
            "upload_time_iso_8601": "2024-12-11T10:58:54.920856Z",
            "url": "https://files.pythonhosted.org/packages/f9/68/1000605cbff6b81972879af8cd70de6cc5ca2b59fa8dcc7d58db478658f9/unitelabs_sila-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-11 10:58:54",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "unitelabs",
    "gitlab_project": "sila2",
    "lcname": "unitelabs-sila"
}
        
Elapsed time: 1.10398s