Skip to main content

Serialized Data Interface Library

https://pypi.org/project/serialized-data-interface/

This libraries enables its user to create serialized and validated Juju Operator interfaces.

An interface Schema will be defined through YAML e.g:

v1:
  provides:
    type: object
    properties:
      access-key:
        type: string
      namespace:
        type: ['string', 'null']
      port:
        type: number
      secret-key:
        type: string
      secure:
        type: boolean
      service:
        type: string
    required:
      - access-key
      - port
      - secret-key
      - secure
      - service

When our charms interchange data, this library will validate the data through the schema on both ends.

Usage

In our charm metadata we would add the following lines to define our schema and the supported versions:

provides:
  oidc-client:
    interface: oidc-client
    schema: https://raw.githubusercontent.com/canonical/operator-schemas/oidc-schemas/oidc-client.yaml
    versions: [v1]

In this case SDI will pull the schema from Github during deployment. If we want to deploy our charm in environments where Github isn't available we can pull the schemas during our build process by adding some lines like this in our tox.ini file:

[testenv:build]
commands =
    charmcraft build
    python3 -m serialized_data_interface.local_sdi

Real World Example

TODO

  • Currently only provides data to App relations, should also support unit relations.

Metadata

Release files for serialized-data-interface 0.7.0

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

Source distribution (sdist)

Source distribution for serialized-data-interface 0.7.0
File Size Uploaded
serialized_data_interface-0.7.0.tar.gz 18.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for serialized-data-interface 0.7.0
File Interpreter ABI Platform
serialized_data_interface-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 39.5 kB

Release files / serialized_data_interface-0.7.0.tar.gz

Download URL serialized_data_interface-0.7.0.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
be92b60a971b1f88c0886e08f54d95930bf08c86927d130c0bdda37b85522de6
BLAKE2b-256 checksum
How to use checksums
a5f3622d6fd4c753368c4784b7ff06e11b6af358ec2bd67f33e1046b86538074
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.9.6 Darwin/22.5.0

Release files / serialized_data_interface-0.7.0-py3-none-any.whl

Download URL serialized_data_interface-0.7.0-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b1a0d23dd662d49f2c78451b9cf7fab42b5a8650535dbf77c29afe1f1fb418f
BLAKE2b-256 checksum
How to use checksums
9ff381ec31bd2c5c08d338d58cf0e73aea9ffca2acbfcf86563ccd343f899334
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.9.6 Darwin/22.5.0

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.0.2

2 release files

0.0.1

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