Skip to main content

No project description provided

Project description

PIP Package for a variety of Data Platform Helpers

Table of Contents:

  1. Version Checker

1. Version Checker

Purpose

used to determine if a relevant version attribute across related applications are valid.

There are many potential applications for this. Here are a few examples:

  1. in a sharded cluster where is is important that the shards and cluster manager have the same components.
  2. kafka connect and kafka broker apps working together and needing to have the same ubnderlying version.

How to use

  1. add to requirements in requirements.txt:

        data-platform-helpers==0.1.1
    
  2. in src/charm.py of requirer + provider

    in constructor [REQUIRED]:

    from data_platform_helpers.version_check import CrossAppVersionChecker
    ...
    self.version_checker = self.CrossAppVersionChecker(
        self,
        version=x, # can be a revision of a charm, version of a snap, version of a workload, etc
        relations_to_check=[x,y,z],
        # only use if the version doesn't not need to exactly match our current version
        version_validity_range={"x": "<a,>b"})
    

    in update status hook [OPTIONAL]:

    if not self.version_checker.are_related_apps_valid():
        logger.debug(
            "Warning relational version check failed, these relations have mismatched versions",
            "%s",
            self.version_checker(self.version_checker.get_invalid_versions())
        )
        # do something, ie set status, instruct user to change something, etc
    
  3. other areas of the charm (i.e. joined events, action events, etc) [OPTIONAL]:

    if not self.charm.version_checker.are_related_apps_valid():
        # do something - i.e. fail event or log message
    
  4. in upgrade handler of requirer + provider [REQUIRED]:

    if [last unit to upgrade]:
        self.charm.version.set_version_across_all_relations()
    

2. Advanced Statuses Handler

TBD

3. Interfaces

Purpose

This is Data Interfaces V1, as a pip package. It will be used for charmlibs, but also for libraries that require some parts of data interfaces v1, but could not use it because it was in a charm-lib.

How to use: see the module documentation

Project details


Download files

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

Source Distribution

data_platform_helpers-1.1.0.tar.gz (42.9 kB view details)

Uploaded Source

Built Distribution

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

data_platform_helpers-1.1.0-py3-none-any.whl (56.2 kB view details)

Uploaded Python 3

File details

Details for the file data_platform_helpers-1.1.0.tar.gz.

File metadata

  • Download URL: data_platform_helpers-1.1.0.tar.gz
  • Upload date:
  • Size: 42.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for data_platform_helpers-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7539ef1c1047fec36ee8298aa4c75fe2bb36419544193b691805c12ca407a797
MD5 e7adc1247aa7f4666670c28c93ab2ba0
BLAKE2b-256 7c059cb4b743817ae3c9bff658d5ad56a2d28907d242c2a0e2308415273f7c98

See more details on using hashes here.

Provenance

The following attestation bundles were made for data_platform_helpers-1.1.0.tar.gz:

Publisher: release.yaml on canonical/data-platform-helpers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file data_platform_helpers-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for data_platform_helpers-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71b2c2ba31d1bc01c55c9da82d02b0cb654b99231172916722ecaf4c469d27c4
MD5 6248a69379c47957f805e46247c24716
BLAKE2b-256 70e7d798bb22f172ad819944aa13f50bc330dc4fa2d5f52be36c8303465571ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for data_platform_helpers-1.1.0-py3-none-any.whl:

Publisher: release.yaml on canonical/data-platform-helpers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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