Skip to main content

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:

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

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:

{'@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.

Metadata

Release files for dissec 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dissec 1.2
File Size Uploaded
dissec-1.2.tar.gz 16.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dissec 1.2
File Interpreter ABI Platform
dissec-1.2-py3-none-any.whl Python 3 none any Details

Total release size: 36.4 kB

Release files / dissec-1.2.tar.gz

Download URL dissec-1.2.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1a12129d07a711ef9a874e43aa27fda320aa0d71c71136301c56d911df25257b
BLAKE2b-256 checksum
How to use checksums
4e4c0200ba1e932342a1e51fa76714472cfc979511550f4c08f43785df05cc60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / dissec-1.2-py3-none-any.whl

Download URL dissec-1.2-py3-none-any.whl
Size 20.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
709a3972dc3a3f1ac6b2632ebdb18d0bb9c65efef8469c76eb655d91fc6f2999
BLAKE2b-256 checksum
How to use checksums
06e184e06424aebc5b40b9c3f1cb19d2492a47489f240e08d3c4a8fa8b1c3a1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files

1.1

2 release files

1.0

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page