parser201


Nameparser201 JSON
Version 1.5.0 PyPI version JSON
download
home_pagehttps://github.com/geozeke/parser201
SummaryExtract individual fields from lines in Apache access logs
upload_time2024-01-27 19:23:39
maintainerPeter Nardi
docs_urlNone
authorPeter Nardi
requires_python>=3.8.0,<4.0.0
licenseMIT
keywords parser201 apache log parse parser scanner web server
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ![GitHub](https://img.shields.io/github/license/geozeke/parser201)
![PyPI](https://img.shields.io/pypi/v/parser201)
![PyPI - Status](https://img.shields.io/pypi/status/parser201)
![GitHub last commit](https://img.shields.io/github/last-commit/geozeke/parser201)
![GitHub issues](https://img.shields.io/github/issues/geozeke/parser201)
![PyPI - Downloads](https://img.shields.io/pypi/dm/parser201)
![GitHub repo size](https://img.shields.io/github/repo-size/geozeke/parser201)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/parser201)

<br>

<img
src="https://github.com/geozeke/parser201/blob/main/docs/logo.png?raw=true"
alt="Dinobox Logo" width="120"/>

## Features

The centerpiece of the parser201 module is the LogParser class. The class
initializer takes a single line from an Apache access log file and extracts the
individual fields into attributes within an object.

## Installation

```text
pip3 install parser201
```

## Usage

The most common use-case for parser201 is importing individual lines from an
Apache access log file and creating LogParser objects, like this:

```python
from parser201 import LogParser

with open('access.log', 'r') as f:
    for line in f:
        lp = LogParser(line)
        # Use lp as desired: add to List, Dictionary, etc.
```

## Documentation

See: [parser201 Documentation](https://geozeke.github.io/parser201).

## Version History

* 1.5.0 (2024-01-27)
  * Cleaned up packaging for better [PEP
  561](https://peps.python.org/pep-0561/) compliance.
  * Cleaned up type hints.
  * Dropped support for converting timestamps to local machine time.
    Processing local timezones across multiple architectures and
    operating systems is a bit of a hot mess in Python right now.
    There's just too much variability with regard to OS Settings,
    location, daylight savings time, etc. The performance of this
    feature was spotty at best. There is still support for the
    *original* timezone and converstion to
    [*UTC*](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).<br><br>
* 1.4.1 (2023-06-22)
  * Migrated code formatter to *black*.<br><br>
* 1.4.0 (2023-04-30)
  * Strengthened regular expression parsing to handle log lines that
    contain a wider array of malicious attacks.
  * Added support for access logs that contain both IPv4 and IPv6
    addresses.
  * Minimum supported Python version is now 3.8 (^3.8).
  * Miscellaneous optimizations.<br><br>
* 1.3.1 (2022-10-22)
  * Migrated dependency/build management to
    [poetry](https://python-poetry.org/).<br><br>
* 1.3.0 (2022-08-13)
  * Implemented `__eq__` magic method for the `LogParser` class. You can now
    perform equality checks on two `LogParser` objects.
  * Added test cases for `__eq__`
  * Migrated task runner to `make`
  * Documentation cleanup
  * Code linting and cleanup<br><br>
* 1.2.0 (2022-07-17)
  * Implemented `__eq__` magic methods in the `FMT` and `TZ` classes.
  * Documentation cleanup.
  * Testing improvements and pyproject.toml adjustments for better pytest
    compatability.
  * Code linting and cleanup.<br><br>
* 1.1.5 (2022-01-17)
  * Code linting and cleanup.<br><br>
* 1.1.4 (2021-12-23)
  * Documentation cleanup.<br><br>
* 1.1.3 (2021-12-19)
  * Make file tuning.
  * Documentation cleanup.
  * Added site logo to README.md.<br><br>
* 1.1.0 (2021-11-13)
  * Implemented selectable timestamp conversion options {*original*,
    *local*,
    [*UTC*](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)}.
  * Implemented selectable formatting options for timestamp attribute
    {*string*, *date_obj*}.
  * Migrated API reference to GitHub pages.
  * Code cleanup.<br><br>
* 1.0.2 (2021-11-05)
  * Documentation cleanup.<br><br>
* 1.0.0 (2021-11-04)
  * Stable production release.
  * Migrated to a new development framework.
  * Implemented more robust and compartmentalized test cases.
  * Code tuning.<br><br>
* 0.2.0 (2021-10-31)
  * Changed behavior to gracefully fail for any malformed input line. If an
    input line cannot be successfully parsed, all attributes of the returned
    object are set to `None` and no messages are printed.
  * Added additional pytest cases to verify failure behavior.<br><br>
* 0.1.9 (2021-09-15)
  * Code cleanup for pep8 compliance.
  * Cleaned up Makefiles and scripts to remove references to python (meaning
    python2) and replace it with python3.<br><br>
* 0.1.7 (2021-06-05)
  * Re-tooled testing scripts to use parameterized test data, and conduct more
    robust testing.<br><br>
* 0.1.6 (2020-12-19)
  * Addressed exception handling for initializer input not being a valid string
    data type.
  * Documentation cleanup.<br><br>
* 0.1.5 (2020-10-26)
  * Enabled automatic deployment of tagged releases to pypi from travis using
    encrypted token.
  * Converted references to the master branch in the git repository to main
    across the documentation set.
  * Documentation cleanup.<br><br>
* 0.1.4 (2020-10-24)
  * Initial pypi release.
  * Fixed test file filtering issue in .gitignore.
  * Dependency fix for travis tests.<br><br>
* 0.1.1 (2020-10-22)
  * Follow-on testing on test.pypi.org.<br><br>
* 0.1.0 (2020-10-18)
  * Initial testing on test.pypi.org.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/geozeke/parser201",
    "name": "parser201",
    "maintainer": "Peter Nardi",
    "docs_url": null,
    "requires_python": ">=3.8.0,<4.0.0",
    "maintainer_email": "pete@nardi.com",
    "keywords": "parser201,apache,log,parse,parser,scanner,web,server",
    "author": "Peter Nardi",
    "author_email": "pete@nardi.com",
    "download_url": "https://files.pythonhosted.org/packages/d5/d2/0fe2d5ca4ea5ebe4380d5a0af1d364e9b64ed414843e1358594259cb83fd/parser201-1.5.0.tar.gz",
    "platform": null,
    "description": "![GitHub](https://img.shields.io/github/license/geozeke/parser201)\n![PyPI](https://img.shields.io/pypi/v/parser201)\n![PyPI - Status](https://img.shields.io/pypi/status/parser201)\n![GitHub last commit](https://img.shields.io/github/last-commit/geozeke/parser201)\n![GitHub issues](https://img.shields.io/github/issues/geozeke/parser201)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/parser201)\n![GitHub repo size](https://img.shields.io/github/repo-size/geozeke/parser201)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/parser201)\n\n<br>\n\n<img\nsrc=\"https://github.com/geozeke/parser201/blob/main/docs/logo.png?raw=true\"\nalt=\"Dinobox Logo\" width=\"120\"/>\n\n## Features\n\nThe centerpiece of the parser201 module is the LogParser class. The class\ninitializer takes a single line from an Apache access log file and extracts the\nindividual fields into attributes within an object.\n\n## Installation\n\n```text\npip3 install parser201\n```\n\n## Usage\n\nThe most common use-case for parser201 is importing individual lines from an\nApache access log file and creating LogParser objects, like this:\n\n```python\nfrom parser201 import LogParser\n\nwith open('access.log', 'r') as f:\n    for line in f:\n        lp = LogParser(line)\n        # Use lp as desired: add to List, Dictionary, etc.\n```\n\n## Documentation\n\nSee: [parser201 Documentation](https://geozeke.github.io/parser201).\n\n## Version History\n\n* 1.5.0 (2024-01-27)\n  * Cleaned up packaging for better [PEP\n  561](https://peps.python.org/pep-0561/) compliance.\n  * Cleaned up type hints.\n  * Dropped support for converting timestamps to local machine time.\n    Processing local timezones across multiple architectures and\n    operating systems is a bit of a hot mess in Python right now.\n    There's just too much variability with regard to OS Settings,\n    location, daylight savings time, etc. The performance of this\n    feature was spotty at best. There is still support for the\n    *original* timezone and converstion to\n    [*UTC*](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).<br><br>\n* 1.4.1 (2023-06-22)\n  * Migrated code formatter to *black*.<br><br>\n* 1.4.0 (2023-04-30)\n  * Strengthened regular expression parsing to handle log lines that\n    contain a wider array of malicious attacks.\n  * Added support for access logs that contain both IPv4 and IPv6\n    addresses.\n  * Minimum supported Python version is now 3.8 (^3.8).\n  * Miscellaneous optimizations.<br><br>\n* 1.3.1 (2022-10-22)\n  * Migrated dependency/build management to\n    [poetry](https://python-poetry.org/).<br><br>\n* 1.3.0 (2022-08-13)\n  * Implemented `__eq__` magic method for the `LogParser` class. You can now\n    perform equality checks on two `LogParser` objects.\n  * Added test cases for `__eq__`\n  * Migrated task runner to `make`\n  * Documentation cleanup\n  * Code linting and cleanup<br><br>\n* 1.2.0 (2022-07-17)\n  * Implemented `__eq__` magic methods in the `FMT` and `TZ` classes.\n  * Documentation cleanup.\n  * Testing improvements and pyproject.toml adjustments for better pytest\n    compatability.\n  * Code linting and cleanup.<br><br>\n* 1.1.5 (2022-01-17)\n  * Code linting and cleanup.<br><br>\n* 1.1.4 (2021-12-23)\n  * Documentation cleanup.<br><br>\n* 1.1.3 (2021-12-19)\n  * Make file tuning.\n  * Documentation cleanup.\n  * Added site logo to README.md.<br><br>\n* 1.1.0 (2021-11-13)\n  * Implemented selectable timestamp conversion options {*original*,\n    *local*,\n    [*UTC*](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)}.\n  * Implemented selectable formatting options for timestamp attribute\n    {*string*, *date_obj*}.\n  * Migrated API reference to GitHub pages.\n  * Code cleanup.<br><br>\n* 1.0.2 (2021-11-05)\n  * Documentation cleanup.<br><br>\n* 1.0.0 (2021-11-04)\n  * Stable production release.\n  * Migrated to a new development framework.\n  * Implemented more robust and compartmentalized test cases.\n  * Code tuning.<br><br>\n* 0.2.0 (2021-10-31)\n  * Changed behavior to gracefully fail for any malformed input line. If an\n    input line cannot be successfully parsed, all attributes of the returned\n    object are set to `None` and no messages are printed.\n  * Added additional pytest cases to verify failure behavior.<br><br>\n* 0.1.9 (2021-09-15)\n  * Code cleanup for pep8 compliance.\n  * Cleaned up Makefiles and scripts to remove references to python (meaning\n    python2) and replace it with python3.<br><br>\n* 0.1.7 (2021-06-05)\n  * Re-tooled testing scripts to use parameterized test data, and conduct more\n    robust testing.<br><br>\n* 0.1.6 (2020-12-19)\n  * Addressed exception handling for initializer input not being a valid string\n    data type.\n  * Documentation cleanup.<br><br>\n* 0.1.5 (2020-10-26)\n  * Enabled automatic deployment of tagged releases to pypi from travis using\n    encrypted token.\n  * Converted references to the master branch in the git repository to main\n    across the documentation set.\n  * Documentation cleanup.<br><br>\n* 0.1.4 (2020-10-24)\n  * Initial pypi release.\n  * Fixed test file filtering issue in .gitignore.\n  * Dependency fix for travis tests.<br><br>\n* 0.1.1 (2020-10-22)\n  * Follow-on testing on test.pypi.org.<br><br>\n* 0.1.0 (2020-10-18)\n  * Initial testing on test.pypi.org.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Extract individual fields from lines in Apache access logs",
    "version": "1.5.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/geozeke/parser201/issues",
        "Documentation": "https://geozeke.github.io/parser201",
        "Homepage": "https://github.com/geozeke/parser201",
        "Source Code": "https://github.com/geozeke/parser201"
    },
    "split_keywords": [
        "parser201",
        "apache",
        "log",
        "parse",
        "parser",
        "scanner",
        "web",
        "server"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fffc4173f9c4bf67a0428383687e51b5f983b93f89909c0afa2d14750559b901",
                "md5": "6e2f9bbc5bbd2a2689c294d8f56dd27b",
                "sha256": "d0e712ebf92c72be752baaa84054d95ea585c23c51a0f733e67e3f21080ed474"
            },
            "downloads": -1,
            "filename": "parser201-1.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6e2f9bbc5bbd2a2689c294d8f56dd27b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.0,<4.0.0",
            "size": 7867,
            "upload_time": "2024-01-27T19:23:38",
            "upload_time_iso_8601": "2024-01-27T19:23:38.451125Z",
            "url": "https://files.pythonhosted.org/packages/ff/fc/4173f9c4bf67a0428383687e51b5f983b93f89909c0afa2d14750559b901/parser201-1.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d5d20fe2d5ca4ea5ebe4380d5a0af1d364e9b64ed414843e1358594259cb83fd",
                "md5": "f5acc0ce2518af4b2db086f495092501",
                "sha256": "7567b0e4ccd1806f8a21f204655a0b6c3a6280f3c478e39990e115058429f06e"
            },
            "downloads": -1,
            "filename": "parser201-1.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f5acc0ce2518af4b2db086f495092501",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.0,<4.0.0",
            "size": 7292,
            "upload_time": "2024-01-27T19:23:39",
            "upload_time_iso_8601": "2024-01-27T19:23:39.993677Z",
            "url": "https://files.pythonhosted.org/packages/d5/d2/0fe2d5ca4ea5ebe4380d5a0af1d364e9b64ed414843e1358594259cb83fd/parser201-1.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-27 19:23:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "geozeke",
    "github_project": "parser201",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": false,
    "lcname": "parser201"
}
        
Elapsed time: 0.17124s