mirror of
https://github.com/ogdch/s3-logs-analyzer.git
synced 2026-08-25 22:14:17 +00:00
Generate daily download stats for files hosted on S3 from the logs | Read-only mirror of https://github.com/ogdch/s3-logs-analyzer — Bundesamt für Statistik. Issues & pull requests at the source.
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .gitignore | ||
| LICENSE.md | ||
| parse.py | ||
| README.md | ||
| requirements.txt | ||
| sync.py | ||
S3-Logs-Analyzer
- Download the access logs and parse them to retrieve the actual access counts for the files being hosted on S3
- Generate a CSV with fields: file, date, downloads
Setup
$ virtualenv pyenv --no-site-packages
$ source pyenv/bin/activate
$ pip install -r requirements.txt
Download S3 log files (only downloads non existing ones)
$ python sync.py [the flags]
$ get a coffee (if initial_import)
Parse
$ python parse.py --folder [the folder name where the log files got downloaded to]