a9x-webstatistics


Namea9x-webstatistics JSON
Version 1.1.35.2 PyPI version JSON
download
home_pagehttps://github.com/ava007/a9x-webstatistics
SummaryWeb Statistics and Analytics Package
upload_time2024-12-02 21:45:12
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
- 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/a4/40/1317e24f76f69e30ec5425e420cbf5616b10cae9ca8f894d82119aad582f/a9x_webstatistics-1.1.35.2.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- 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.35.2",
    "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": "d630836f120fa82d7922b2c3ab35014ad53dda3ebd662dd7255a750a2937861d",
                "md5": "286d3b66ac8931746f3c5f1b44433cc8",
                "sha256": "58b29706c53e3d745250b65305f7e10d096151f14a323b6a064461e78f6f9d77"
            },
            "downloads": -1,
            "filename": "a9x_webstatistics-1.1.35.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "286d3b66ac8931746f3c5f1b44433cc8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 27047,
            "upload_time": "2024-12-02T21:45:10",
            "upload_time_iso_8601": "2024-12-02T21:45:10.601874Z",
            "url": "https://files.pythonhosted.org/packages/d6/30/836f120fa82d7922b2c3ab35014ad53dda3ebd662dd7255a750a2937861d/a9x_webstatistics-1.1.35.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a4401317e24f76f69e30ec5425e420cbf5616b10cae9ca8f894d82119aad582f",
                "md5": "175aecedccfd7250f14c96c8f7543ec2",
                "sha256": "400de03e153b956d39901c2a163d11d3d073dfec54848e7cc21ae6e3499a575c"
            },
            "downloads": -1,
            "filename": "a9x_webstatistics-1.1.35.2.tar.gz",
            "has_sig": false,
            "md5_digest": "175aecedccfd7250f14c96c8f7543ec2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 193745,
            "upload_time": "2024-12-02T21:45:12",
            "upload_time_iso_8601": "2024-12-02T21:45:12.680575Z",
            "url": "https://files.pythonhosted.org/packages/a4/40/1317e24f76f69e30ec5425e420cbf5616b10cae9ca8f894d82119aad582f/a9x_webstatistics-1.1.35.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-02 21:45:12",
    "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.42189s