Skip to main content

Iotics gRPC Python Client

A Python library for interacting with Iotics API.

Usage and Version Compatibility with Iotics host

iotics-grpc-client-py iotics-host
pip install iotics-grpc-client~=7.0 >= 7
pip install iotics-grpc-client~=6.0 >= 7
pip install iotics-grpc-client~=5.0 >= 6
pip install iotics-grpc-client~=4.0 >= 6
pip install iotics-grpc-client~=3.0 >= 6
pip install iotics-grpc-client~=2.0 >= 5
pip install iotics-grpc-client~=0.10.0 >= 4

Examples

Configuring identity

To run examples, either set up required environment variables or create an .env file with the following values. For more information on the meaning of these values and how to create them, consult identity-api-and-credentials

  • Required:

    • SPACE - Domain name of the IOTICSpace with which to communicate. The scheme can be omitted, eg. examplecorp. iotics.space
    • USER_DID - Identity of the user
    • AGENT_DID - Identity of the agent authorised to operate on the user's behalf
    • AGENT_KEY_NAME - secret value used to (re)create multiple key pairs
    • AGENT_NAME - registered identity name that can be used to e.g. identify public keys
    • AGENT_SECRET - secret value, the agent's private key
  • Optional:

    • DID_RESOLVER_URL - Where the database of identity documents is accessible, defaults to the one used by the given space.
    • TOKEN_TTL - How long in seconds auth tokens will last if not specified in the method call, defaults to 30

Running example scripts

Next, create and activate your virtual environment and run any of the scripts in the examples directory, e.g.:

make deps-py
. env/bin/activate
python examples/search_twin_models.py

FAQs

Installing on Raspberry PI get: Import error GLIBC_2.33 not found

If you see this error running the exmaples on a Rapberry PI, the current workaround is to install Ubuntu for RPi which has a later version of glibc.

ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version 'GLIBC_2.33' not found (required by /home/pi/work/starting/iotics-grpc-client-py/env/lib/python3.9/site-packages/grpc/_cython/cygrpc.cpython-39-arm-linux-gnueabihf.so)

Contributing

Installing dependencies and generating gRPC client

  • To satisfy all dependencies, lint proto files and regenerate client files:

    make build
    
  • To generate gRPC Python files:

    make generate
    
  • To update the Iotics API version and regenerate client (proto files are submoduled in ./iotics-api.git/ from Iotics API repo):

    _ver=vX.X.X
    make GIT_TAG=$_ver deps-proto-update build
    # Address usages of the new client in `src`, update "Unreleased" section in CHANGELOG.md, then:
    git add CHANGELOG.md iotics-api.git src
    git commit -m "Update Iotics API to $_ver"
    # Push your branch and create a PR
    
  • Other make commands:

    • clean - remove artifacts created inside the project.
    • deps-* - install specific requirements if missing.
    • deps-*-update - update specific requirements when applicable.

PRs

Should contain a summary of the changes in CHANGELOG.md under the "Unreleased" section.

Versioning

This package adheres to Semantic Versioning

Releasing

  • Update package version in setup.cfg for the release:
  • Update CHANGELOG.md (move notes from unreleased section, ensure right tags are used, etc.) and any other files as needed.
  • Commit changes and create a PR.
  • Once PR is merged manually run the Create Draft Release GitHub Action, this will create a tag with the version in setup.py and create a draft release in releases.
  • Update the release's information and press the publish button on the release to publish it.
  • The Publish GitHub Action will create a package and will publish it to PyPI.

License

Copyright © 2024 IOTIC LABS LTD. info@iotics.com. All rights reserved. Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

Metadata

Release files for iotics-grpc-client 7.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iotics-grpc-client 7.2.1
File Size Uploaded
iotics-grpc-client-7.2.1.tar.gz 69.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iotics-grpc-client 7.2.1
File Interpreter ABI Platform
iotics_grpc_client-7.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 163.5 kB

Release files / iotics-grpc-client-7.2.1.tar.gz

Download URL iotics-grpc-client-7.2.1.tar.gz
Size 69.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9daa10377278780652885ec8f5af35008009c2fad84e9cc0db999666286e5cee
BLAKE2b-256 checksum
How to use checksums
de946121999352fe38da16eb83ef35bbb0de778e266eea347e75405ebc5e033b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / iotics_grpc_client-7.2.1-py3-none-any.whl

Download URL iotics_grpc_client-7.2.1-py3-none-any.whl
Size 94.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e7f47fe2d0f485bbd1b9412b70669a269e1607081ce5d57cbec1463daed2417
BLAKE2b-256 checksum
How to use checksums
d0bf370de048f888c85bed640b9ddf6f4f758a27a5e53c664fa66596cd89ac5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

7.2.1 This release

2 release files

7.2.0

2 release files

7.1.0

2 release files

7.0.0

2 release files

6.0.0

2 release files

5.0.0

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page