a9x-webstatistics


Namea9x-webstatistics JSON
Version 1.2.6 PyPI version JSON
download
home_pagehttps://github.com/ava007/a9x-webstatistics
SummaryWeb Statistics and Analytics Package
upload_time2024-12-16 05:41:40
maintainerNone
docs_urlNone
authorAndré von Arx
requires_python>=3.8
licenseNone
keywords webstats statistics analytics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Web Statistics and Analytics

This package produces web statistics and analytical output based on nginx access log files.

[![PyPI package](https://img.shields.io/badge/pip%20install-a9x_webstatistics-brightgreen)](https://pypi.org/project/a9x-webstatistics/) [![version number](https://img.shields.io/pypi/v/a9x_webstatistics?color=green&label=version)](https://github.com/ava007/a9x-webstatistics/releases) [![Actions Status](https://github.com/ava007/a9x-webstatistics/workflows/Test/badge.svg)](https://github.com/ava007/a9x-webstatistics/actions) [![License](https://img.shields.io/badge/license-own-blue)](https://github.com/ava007/a9x-webstatistics/blob/main/LICENSE)

[![Downloads](https://img.shields.io/pypi/dm/a9x-webstatistics)](https://pypistats.org/packages/a9x-webstatistics)
[![Python](https://img.shields.io/pypi/pyversions/a9x-webstatistics)](https://pypi.org/project/a9x-webstatistics)

## Live Example

Visit the live example on [logikfabrik.com](https://www.logikfabrik.com/webstatsLF24.html).

<img src="https://github.com/ava007/a9x-webstatistics/blob/main/a9x-webstatistics_20241123.png">

## Installation

```bash
pip install a9x-webstatistics
```


## Requirements on Linux / Unix
- access log file from web server
  - standard access log file from nginx, freenginx or apache
  - access log file in json format
- python3.9 onwards
- optional: maxmind db which need to be download by end user after registration


## Deployment on Linux / Unix

```bash
#!/bin/sh

export LOG=/usr/local/www/webstats.log
export PATH=/usr/local/www/django5/envpy311/bin:$PATH

python3.11 -m a9x_webstatistics.main \
   --infile /var/log/nginx-access.log \
   --geoip /usr/local/share/GeoIP/GeoLite2-Country.mmdb \
   --domain https://www.logikfabrik.com \
   --statfile /usr/local/www/lf_static/webstatsLF24.json &> $LOG

python3.11 -m a9x_webstatistics.gencockpit \
   --infile /usr/local/www/lf_static/webstatsLF24.json \
   --outfile /usr/local/www/lf_static/webstatsLF24.html &>> $LOG
```

Cron-Job Entry for Linux / FreeBSD:
```bash
#minute hour    mday    month   wday    who     command
13,58   *       *       *       *       dj1     /usr/local/www/cronjobs/cron_webstatistics.sh

```


## Installation on Windows

```bash
# install on windows:

## install a virtual env for python
python -m venv c:\temp\webstatsenv

## activate env
c:\temp\webstatsenv\Scripts\activate.bat

## install a9x-webstatistics
pip install a9x-webstatistics
python -m pip install --upgrade pip
python -m pip list
```

## Deployment on Windows

```bash
# run
c:
cd \temp
wget -URI https://www.logikfabrik.com/wlog/access.log -OutFile access.log

## active env
c:\temp\webstatsenv\Scripts\activate.bat

## create calculate statistics
## there are no country statistics created as not geoip defined
python -m a9x_webstatistics.main --infile access.log --statfile webstatsLF.json

## create html file for webstatistics
python -m a9x_webstatistics.gencockpit --infile webstatsLF.json --outfile webstatsLF.html
```

## Extended Example

```bash
#!/bin/sh

export LOG=/usr/local/www/webstats.log
export PATH=/usr/local/www/django5/envpy311/bin:$PATH

_YEARNUM="$(date +'%Y')";
_MONTHNUM="$(date +'%m')";

# make a archive copy for every month:
cp /usr/local/www/lf_static/webstatsLF24.json /usr/local/www/lf_static/webstatsLF24$_YEARNUM$_MONTHNUM.json
cp /usr/local/www/lf_static/webstatsLF24.html /usr/local/www/lf_static/webstatsLF24$_YEARNUM$_MONTHNUM.html

# updates all packages:
pip install -U `pip list --outdated | awk 'NR > 2 {print $1}'` >> $LOG


python3.11 -m a9x_webstatistics.main \
   --infile /var/log/nginx-access.log \
   --geoip /usr/local/share/GeoIP/GeoLite2-Country.mmdb \
   --domain https://www.logikfabrik.com \
   --statfile /usr/local/www/lf_static/webstatsLF24.json &> $LOG

python3.11 -m a9x_webstatistics.gencockpit \
   --infile /usr/local/www/lf_static/webstatsLF24.json \
   --outfile /usr/local/www/lf_static/webstatsLF24.html &>> $LOG
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ava007/a9x-webstatistics",
    "name": "a9x-webstatistics",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "webstats, statistics, analytics",
    "author": "Andr\u00e9 von Arx",
    "author_email": "avonarx@outlook.de",
    "download_url": "https://files.pythonhosted.org/packages/33/dd/e5e3c6179a75a178247b5fca3340e2cd6a58ab0bfcc1ab6518fe347d65c7/a9x_webstatistics-1.2.6.tar.gz",
    "platform": null,
    "description": "# Web Statistics and Analytics\n\nThis package produces web statistics and analytical output based on nginx access log files.\n\n[![PyPI package](https://img.shields.io/badge/pip%20install-a9x_webstatistics-brightgreen)](https://pypi.org/project/a9x-webstatistics/) [![version number](https://img.shields.io/pypi/v/a9x_webstatistics?color=green&label=version)](https://github.com/ava007/a9x-webstatistics/releases) [![Actions Status](https://github.com/ava007/a9x-webstatistics/workflows/Test/badge.svg)](https://github.com/ava007/a9x-webstatistics/actions) [![License](https://img.shields.io/badge/license-own-blue)](https://github.com/ava007/a9x-webstatistics/blob/main/LICENSE)\n\n[![Downloads](https://img.shields.io/pypi/dm/a9x-webstatistics)](https://pypistats.org/packages/a9x-webstatistics)\n[![Python](https://img.shields.io/pypi/pyversions/a9x-webstatistics)](https://pypi.org/project/a9x-webstatistics)\n\n## Live Example\n\nVisit the live example on [logikfabrik.com](https://www.logikfabrik.com/webstatsLF24.html).\n\n<img src=\"https://github.com/ava007/a9x-webstatistics/blob/main/a9x-webstatistics_20241123.png\">\n\n## Installation\n\n```bash\npip install a9x-webstatistics\n```\n\n\n## Requirements on Linux / Unix\n- access log file from web server\n  - standard access log file from nginx, freenginx or apache\n  - access log file in json format\n- python3.9 onwards\n- optional: maxmind db which need to be download by end user after registration\n\n\n## Deployment on Linux / Unix\n\n```bash\n#!/bin/sh\n\nexport LOG=/usr/local/www/webstats.log\nexport PATH=/usr/local/www/django5/envpy311/bin:$PATH\n\npython3.11 -m a9x_webstatistics.main \\\n   --infile /var/log/nginx-access.log \\\n   --geoip /usr/local/share/GeoIP/GeoLite2-Country.mmdb \\\n   --domain https://www.logikfabrik.com \\\n   --statfile /usr/local/www/lf_static/webstatsLF24.json &> $LOG\n\npython3.11 -m a9x_webstatistics.gencockpit \\\n   --infile /usr/local/www/lf_static/webstatsLF24.json \\\n   --outfile /usr/local/www/lf_static/webstatsLF24.html &>> $LOG\n```\n\nCron-Job Entry for Linux / FreeBSD:\n```bash\n#minute hour    mday    month   wday    who     command\n13,58   *       *       *       *       dj1     /usr/local/www/cronjobs/cron_webstatistics.sh\n\n```\n\n\n## Installation on Windows\n\n```bash\n# install on windows:\n\n## install a virtual env for python\npython -m venv c:\\temp\\webstatsenv\n\n## activate env\nc:\\temp\\webstatsenv\\Scripts\\activate.bat\n\n## install a9x-webstatistics\npip install a9x-webstatistics\npython -m pip install --upgrade pip\npython -m pip list\n```\n\n## Deployment on Windows\n\n```bash\n# run\nc:\ncd \\temp\nwget -URI https://www.logikfabrik.com/wlog/access.log -OutFile access.log\n\n## active env\nc:\\temp\\webstatsenv\\Scripts\\activate.bat\n\n## create calculate statistics\n## there are no country statistics created as not geoip defined\npython -m a9x_webstatistics.main --infile access.log --statfile webstatsLF.json\n\n## create html file for webstatistics\npython -m a9x_webstatistics.gencockpit --infile webstatsLF.json --outfile webstatsLF.html\n```\n\n## Extended Example\n\n```bash\n#!/bin/sh\n\nexport LOG=/usr/local/www/webstats.log\nexport PATH=/usr/local/www/django5/envpy311/bin:$PATH\n\n_YEARNUM=\"$(date +'%Y')\";\n_MONTHNUM=\"$(date +'%m')\";\n\n# make a archive copy for every month:\ncp /usr/local/www/lf_static/webstatsLF24.json /usr/local/www/lf_static/webstatsLF24$_YEARNUM$_MONTHNUM.json\ncp /usr/local/www/lf_static/webstatsLF24.html /usr/local/www/lf_static/webstatsLF24$_YEARNUM$_MONTHNUM.html\n\n# updates all packages:\npip install -U `pip list --outdated | awk 'NR > 2 {print $1}'` >> $LOG\n\n\npython3.11 -m a9x_webstatistics.main \\\n   --infile /var/log/nginx-access.log \\\n   --geoip /usr/local/share/GeoIP/GeoLite2-Country.mmdb \\\n   --domain https://www.logikfabrik.com \\\n   --statfile /usr/local/www/lf_static/webstatsLF24.json &> $LOG\n\npython3.11 -m a9x_webstatistics.gencockpit \\\n   --infile /usr/local/www/lf_static/webstatsLF24.json \\\n   --outfile /usr/local/www/lf_static/webstatsLF24.html &>> $LOG\n```\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Web Statistics and Analytics Package",
    "version": "1.2.6",
    "project_urls": {
        "Bug Reports": "https://github.com/ava007/a9x-webstatistics/issues",
        "Documentation": "https://github.com/ava007/a9x-webstatistics",
        "Homepage": "https://github.com/ava007/a9x-webstatistics",
        "Source Code": "https://github.com/ava007/a9x-webstatistics"
    },
    "split_keywords": [
        "webstats",
        " statistics",
        " analytics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "11fc742bc746e7900ca85d3c3c03de34f7e5429371215936290cee35eedef47b",
                "md5": "c488b65f62bd16c54c6c770d8af40fda",
                "sha256": "06e21cf4282b9fe6b6bb8fe48a745431632aa835460e51ee122cfe893f7f372d"
            },
            "downloads": -1,
            "filename": "a9x_webstatistics-1.2.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c488b65f62bd16c54c6c770d8af40fda",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 29584,
            "upload_time": "2024-12-16T05:41:38",
            "upload_time_iso_8601": "2024-12-16T05:41:38.795747Z",
            "url": "https://files.pythonhosted.org/packages/11/fc/742bc746e7900ca85d3c3c03de34f7e5429371215936290cee35eedef47b/a9x_webstatistics-1.2.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "33dde5e3c6179a75a178247b5fca3340e2cd6a58ab0bfcc1ab6518fe347d65c7",
                "md5": "e9bbf470bc9558a0e5644459e047e809",
                "sha256": "b13a15649c2d261663fd1ae7a24f42e20fc212c5b7a4d904e226e87b3bc0fcf5"
            },
            "downloads": -1,
            "filename": "a9x_webstatistics-1.2.6.tar.gz",
            "has_sig": false,
            "md5_digest": "e9bbf470bc9558a0e5644459e047e809",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 196249,
            "upload_time": "2024-12-16T05:41:40",
            "upload_time_iso_8601": "2024-12-16T05:41:40.551130Z",
            "url": "https://files.pythonhosted.org/packages/33/dd/e5e3c6179a75a178247b5fca3340e2cd6a58ab0bfcc1ab6518fe347d65c7/a9x_webstatistics-1.2.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-16 05:41:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ava007",
    "github_project": "a9x-webstatistics",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "a9x-webstatistics"
}
        
Elapsed time: 0.49358s