Name | invenio-analytics-importer JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | Import analytics from 3rd-party provider (Matomo) into InvenioRDM instance. |
upload_time | 2025-10-07 13:27:17 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT License
Copyright (C) 2025 Northwestern University.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
invenio
inveniordm
rdm
analytics
statistics
matomo
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# README
CLI tool to retrieve and ingest analytics from a provider into current InvenioRDM instance.
For now, only Matomo is supported. If other provider added, slight refactor to support them will be planned.
## Install
```bash
pip install invenio-analytics-importer
```
## Usage
**Retrieve analytics**
```bash
pipenv run invenio analytics_importer retrieve [--views|--downloads] --from <YYYY-MM> --to <YYYY-MM> --output-dir <path>/<to>/<data>/
```
If neither `--views` nor `--downloads` is passed, views will be the default. If both are passed, the last one on the CLI will be chosen.
`--from` and `--to` are inclusive year-month dates.
This downloads analytics into files corresponding to each year-month. The structure of each file is e.g.,:
```json
{
"2024-08-01": [
{
// 1 "raw" analytics entry from provider
// corresponding to 1 URL
},
// ...
],
"2024-08-02": [
// ...
],
// ...
}
```
**Ingest**
```bash
pipenv run invenio analytics_importer ingest [--views|--downloads] -f <analytics file 1> -f <analytics file 2> ...
```
Analytics files are of the shape described above, although there is no
requirements for 1 file to correspond to 1 month. However, there is an
assumption/requirement that each file's date (`YYYY-MM-DD`) in
`"YYYY-MM-DD": [...analytics...]` is unique across all files.
Raw data
{
"_id": null,
"home_page": null,
"name": "invenio-analytics-importer",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "invenio, inveniordm, rdm, analytics, statistics, matomo",
"author": null,
"author_email": "Northwestern University <DL_FSM_GDS@e.northwestern.edu>",
"download_url": "https://files.pythonhosted.org/packages/28/3f/6d46d397de2e4c3d726295e2b284b6afc87b160b38d955e0e97229f3086e/invenio_analytics_importer-0.1.0.tar.gz",
"platform": null,
"description": "# README\n\nCLI tool to retrieve and ingest analytics from a provider into current InvenioRDM instance.\n\nFor now, only Matomo is supported. If other provider added, slight refactor to support them will be planned.\n\n## Install\n\n```bash\npip install invenio-analytics-importer\n```\n\n## Usage\n\n**Retrieve analytics**\n\n```bash\npipenv run invenio analytics_importer retrieve [--views|--downloads] --from <YYYY-MM> --to <YYYY-MM> --output-dir <path>/<to>/<data>/\n```\n\nIf neither `--views` nor `--downloads` is passed, views will be the default. If both are passed, the last one on the CLI will be chosen.\n`--from` and `--to` are inclusive year-month dates.\n\nThis downloads analytics into files corresponding to each year-month. The structure of each file is e.g.,:\n\n```json\n{\n \"2024-08-01\": [\n {\n // 1 \"raw\" analytics entry from provider\n // corresponding to 1 URL\n },\n // ...\n ],\n \"2024-08-02\": [\n // ...\n ],\n // ...\n}\n```\n\n**Ingest**\n\n```bash\npipenv run invenio analytics_importer ingest [--views|--downloads] -f <analytics file 1> -f <analytics file 2> ...\n```\n\nAnalytics files are of the shape described above, although there is no\nrequirements for 1 file to correspond to 1 month. However, there is an\nassumption/requirement that each file's date (`YYYY-MM-DD`) in\n`\"YYYY-MM-DD\": [...analytics...]` is unique across all files.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (C) 2025 Northwestern University.\n \n Permission is hereby granted, free of charge, to any person obtaining a copy of\n this software and associated documentation files (the \"Software\"), to deal in\n the Software without restriction, including without limitation the rights to\n use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n of the Software, and to permit persons to whom the Software is furnished to do\n so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "Import analytics from 3rd-party provider (Matomo) into InvenioRDM instance.",
"version": "0.1.0",
"project_urls": {
"Repository": "https://github.com/galterlibrary/invenio-analytics-importer"
},
"split_keywords": [
"invenio",
" inveniordm",
" rdm",
" analytics",
" statistics",
" matomo"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "dd820876ffa9665f15c2171187d774d1fd0dfccdbc5211251866364ba92b62ef",
"md5": "3b6f04179d0b60ad4eb18977e3dfa2df",
"sha256": "1b958e81390916b8ad786ebe134b021396126abb6b0a22473a379a98beb8dbec"
},
"downloads": -1,
"filename": "invenio_analytics_importer-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3b6f04179d0b60ad4eb18977e3dfa2df",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 12905,
"upload_time": "2025-10-07T13:27:16",
"upload_time_iso_8601": "2025-10-07T13:27:16.654361Z",
"url": "https://files.pythonhosted.org/packages/dd/82/0876ffa9665f15c2171187d774d1fd0dfccdbc5211251866364ba92b62ef/invenio_analytics_importer-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "283f6d46d397de2e4c3d726295e2b284b6afc87b160b38d955e0e97229f3086e",
"md5": "8bd745a3972ca2e62bc0a68a954ea496",
"sha256": "4ffd8e40f80771f4d5a0c489462b340c3e3ab48b9b8c4830b6dfdccf7fde365e"
},
"downloads": -1,
"filename": "invenio_analytics_importer-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "8bd745a3972ca2e62bc0a68a954ea496",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 14474,
"upload_time": "2025-10-07T13:27:17",
"upload_time_iso_8601": "2025-10-07T13:27:17.981137Z",
"url": "https://files.pythonhosted.org/packages/28/3f/6d46d397de2e4c3d726295e2b284b6afc87b160b38d955e0e97229f3086e/invenio_analytics_importer-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-07 13:27:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "galterlibrary",
"github_project": "invenio-analytics-importer",
"github_not_found": true,
"lcname": "invenio-analytics-importer"
}