Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serialized-data-interface

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serialized-data-interface

Serialized Data Interface for Juju Operators

  • 0.7.0
  • PyPI
  • Socket score

Maintainers
3

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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc