Skip to main content

Data Developer & Engineer IO Utility Objects

Project description

Data Utility Package: IO

test python support version size

Table of Contents:

This Utility IO Object was created for load the config data from any file format types like .yaml, .json, or .toml, and manage retention and version of this config file lifecycle.

Installation

pip install ddeutil-io

Features

File

File Objects that use to read or write data to that format.

import os
from ddeutil.io import YamlEnvFl

os.environ["HELLO"] = "WORLD"
content = YamlEnvFl('./.pre-commit-config.yaml').read(safe=True)

Config

The Config Object is the file system handler object.

from pathlib import Path
from ddeutil.io.config import ConfFl

config: ConfFl = ConfFl(path=Path('./file.gz.yaml'), compress="gzip")

Register

The Register Object is the metadata generator object for the config data. If you passing name and configs to this object, it will find the config name in any stage storage and generate its metadata to you.

from ddeutil.io.register import Register
from ddeutil.io.models import Params

registry: Register = Register(
    name='examples:conn_data_local_file',
    config=Params.model_validate({
        "stages": {
            "raw": {"format": "{naming:%s}.{timestamp:%Y%m%d_%H%M%S}"},
        },
    }),
)
registry.move(stage="raw")

License

This project was licensed under the terms of the MIT license.

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

ddeutil_io-0.1.6.tar.gz (28.4 kB view hashes)

Uploaded Source

Built Distribution

ddeutil_io-0.1.6-py3-none-any.whl (26.0 kB view hashes)

Uploaded Python 3

Supported by

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