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.0.1.tar.gz (42.7 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.0.1-py3-none-any.whl (55.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for data_platform_helpers-1.0.1.tar.gz
Algorithm Hash digest
SHA256 eb1d8350dc4a6c3670237dfaec3c53433ff42c757cfba3bed92e35c2779a7447
MD5 60c64575b81cdde6cf38c14dd5b90024
BLAKE2b-256 d1c5382eec46c377a390173e660d8d15b8a6649150e424a735e4708e5c1c8890

See more details on using hashes here.

Provenance

The following attestation bundles were made for data_platform_helpers-1.0.1.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.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for data_platform_helpers-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 21ef9c3cc62c19648a1ca742e962d1a3ed361dd97bf60f4c20e3d16228df74d4
MD5 c0478335ca94f471ddc32300f37198f2
BLAKE2b-256 8c37f1173ae02886e060206c35583226f9f3d4c3b2139b8432142e3f0043154c

See more details on using hashes here.

Provenance

The following attestation bundles were made for data_platform_helpers-1.0.1-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