parse-log


Nameparse-log JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryRust tail implementation
upload_time2022-06-28 05:14:01
maintainerNone
docs_urlNone
authorkillown <developerorprogrammer@gmail.com>
requires_python>=3.7
licenseNone
keywords log tail parse files
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Parse LOG
## _rust tail implementation to parse files_

## Features

- Load N lines or all lines
- search and ignore lines with certain strings
- parse lines and extract what you want

## Usage
```python
import tail

path_to_file = 'path/to/file/thefile.log'
number_of_lines = 3

#return 3 lines
tail.lines(path_to_file, number_of_lines)

#return all lines with the given search string
#or 'search1, search2'
tail.search_all(path_to_file, 'Search_String')

#return all lines with the given search string
#or 'search1, search2' also 'ignore1, ignore2' and so on
tail.isearch_all(path_to_file, 'Search_String', 'Ignore_String')

#search through all lines contains certain string condition
#or 'search1, search2' also 'ignore1, ignore2' and so on
tail.search_lines(path_to_file, "search", "ignore_string", number_of_lines)

#search through all lines and ignore lines that contains certain stuff
#or 'search1, search2' also 'ignore1, ignore2' and so on
tail.isearch_lines(path_to_file, 'Search_String', 'Ignore_string', number_of_lines)

#return the last line based on the search condition
#or 'search1, search2'
tail.search_last_line(path_to_file, 'Search_String')

#return last line based on search and ignore conditions
#or 'search1, search2' also 'ignore1, ignore2' and so on
tail.isearch_last_line(path_to_file, 'Search_String', 'Ignore_String')

#parse line by line
lines = tail.lines(path_to_file, number_of_lines)
[tail.parse_line(lines, "begin_delimiter", "end_delimiter") for line in lines]
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "parse-log",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "killown <developerorprogrammer@gmail.com>",
    "keywords": "log,tail,parse,files",
    "author": "killown <developerorprogrammer@gmail.com>",
    "author_email": "killown <developerorprogrammer@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e3/eb/656d964ca66a80359baef7e3b6127a8b1a47410cee89c9451f91829d51cc/parse_log-1.0.1.tar.gz",
    "platform": null,
    "description": "# Parse LOG\n## _rust tail implementation to parse files_\n\n## Features\n\n- Load N lines or all lines\n- search and ignore lines with certain strings\n- parse lines and extract what you want\n\n## Usage\n```python\nimport tail\n\npath_to_file = 'path/to/file/thefile.log'\nnumber_of_lines = 3\n\n#return 3 lines\ntail.lines(path_to_file, number_of_lines)\n\n#return all lines with the given search string\n#or 'search1, search2'\ntail.search_all(path_to_file, 'Search_String')\n\n#return all lines with the given search string\n#or 'search1, search2' also 'ignore1, ignore2' and so on\ntail.isearch_all(path_to_file, 'Search_String', 'Ignore_String')\n\n#search through all lines contains certain string condition\n#or 'search1, search2' also 'ignore1, ignore2' and so on\ntail.search_lines(path_to_file, \"search\", \"ignore_string\", number_of_lines)\n\n#search through all lines and ignore lines that contains certain stuff\n#or 'search1, search2' also 'ignore1, ignore2' and so on\ntail.isearch_lines(path_to_file, 'Search_String', 'Ignore_string', number_of_lines)\n\n#return the last line based on the search condition\n#or 'search1, search2'\ntail.search_last_line(path_to_file, 'Search_String')\n\n#return last line based on search and ignore conditions\n#or 'search1, search2' also 'ignore1, ignore2' and so on\ntail.isearch_last_line(path_to_file, 'Search_String', 'Ignore_String')\n\n#parse line by line\nlines = tail.lines(path_to_file, number_of_lines)\n[tail.parse_line(lines, \"begin_delimiter\", \"end_delimiter\") for line in lines]\n```\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Rust tail implementation",
    "version": "1.0.1",
    "split_keywords": [
        "log",
        "tail",
        "parse",
        "files"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "md5": "1f0620029752982872c9ea8a405a2893",
                "sha256": "fda754a30ed9616d0e07c28605c75c209746258e8bc7c575e83c179ace1459ce"
            },
            "downloads": -1,
            "filename": "parse_log-1.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "1f0620029752982872c9ea8a405a2893",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.7",
            "size": 187935,
            "upload_time": "2022-06-28T05:13:58",
            "upload_time_iso_8601": "2022-06-28T05:13:58.865593Z",
            "url": "https://files.pythonhosted.org/packages/82/f6/2892de1df01629a217bc21ded9b3a52150bed212940ed2d87fa1a923322e/parse_log-1.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "md5": "ac20dd527c389f7a2fbd225e1e2d2e28",
                "sha256": "ae019afe8bc5147288ab93265333a58059d642dd79c3cde2a11757b226c368dd"
            },
            "downloads": -1,
            "filename": "parse_log-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ac20dd527c389f7a2fbd225e1e2d2e28",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4397,
            "upload_time": "2022-06-28T05:14:01",
            "upload_time_iso_8601": "2022-06-28T05:14:01.659772Z",
            "url": "https://files.pythonhosted.org/packages/e3/eb/656d964ca66a80359baef7e3b6127a8b1a47410cee89c9451f91829d51cc/parse_log-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-06-28 05:14:01",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "parse-log"
}
        
Elapsed time: 0.40776s