Skip to main content

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 and is used by the UniteLabs 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.

Quickstart

To get started quickly with your first connector, we recommend to use our UniteLabs CDK. Use Cookiecutter to create your project base on our 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:

pip install unitelabs-sila

Usage

Client

To start using the SiLA Python library as a client:

  1. Import and configure your SiLA client instance:

    import asyncio
    
    from sila.client import Client, ClientConfig
    
    async def main():
       client = Client(ClientConfig(hostname="localhost", port=50052, tls=False))
       await client.open()
    
       print(await client.get_server_name())
       print(await client.get_server_uuid())
    
       await client.close()
    
    asyncio.run(main())
    
  2. Run your server:

    $ python your_script.py
    

Server

To start using the SiLA Python library as a server:

  1. Import and configure your SiLA server instance:

    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:

    from sila.server import Feature, UnobservableCommand
    
    your_feature = Feature(...)
    your_method = UnobservableCommand(...)
    your_method.add_to_feature(your_feature)
    
  3. Run your server:

    $ 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, 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.

Join the conversation! Stay up to date with the latest developments by joining the Python channel in the SiLA Slack.

License

Distributed under the MIT License. See MIT license for more information.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unitelabs_sila-0.9.3.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unitelabs_sila-0.9.3-py3-none-any.whl (239.8 kB view details)

Uploaded Python 3

File details

Details for the file unitelabs_sila-0.9.3.tar.gz.

File metadata

  • Download URL: unitelabs_sila-0.9.3.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.17.1 {"ci":true,"cpu":"x86_64","distro":{"id":"trixie","libc":{"lib":"glibc","version":"2.41"},"name":"Debian GNU/Linux","version":"13"},"implementation":{"name":"CPython","version":"3.13.14"},"installer":{"name":"hatch","version":"1.17.1"},"openssl_version":"OpenSSL 3.5.6 7 Apr 2026","python":"3.13.14","system":{"name":"Linux","release":"5.15.154+"}} HTTPX2/2.9.1

File hashes

Hashes for unitelabs_sila-0.9.3.tar.gz
Algorithm Hash digest
SHA256 f19c1b8aec8172fc964c821cbf89851140ecb98deba09425c9067de731476ba6
MD5 6984dc94c2af8d8b9146c04dc0234e32
BLAKE2b-256 d074ac851f6971c8865a9a1cd21905931e68392b5768ea4289ed3d46919a03dd

See more details on using hashes here.

File details

Details for the file unitelabs_sila-0.9.3-py3-none-any.whl.

File metadata

  • Download URL: unitelabs_sila-0.9.3-py3-none-any.whl
  • Upload date:
  • Size: 239.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.17.1 {"ci":true,"cpu":"x86_64","distro":{"id":"trixie","libc":{"lib":"glibc","version":"2.41"},"name":"Debian GNU/Linux","version":"13"},"implementation":{"name":"CPython","version":"3.13.14"},"installer":{"name":"hatch","version":"1.17.1"},"openssl_version":"OpenSSL 3.5.6 7 Apr 2026","python":"3.13.14","system":{"name":"Linux","release":"5.15.154+"}} HTTPX2/2.9.1

File hashes

Hashes for unitelabs_sila-0.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 86af9dc0c020a40b5aeacf4b025402126a39eb8bd9b71dbdb794c2d4744981a6
MD5 3da1d6084faee54609405525607ede0f
BLAKE2b-256 139d6bd262e444d7329b8a99d020e5461af6d8110740fe31d1314c9a23b8f412

See more details on using hashes here.

Release history Release notifications | RSS feed

0.9.4

2 files

This release

0.9.3 This release

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.0

2 files

0.7.6

2 files

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.1

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page