dissec


Namedissec JSON
Version 1.1 PyPI version JSON
download
home_pageNone
SummaryDissect pattern implementation for ElasticSearch
upload_time2025-04-09 11:01:04
maintainerNone
docs_urlNone
authorThomas Touhey
requires_python<4.0,>=3.9
licenseNone
keywords elasticsearch dissect processor parsing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ``dissec`` -- Dissect pattern implementation for ElasticSearch
==============================================================

    He attac, he protec, but most importantly, he dissec.

``dissec`` is a Python module used for implementing string dissection patterns,
compatible with ElasticSearch's `Dissect processor`_.

The project is present at the following locations:

* `Official website and documentation <Website_>`_;
* `Official repository on Gitlab <Gitlab repository_>`_;
* `Official project on PyPI <PyPI project_>`_.

For example, you can dissect a string using this module with the following
snippet:

.. code-block:: python

    from dissec.patterns import Pattern

    pattern = Pattern.parse(
        r'%{clientip} %{ident} %{auth} [%{@timestamp}] \"%{verb} %{request} '
        + r'HTTP/%{httpversion}\" %{status} %{size}',
    )
    result = pattern.dissect(
        r'1.2.3.4 - - [30/Apr/1998:22:00:52 +0000] '
        + r'\"GET /english/venues/cities/images/montpellier/18.gif '
        + r'HTTP/1.0\" 200 3171',
    )
    print(result)

This will print the following, pretty-printed here for readability purposes:

.. code-block:: text

    {'@timestamp': '30/Apr/1998:22:00:52 +0000',
     'auth': '-',
     'clientip': '1.2.3.4',
     'httpversion': '1.0',
     'ident': '-',
     'request': '/english/venues/cities/images/montpellier/18.gif',
     'size': '3171',
     'status': '200',
     'verb': 'GET'}

See `Dissecting a string using dissect patterns`_ for more details on this
usage.

.. _Website: https://dissec.touhey.pro/
.. _Gitlab repository: https://gitlab.com/kaquel/dissec
.. _PyPI project: https://pypi.org/project/dissec/
.. _Dissect processor:
    https://www.elastic.co/guide/en/elasticsearch/reference/current/
    dissect-processor.html
.. _Dissecting a string using dissect patterns:
    https://dissec.touhey.pro/developer-guides/dissect.html


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dissec",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "elasticsearch, dissect, processor, parsing",
    "author": "Thomas Touhey",
    "author_email": "thomas@touhey.fr",
    "download_url": "https://files.pythonhosted.org/packages/f2/3f/65488e6d69bb154f51e0b0e5a6f2a9da56f8b01d7a8a0a403e26c52b9a24/dissec-1.1.tar.gz",
    "platform": null,
    "description": "``dissec`` -- Dissect pattern implementation for ElasticSearch\n==============================================================\n\n    He attac, he protec, but most importantly, he dissec.\n\n``dissec`` is a Python module used for implementing string dissection patterns,\ncompatible with ElasticSearch's `Dissect processor`_.\n\nThe project is present at the following locations:\n\n* `Official website and documentation <Website_>`_;\n* `Official repository on Gitlab <Gitlab repository_>`_;\n* `Official project on PyPI <PyPI project_>`_.\n\nFor example, you can dissect a string using this module with the following\nsnippet:\n\n.. code-block:: python\n\n    from dissec.patterns import Pattern\n\n    pattern = Pattern.parse(\n        r'%{clientip} %{ident} %{auth} [%{@timestamp}] \\\"%{verb} %{request} '\n        + r'HTTP/%{httpversion}\\\" %{status} %{size}',\n    )\n    result = pattern.dissect(\n        r'1.2.3.4 - - [30/Apr/1998:22:00:52 +0000] '\n        + r'\\\"GET /english/venues/cities/images/montpellier/18.gif '\n        + r'HTTP/1.0\\\" 200 3171',\n    )\n    print(result)\n\nThis will print the following, pretty-printed here for readability purposes:\n\n.. code-block:: text\n\n    {'@timestamp': '30/Apr/1998:22:00:52 +0000',\n     'auth': '-',\n     'clientip': '1.2.3.4',\n     'httpversion': '1.0',\n     'ident': '-',\n     'request': '/english/venues/cities/images/montpellier/18.gif',\n     'size': '3171',\n     'status': '200',\n     'verb': 'GET'}\n\nSee `Dissecting a string using dissect patterns`_ for more details on this\nusage.\n\n.. _Website: https://dissec.touhey.pro/\n.. _Gitlab repository: https://gitlab.com/kaquel/dissec\n.. _PyPI project: https://pypi.org/project/dissec/\n.. _Dissect processor:\n    https://www.elastic.co/guide/en/elasticsearch/reference/current/\n    dissect-processor.html\n.. _Dissecting a string using dissect patterns:\n    https://dissec.touhey.pro/developer-guides/dissect.html\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Dissect pattern implementation for ElasticSearch",
    "version": "1.1",
    "project_urls": {
        "Bug Tracker": "https://gitlab.com/kaquel/dissec/-/issues",
        "Documentation": "https://dissec.touhey.pro/",
        "Homepage": "https://dissec.touhey.pro/",
        "Source Code": "https://gitlab.com/kaquel/dissec"
    },
    "split_keywords": [
        "elasticsearch",
        " dissect",
        " processor",
        " parsing"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8897c44f18e834937257200d9c14abcbad56413d400e7d7a006463ef0730cb73",
                "md5": "6f2cef1a866359d6babeae957a61d3ce",
                "sha256": "9d72122b30644712d054ea5d960df112c6f2a4f6085f098a70798f5b385c6170"
            },
            "downloads": -1,
            "filename": "dissec-1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6f2cef1a866359d6babeae957a61d3ce",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 20107,
            "upload_time": "2025-04-09T11:01:03",
            "upload_time_iso_8601": "2025-04-09T11:01:03.089949Z",
            "url": "https://files.pythonhosted.org/packages/88/97/c44f18e834937257200d9c14abcbad56413d400e7d7a006463ef0730cb73/dissec-1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f23f65488e6d69bb154f51e0b0e5a6f2a9da56f8b01d7a8a0a403e26c52b9a24",
                "md5": "5a91f844e51120a0f56170dda37ef872",
                "sha256": "2ac2bdc07884f50a5d6e529a2df07c50d8e6692eb383f20468f7177b33941ddb"
            },
            "downloads": -1,
            "filename": "dissec-1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5a91f844e51120a0f56170dda37ef872",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 16181,
            "upload_time": "2025-04-09T11:01:04",
            "upload_time_iso_8601": "2025-04-09T11:01:04.415574Z",
            "url": "https://files.pythonhosted.org/packages/f2/3f/65488e6d69bb154f51e0b0e5a6f2a9da56f8b01d7a8a0a403e26c52b9a24/dissec-1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-04-09 11:01:04",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "kaquel",
    "gitlab_project": "dissec",
    "lcname": "dissec"
}
        
Elapsed time: 0.76672s