a9x-webstatistics


Namea9x-webstatistics JSON
Version 1.1.19 PyPI version JSON
download
home_pagehttps://github.com/ava007/a9x-webstatistics
SummaryWeb Statistics and Analytics Package
upload_time2024-11-17 07:18:16
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).

## Installation

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


## Requirements on Linux / Unix
- nginx standard access log file
- 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/55/af/f4d8819c82cf8a0998089ac8c285c2288d0c066e0ee9b6af8e105d83ae70/a9x_webstatistics-1.1.19.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## Installation\n\n```bash\npip install a9x-webstatistics\n```\n\n\n## Requirements on Linux / Unix\n- nginx standard access log file\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.1.19",
    "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": "f24e59534c8c41158fa538a118ec18f336567e2b074362df4841001b7fb62852",
                "md5": "1e945ad039191caa24d5c57ddc7c8443",
                "sha256": "d572d45973910e231fd9b871f0a0400e23f820a82c25ff2863e0504114c414f5"
            },
            "downloads": -1,
            "filename": "a9x_webstatistics-1.1.19-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1e945ad039191caa24d5c57ddc7c8443",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 26213,
            "upload_time": "2024-11-17T07:18:14",
            "upload_time_iso_8601": "2024-11-17T07:18:14.826960Z",
            "url": "https://files.pythonhosted.org/packages/f2/4e/59534c8c41158fa538a118ec18f336567e2b074362df4841001b7fb62852/a9x_webstatistics-1.1.19-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "55aff4d8819c82cf8a0998089ac8c285c2288d0c066e0ee9b6af8e105d83ae70",
                "md5": "cf626617a07a20d02b3b290c4e16b390",
                "sha256": "440599f4af9954266db88ad66b4d03a497a898e34fdd9ba2f7df4b2960c47046"
            },
            "downloads": -1,
            "filename": "a9x_webstatistics-1.1.19.tar.gz",
            "has_sig": false,
            "md5_digest": "cf626617a07a20d02b3b290c4e16b390",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 22953,
            "upload_time": "2024-11-17T07:18:16",
            "upload_time_iso_8601": "2024-11-17T07:18:16.350117Z",
            "url": "https://files.pythonhosted.org/packages/55/af/f4d8819c82cf8a0998089ac8c285c2288d0c066e0ee9b6af8e105d83ae70/a9x_webstatistics-1.1.19.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-17 07:18:16",
    "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: 1.20183s