Skip to content

Python class for parsing lines from Apache access log files

License

Notifications You must be signed in to change notification settings

geozeke/parser201

Repository files navigation

GitHub PyPI PyPI - Status GitHub last commit GitHub issues PyPI - Downloads GitHub repo size PyPI - Python Version


Dinobox Logo

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

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:

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.

About

Python class for parsing lines from Apache access log files

Resources

License

Stars

Watchers

Forks

Packages

No packages published