ukaea-multiparser


Nameukaea-multiparser JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryMultiple File Parser for monitoring and processing updates to a given set of output files.
upload_time2024-03-26 13:40:43
maintainerNone
docs_urlNone
authorKristian Zarębski
requires_python<3.13,>=3.10
licenseNone
keywords parsing monitoring logging
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
<img src="https://raw.githubusercontent.com/ukaea/Multiparser/main/docs/media/logo.png", width="200">
</p>

# Multiparser
[![PyPI Latest Release](https://img.shields.io/pypi/v/ukaea-multiparser.svg)](https://pypi.org/project/ukaea-multiparser/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ukaea-multiparser)
 [![multiparser](https://github.com/ukaea/multiparser/actions/workflows/test_run_multiparser.yaml/badge.svg?branch=main)](https://github.com/ukaea/multiparser/actions/workflows/test_run_multiparser.yaml)

_Multiparser_ is module for performing functionality across a set of output files. Given a set of files, and optionally a list of output parameter names or regex filters the module keeps track of changes by monitoring the "last modified" timestamp of each file and executing the assigned callback.

For example, in the case where a set of model outputs were written to a set of files the user is able to specify which files are of importance, the variables to be noted within these files, and a function to execute whenever a change is made to one of these files.

## Installation

The module is available in PyPi:

```sh
pip install ukaea-multiparser
```

To install optional extras `arrow` and `fortran` list them during the install, e.g.:

```sh
pip install ukaea-multiparser[fortran,arrow]
```

## Example

```python
with FileMonitor(
    per_thread_callback=callback_function,
    lock_callback=True,
    interval=10.0,
    flatten_data=True
) as monitor:
    monitor.track(
        path_glob_exprs=["file_of_interest.toml", "out_dir/*.other"],
        tracked_values=[
            "list", "of", "interesting", "values",
            re.compile(r"^list"),
            re.compile(r"of\s"),
            re.compile(r"regular"),
            re.compile(r"Expressions")
        ],
        static=True
    )
    monitor.run()
    ...
    monitor.terminate()
```

## Documentation

For information on use and functionality please see the [documentation](https://ukaea.github.io/Multiparser/).

## Licensing

_Multiparser_ is provided under the MIT license allowing reuse within both open source and proprietary software.

## Contributing

For contributions and development towards improving _Multiparser_ please see the included [CONTRIBUTING.md](https://github.com/ukaea/Multiparser/blob/main/CONTRIBUTING.md) file.

---

Copyright (c) 2024 UK Atomic Energy Authority


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ukaea-multiparser",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.10",
    "maintainer_email": null,
    "keywords": "parsing, monitoring, logging",
    "author": "Kristian Zar\u0119bski",
    "author_email": "kristian.zarebski@ukaea.uk",
    "download_url": "https://files.pythonhosted.org/packages/de/dd/347678bbba62cffbc27bea04304c4da572ad2007f22bc4db6a223efd7696/ukaea_multiparser-1.0.1.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/ukaea/Multiparser/main/docs/media/logo.png\", width=\"200\">\n</p>\n\n# Multiparser\n[![PyPI Latest Release](https://img.shields.io/pypi/v/ukaea-multiparser.svg)](https://pypi.org/project/ukaea-multiparser/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ukaea-multiparser)\n [![multiparser](https://github.com/ukaea/multiparser/actions/workflows/test_run_multiparser.yaml/badge.svg?branch=main)](https://github.com/ukaea/multiparser/actions/workflows/test_run_multiparser.yaml)\n\n_Multiparser_ is module for performing functionality across a set of output files. Given a set of files, and optionally a list of output parameter names or regex filters the module keeps track of changes by monitoring the \"last modified\" timestamp of each file and executing the assigned callback.\n\nFor example, in the case where a set of model outputs were written to a set of files the user is able to specify which files are of importance, the variables to be noted within these files, and a function to execute whenever a change is made to one of these files.\n\n## Installation\n\nThe module is available in PyPi:\n\n```sh\npip install ukaea-multiparser\n```\n\nTo install optional extras `arrow` and `fortran` list them during the install, e.g.:\n\n```sh\npip install ukaea-multiparser[fortran,arrow]\n```\n\n## Example\n\n```python\nwith FileMonitor(\n    per_thread_callback=callback_function,\n    lock_callback=True,\n    interval=10.0,\n    flatten_data=True\n) as monitor:\n    monitor.track(\n        path_glob_exprs=[\"file_of_interest.toml\", \"out_dir/*.other\"],\n        tracked_values=[\n            \"list\", \"of\", \"interesting\", \"values\",\n            re.compile(r\"^list\"),\n            re.compile(r\"of\\s\"),\n            re.compile(r\"regular\"),\n            re.compile(r\"Expressions\")\n        ],\n        static=True\n    )\n    monitor.run()\n    ...\n    monitor.terminate()\n```\n\n## Documentation\n\nFor information on use and functionality please see the [documentation](https://ukaea.github.io/Multiparser/).\n\n## Licensing\n\n_Multiparser_ is provided under the MIT license allowing reuse within both open source and proprietary software.\n\n## Contributing\n\nFor contributions and development towards improving _Multiparser_ please see the included [CONTRIBUTING.md](https://github.com/ukaea/Multiparser/blob/main/CONTRIBUTING.md) file.\n\n---\n\nCopyright (c) 2024 UK Atomic Energy Authority\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Multiple File Parser for monitoring and processing updates to a given set of output files.",
    "version": "1.0.1",
    "project_urls": {
        "Change Log": "https://github.com/ukaea/Multiparser/blob/main/CHANGELOG.md",
        "Documentation": "https://ukaea.github.io/Multiparser/",
        "Issues": "https://github.com/ukaea/Multiparser/issues",
        "Repository": "https://github.com/ukaea/Multiparser"
    },
    "split_keywords": [
        "parsing",
        " monitoring",
        " logging"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "586827270233437401066be1ed79fceb3ad4bc129ce349989ee9dd81fe4b0d14",
                "md5": "10df44258564b7276e636804f038c3d7",
                "sha256": "58d276729919628d8ec96affef569d087a2c717200f1abf3eccb79368dbec40c"
            },
            "downloads": -1,
            "filename": "ukaea_multiparser-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "10df44258564b7276e636804f038c3d7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.10",
            "size": 25149,
            "upload_time": "2024-03-26T13:40:42",
            "upload_time_iso_8601": "2024-03-26T13:40:42.171959Z",
            "url": "https://files.pythonhosted.org/packages/58/68/27270233437401066be1ed79fceb3ad4bc129ce349989ee9dd81fe4b0d14/ukaea_multiparser-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dedd347678bbba62cffbc27bea04304c4da572ad2007f22bc4db6a223efd7696",
                "md5": "44f6ffc35b0f37b674558d1014ce53e4",
                "sha256": "4c764f1e3f7bcafece84327702f51fd3a19822e3a3e4fbe2e5d7c86bfbd9276e"
            },
            "downloads": -1,
            "filename": "ukaea_multiparser-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "44f6ffc35b0f37b674558d1014ce53e4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.10",
            "size": 21677,
            "upload_time": "2024-03-26T13:40:43",
            "upload_time_iso_8601": "2024-03-26T13:40:43.794422Z",
            "url": "https://files.pythonhosted.org/packages/de/dd/347678bbba62cffbc27bea04304c4da572ad2007f22bc4db6a223efd7696/ukaea_multiparser-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-26 13:40:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ukaea",
    "github_project": "Multiparser",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ukaea-multiparser"
}
        
Elapsed time: 0.21579s