Skip to main content

DataHex Utility Library to help with building AWS SAM based application.

Project description

DataHex Utility Library

The DataHex Utility library is a collection of utilities functions and classes that are useful for DataHex applications. There are various reusable modules in this library so please refer to each section for the respective usage guide.

Installation

This library is published to RZT Nexus and can be installed by using the command:

pip install dhx-utils-lib

Catalog Service module

The catalog service module contains various handy functions to call the private catalog API for common scenarios.

from dhx_utils.catalog import CatalogService
CatalogService(catalog_api=api).get_sub_data_asset_locations('83b294680f7a11ec9611a6f3ae174d1e', '2020-01-01', '2021-09-01', {'exchange_id': '151'})

[('151#2020-03-02', 's3://datalake-storage-dhx-dev-rozettatech/hl/assest_partitioned/D151/2020/03/02/'), ('151#2020-02-02', 's3://datalake-storage-dhx-dev-rozettatech/hl/assest_partitioned/D151/2020/02/02/')]

or let the util lib to build the catalog api path by using the env

from dhx_utils.catalog import CatalogService
#env could be dev, qa, prod, the catalog serveris would use url 'https://catalog.{env}.datahex.internal/dev'
_env = "dev"
CatalogService(env=_env).get_sub_data_asset_locations('83b294680f7a11ec9611a6f3ae174d1e', '2020-01-01', '2021-09-01', {'exchange_id': '151'})

[('151#2020-03-02', 's3://datalake-storage-dhx-dev-rozettatech/hl/assest_partitioned/D151/2020/03/02/'), ('151#2020-02-02', 's3://datalake-storage-dhx-dev-rozettatech/hl/assest_partitioned/D151/2020/02/02/')]

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

dhx_utils_lib-1.7.9b306-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file dhx_utils_lib-1.7.9b306-py3-none-any.whl.

File metadata

File hashes

Hashes for dhx_utils_lib-1.7.9b306-py3-none-any.whl
Algorithm Hash digest
SHA256 1e0a747cb3c12cedcbd833fc5ddd8a21b2eb425fff2ae6b856189c8e0db44766
MD5 6128c93e0f3867093cf0bc69a349d987
BLAKE2b-256 eec7b9a59b80b2dd736b780b96f8a0534dd3c20c3581c77b117c99daf52bdabd

See more details on using hashes here.

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