ddeutil-io


Nameddeutil-io JSON
Version 0.1.6 PyPI version JSON
download
home_pageNone
SummaryData Developer & Engineer IO Utility Objects
upload_time2024-05-17 10:23:54
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9.13
licenseMIT
keywords data config utility
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Data Utility Package: _IO_

[![test](https://github.com/korawica/ddeutil-io/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/korawica/ddeutil-io/actions/workflows/tests.yml)
[![python support version](https://img.shields.io/pypi/pyversions/ddeutil-io)](https://pypi.org/project/ddeutil-io/)
[![size](https://img.shields.io/github/languages/code-size/korawica/ddeutil-io)](https://github.com/korawica/ddeutil-io)

**Table of Contents**:

- [Installation](#installation)
- [Features](#features)
  - [File](#file)
  - [Config](#config)
  - [Register](#register)

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

```shell
pip install ddeutil-io
```

## Features

### File

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

```python
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.

```python
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.

```python
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](LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ddeutil-io",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9.13",
    "maintainer_email": null,
    "keywords": "data, config, utility",
    "author": null,
    "author_email": "ddeutils <korawich.anu@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e6/7a/9c1326a488b07f414b42c6264f303a6c288187c369ab77d606d685404fb6/ddeutil_io-0.1.6.tar.gz",
    "platform": null,
    "description": "# Data Utility Package: _IO_\n\n[![test](https://github.com/korawica/ddeutil-io/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/korawica/ddeutil-io/actions/workflows/tests.yml)\n[![python support version](https://img.shields.io/pypi/pyversions/ddeutil-io)](https://pypi.org/project/ddeutil-io/)\n[![size](https://img.shields.io/github/languages/code-size/korawica/ddeutil-io)](https://github.com/korawica/ddeutil-io)\n\n**Table of Contents**:\n\n- [Installation](#installation)\n- [Features](#features)\n  - [File](#file)\n  - [Config](#config)\n  - [Register](#register)\n\nThis **Utility IO** Object was created for `load` the config data from any file\nformat types like `.yaml`, `.json`, or `.toml`, and manage retention and version\nof this config file lifecycle.\n\n## Installation\n\n```shell\npip install ddeutil-io\n```\n\n## Features\n\n### File\n\nFile Objects that use to read or write data to that format.\n\n```python\nimport os\nfrom ddeutil.io import YamlEnvFl\n\nos.environ[\"HELLO\"] = \"WORLD\"\ncontent = YamlEnvFl('./.pre-commit-config.yaml').read(safe=True)\n```\n\n### Config\n\nThe **Config Object** is the file system handler object.\n\n```python\nfrom pathlib import Path\nfrom ddeutil.io.config import ConfFl\n\nconfig: ConfFl = ConfFl(path=Path('./file.gz.yaml'), compress=\"gzip\")\n```\n\n### Register\n\nThe **Register Object** is the metadata generator object for the config data.\nIf you passing name and configs to this object, it will find the config name\nin any stage storage and generate its metadata to you.\n\n```python\nfrom ddeutil.io.register import Register\nfrom ddeutil.io.models import Params\n\nregistry: Register = Register(\n    name='examples:conn_data_local_file',\n    config=Params.model_validate({\n        \"stages\": {\n            \"raw\": {\"format\": \"{naming:%s}.{timestamp:%Y%m%d_%H%M%S}\"},\n        },\n    }),\n)\nregistry.move(stage=\"raw\")\n```\n\n## License\n\nThis project was licensed under the terms of the [MIT license](LICENSE).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Data Developer & Engineer IO Utility Objects",
    "version": "0.1.6",
    "project_urls": {
        "Homepage": "https://github.com/korawica/ddeutil-io/",
        "Source Code": "https://github.com/korawica/ddeutil-io/"
    },
    "split_keywords": [
        "data",
        " config",
        " utility"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "020d2aca6e86df2b01ca3ea0b64a0801313ac6eb50555308b8ac5cfc27656eb3",
                "md5": "9b5b62f5b7bf2de83c945121ea90ab75",
                "sha256": "40656b7ba7044bb2c036a6ae0fd1af9f36155beab90f5a57102034210ddf6a61"
            },
            "downloads": -1,
            "filename": "ddeutil_io-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9b5b62f5b7bf2de83c945121ea90ab75",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9.13",
            "size": 25998,
            "upload_time": "2024-05-17T10:23:53",
            "upload_time_iso_8601": "2024-05-17T10:23:53.028024Z",
            "url": "https://files.pythonhosted.org/packages/02/0d/2aca6e86df2b01ca3ea0b64a0801313ac6eb50555308b8ac5cfc27656eb3/ddeutil_io-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e67a9c1326a488b07f414b42c6264f303a6c288187c369ab77d606d685404fb6",
                "md5": "711ce0cc5124d02c561e7a1d717d473a",
                "sha256": "5e998ff8fd05e2c0ad85aba7e49e197b450d73f2a89ef1470fd38e6f7fa9d391"
            },
            "downloads": -1,
            "filename": "ddeutil_io-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "711ce0cc5124d02c561e7a1d717d473a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9.13",
            "size": 28389,
            "upload_time": "2024-05-17T10:23:54",
            "upload_time_iso_8601": "2024-05-17T10:23:54.770669Z",
            "url": "https://files.pythonhosted.org/packages/e6/7a/9c1326a488b07f414b42c6264f303a6c288187c369ab77d606d685404fb6/ddeutil_io-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-17 10:23:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "korawica",
    "github_project": "ddeutil-io",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ddeutil-io"
}
        
Elapsed time: 0.30346s