reportnet-api 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. reportnet_api-0.1.0/.env.example +52 -0
  2. reportnet_api-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +48 -0
  3. reportnet_api-0.1.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
  4. reportnet_api-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +16 -0
  5. reportnet_api-0.1.0/.github/dependabot.yml +10 -0
  6. reportnet_api-0.1.0/.github/pull_request_template.md +11 -0
  7. reportnet_api-0.1.0/.github/workflows/ci.yml +60 -0
  8. reportnet_api-0.1.0/.github/workflows/docs.yml +43 -0
  9. reportnet_api-0.1.0/.github/workflows/release.yml +70 -0
  10. reportnet_api-0.1.0/.gitignore +231 -0
  11. reportnet_api-0.1.0/.python-version +1 -0
  12. reportnet_api-0.1.0/CHANGELOG.md +21 -0
  13. reportnet_api-0.1.0/CODE_OF_CONDUCT.md +9 -0
  14. reportnet_api-0.1.0/CONTRIBUTING.md +54 -0
  15. reportnet_api-0.1.0/LICENSE +21 -0
  16. reportnet_api-0.1.0/PKG-INFO +307 -0
  17. reportnet_api-0.1.0/README.md +278 -0
  18. reportnet_api-0.1.0/SECURITY.md +21 -0
  19. reportnet_api-0.1.0/SPEC.md +166 -0
  20. reportnet_api-0.1.0/binder/requirements.txt +2 -0
  21. reportnet_api-0.1.0/docs/RELEASING.md +40 -0
  22. reportnet_api-0.1.0/docs/assets/favicon-32.png +0 -0
  23. reportnet_api-0.1.0/docs/assets/favicon.svg +1 -0
  24. reportnet_api-0.1.0/docs/assets/logo-dark.svg +1 -0
  25. reportnet_api-0.1.0/docs/assets/logo-mark-dark.svg +1 -0
  26. reportnet_api-0.1.0/docs/assets/logo-mark.svg +1 -0
  27. reportnet_api-0.1.0/docs/assets/logo.png +0 -0
  28. reportnet_api-0.1.0/docs/assets/logo.svg +1 -0
  29. reportnet_api-0.1.0/docs/assets/social-preview.png +0 -0
  30. reportnet_api-0.1.0/docs/credentials.md +65 -0
  31. reportnet_api-0.1.0/docs/fme.md +87 -0
  32. reportnet_api-0.1.0/docs/glossary.md +36 -0
  33. reportnet_api-0.1.0/docs/index.md +40 -0
  34. reportnet_api-0.1.0/docs/live_testing_notes.md +1032 -0
  35. reportnet_api-0.1.0/docs/reference/dataflow.md +133 -0
  36. reportnet_api-0.1.0/docs/reference/dataset_schema.md +349 -0
  37. reportnet_api-0.1.0/docs/reference/dataset_snapshot.md +128 -0
  38. reportnet_api-0.1.0/docs/reference/datasets.md +1522 -0
  39. reportnet_api-0.1.0/docs/reference/easy.md +663 -0
  40. reportnet_api-0.1.0/docs/reference/eu_datasets.md +34 -0
  41. reportnet_api-0.1.0/docs/reference/handles.md +190 -0
  42. reportnet_api-0.1.0/docs/reference/index.md +201 -0
  43. reportnet_api-0.1.0/docs/reference/jobs.md +154 -0
  44. reportnet_api-0.1.0/docs/reference/reference_dataset.md +47 -0
  45. reportnet_api-0.1.0/docs/reference/release_receipts.md +86 -0
  46. reportnet_api-0.1.0/docs/reference/representative.md +328 -0
  47. reportnet_api-0.1.0/docs/reference/user.md +38 -0
  48. reportnet_api-0.1.0/docs/reference/validation.md +248 -0
  49. reportnet_api-0.1.0/docs/removed_private_endpoints.md +50 -0
  50. reportnet_api-0.1.0/examples/compare_countries.ipynb +183 -0
  51. reportnet_api-0.1.0/examples/export_and_upload.ipynb +145 -0
  52. reportnet_api-0.1.0/examples/nightly_export.py +30 -0
  53. reportnet_api-0.1.0/examples/quickstart.ipynb +179 -0
  54. reportnet_api-0.1.0/examples/try_it_demo.ipynb +210 -0
  55. reportnet_api-0.1.0/examples/validation.ipynb +153 -0
  56. reportnet_api-0.1.0/mkdocs.yml +33 -0
  57. reportnet_api-0.1.0/pyproject.toml +86 -0
  58. reportnet_api-0.1.0/reportnet_api/__init__.py +38 -0
  59. reportnet_api-0.1.0/reportnet_api/_auth.py +30 -0
  60. reportnet_api-0.1.0/reportnet_api/_core.py +222 -0
  61. reportnet_api-0.1.0/reportnet_api/_exceptions.py +243 -0
  62. reportnet_api-0.1.0/reportnet_api/async_client.py +113 -0
  63. reportnet_api-0.1.0/reportnet_api/cli.py +212 -0
  64. reportnet_api-0.1.0/reportnet_api/client.py +114 -0
  65. reportnet_api-0.1.0/reportnet_api/demo.py +148 -0
  66. reportnet_api-0.1.0/reportnet_api/discover.py +106 -0
  67. reportnet_api-0.1.0/reportnet_api/easy.py +1359 -0
  68. reportnet_api-0.1.0/reportnet_api/handles.py +326 -0
  69. reportnet_api-0.1.0/reportnet_api/jobs.py +383 -0
  70. reportnet_api-0.1.0/reportnet_api/models/__init__.py +0 -0
  71. reportnet_api-0.1.0/reportnet_api/models/generated.py +555 -0
  72. reportnet_api-0.1.0/reportnet_api/py.typed +0 -0
  73. reportnet_api-0.1.0/reportnet_api/resources/__init__.py +0 -0
  74. reportnet_api-0.1.0/reportnet_api/resources/dataflow_ext.py +239 -0
  75. reportnet_api-0.1.0/reportnet_api/resources/dataset_schema.py +274 -0
  76. reportnet_api-0.1.0/reportnet_api/resources/dataset_schema_ext.py +589 -0
  77. reportnet_api-0.1.0/reportnet_api/resources/dataset_snapshot.py +173 -0
  78. reportnet_api-0.1.0/reportnet_api/resources/datasets.py +1810 -0
  79. reportnet_api-0.1.0/reportnet_api/resources/datasets_ext.py +1001 -0
  80. reportnet_api-0.1.0/reportnet_api/resources/eu_datasets.py +44 -0
  81. reportnet_api-0.1.0/reportnet_api/resources/reference_dataset_ext.py +75 -0
  82. reportnet_api-0.1.0/reportnet_api/resources/release_receipts.py +122 -0
  83. reportnet_api-0.1.0/reportnet_api/resources/representative_ext.py +366 -0
  84. reportnet_api-0.1.0/reportnet_api/resources/user_ext.py +53 -0
  85. reportnet_api-0.1.0/reportnet_api/resources/validation_ext.py +447 -0
  86. reportnet_api-0.1.0/scripts/_swagger_defs_to_openapi.py +46 -0
  87. reportnet_api-0.1.0/scripts/docs_caveats.py +410 -0
  88. reportnet_api-0.1.0/scripts/generate_docs.py +478 -0
  89. reportnet_api-0.1.0/scripts/generate_resources.py +594 -0
  90. reportnet_api-0.1.0/scripts/live_guard.py +48 -0
  91. reportnet_api-0.1.0/scripts/make_logo.py +118 -0
  92. reportnet_api-0.1.0/scripts/regen_docs.sh +10 -0
  93. reportnet_api-0.1.0/scripts/regen_models.sh +34 -0
  94. reportnet_api-0.1.0/scripts/regen_resources.sh +9 -0
  95. reportnet_api-0.1.0/scripts/smoke_test.py +114 -0
  96. reportnet_api-0.1.0/spec/api-docs.json +1 -0
  97. reportnet_api-0.1.0/tests/__init__.py +0 -0
  98. reportnet_api-0.1.0/tests/test_async_client.py +97 -0
  99. reportnet_api-0.1.0/tests/test_cli.py +114 -0
  100. reportnet_api-0.1.0/tests/test_client.py +233 -0
  101. reportnet_api-0.1.0/tests/test_demo.py +46 -0
  102. reportnet_api-0.1.0/tests/test_discover.py +61 -0
  103. reportnet_api-0.1.0/tests/test_dtypes.py +120 -0
  104. reportnet_api-0.1.0/tests/test_easy.py +519 -0
  105. reportnet_api-0.1.0/tests/test_file_export.py +238 -0
  106. reportnet_api-0.1.0/tests/test_generate_docs.py +75 -0
  107. reportnet_api-0.1.0/tests/test_generate_resources.py +61 -0
  108. reportnet_api-0.1.0/tests/test_handles.py +341 -0
  109. reportnet_api-0.1.0/tests/test_import_and_wait.py +244 -0
  110. reportnet_api-0.1.0/tests/test_import_safety.py +178 -0
  111. reportnet_api-0.1.0/tests/test_jobs.py +211 -0
  112. reportnet_api-0.1.0/tests/test_notebooks.py +34 -0
  113. reportnet_api-0.1.0/tests/test_progress.py +205 -0
  114. reportnet_api-0.1.0/tests/test_reference_dataset.py +79 -0
  115. reportnet_api-0.1.0/tests/test_representative.py +360 -0
  116. reportnet_api-0.1.0/tests/test_resources_dataflow_ext.py +180 -0
  117. reportnet_api-0.1.0/tests/test_resources_dataset_schema.py +129 -0
  118. reportnet_api-0.1.0/tests/test_resources_dataset_schema_ext.py +687 -0
  119. reportnet_api-0.1.0/tests/test_resources_dataset_snapshot.py +59 -0
  120. reportnet_api-0.1.0/tests/test_resources_datasets.py +529 -0
  121. reportnet_api-0.1.0/tests/test_resources_datasets_ext.py +218 -0
  122. reportnet_api-0.1.0/tests/test_resources_eu_datasets.py +35 -0
  123. reportnet_api-0.1.0/tests/test_resources_release_receipts.py +68 -0
  124. reportnet_api-0.1.0/tests/test_resources_user_ext.py +49 -0
  125. reportnet_api-0.1.0/tests/test_retry.py +249 -0
  126. reportnet_api-0.1.0/tests/test_same_origin.py +113 -0
  127. reportnet_api-0.1.0/tests/test_upload_download.py +112 -0
  128. reportnet_api-0.1.0/tests/test_validation.py +173 -0
  129. reportnet_api-0.1.0/tools/streamlit_app.py +259 -0
  130. reportnet_api-0.1.0/uv.lock +1935 -0
@@ -0,0 +1,52 @@
1
+ # Copy to .env (git-ignored) and fill in real values for live-API testing.
2
+ #
3
+ # scripts/smoke_test.py does NOT read this file automatically - source it
4
+ # into your shell first:
5
+ # set -a; source .env; set +a
6
+ # then pass values as flags, e.g.:
7
+ # uv run python3 scripts/smoke_test.py --token "$REPORTNET_API_KEY" \
8
+ # --dataset-id "$REPORTNET_DATASET_ID" --dataflow-id "$REPORTNET_DATAFLOW_ID"
9
+ #
10
+ # tools/streamlit_app.py DOES read these directly via os.environ (still
11
+ # requires `source .env` first, same as above) - it prefills the sidebar's
12
+ # API key/base URL, and prefills any parameter field on any method whose
13
+ # name matches one of the common IDs below (dataset_id, dataflow_id,
14
+ # provider_id, ...), still editable per-call in the UI.
15
+
16
+ # API key generated in Reportnet under Dataflow Settings -> Generate new API key,
17
+ # or a "Bearer <jwt>" value. tools/streamlit_app.py auto-detects the
18
+ # Authorization header scheme from this value's prefix: "Bearer " -> Bearer
19
+ # auth (prefix stripped before use); anything else -> ApiKey auth. For
20
+ # scripts/smoke_test.py, pass the scheme explicitly via --token-scheme
21
+ # instead (default: ApiKey; use Bearer for a JWT).
22
+ REPORTNET_API_KEY=
23
+ # Scheme of that value, read by reportnet_api.easy.connect(): ApiKey or Bearer.
24
+ # A Bearer token is a bare UUID like an API key, so set this when it is a Bearer.
25
+ # REPORTNET_TOKEN_SCHEME=ApiKey
26
+
27
+ # Override only if testing against a non-production Reportnet instance.
28
+ # REPORTNET_BASE_URL=https://api.reportnet.europa.eu
29
+
30
+ # --- Common IDs ---
31
+ # These reappear across most endpoints (a recurring set of parameter names).
32
+ # Fill in whichever you have real values for; leave the rest blank.
33
+
34
+ # Dataflow the key is scoped to.
35
+ REPORTNET_DATAFLOW_ID=
36
+
37
+ # A dataset under that dataflow to run read-only checks against.
38
+ REPORTNET_DATASET_ID=
39
+
40
+ REPORTNET_PROVIDER_ID=
41
+ REPORTNET_TABLE_SCHEMA_ID=
42
+ REPORTNET_DATASET_SCHEMA_ID=
43
+ REPORTNET_JOB_ID=
44
+ REPORTNET_FIELD_ID=
45
+ REPORTNET_RECORD_ID=
46
+ REPORTNET_INTEGRATION_ID=
47
+
48
+ # Sandbox dataflows live tests may touch (comma-separated); checked by scripts/live_guard.py
49
+ # REPORTNET_ALLOWED_DATAFLOW_IDS=
50
+
51
+ # ApiKey of a reporter/lead reporter for one data provider (Dataflow Settings); used for provider-scoped tests
52
+ REPORTNET_PROVIDER_API_KEY=
@@ -0,0 +1,48 @@
1
+ name: Bug report
2
+ description: Something does not work as documented
3
+ labels: [bug]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ **Do not paste tokens, API keys or raw responses.** Responses can contain personal data. Replace ids and emails with placeholders.
9
+ - type: input
10
+ id: version
11
+ attributes:
12
+ label: Library version
13
+ description: Output of `pip show reportnet-api` (or the commit you installed)
14
+ validations:
15
+ required: true
16
+ - type: input
17
+ id: python
18
+ attributes:
19
+ label: Python version
20
+ validations:
21
+ required: true
22
+ - type: dropdown
23
+ id: credential
24
+ attributes:
25
+ label: Credential type
26
+ description: Which kind of credential did you use? (See the README, "Auth".)
27
+ options: [ApiKey, Bearer token, Not sure]
28
+ validations:
29
+ required: true
30
+ - type: input
31
+ id: call
32
+ attributes:
33
+ label: Function or method
34
+ description: For example `easy.read_table` or `client.datasets.import_file_data`
35
+ validations:
36
+ required: true
37
+ - type: textarea
38
+ id: what
39
+ attributes:
40
+ label: What happened, and what did you expect?
41
+ description: Include the exception text (`print(err.explain())` helps) and the HTTP status if there was one.
42
+ validations:
43
+ required: true
44
+ - type: textarea
45
+ id: repro
46
+ attributes:
47
+ label: Minimal code to reproduce
48
+ render: python
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Security problem
4
+ url: https://github.com/eeadata/reportnet-api-python/security/advisories/new
5
+ about: Report vulnerabilities privately, not as a public issue.
@@ -0,0 +1,16 @@
1
+ name: Feature request
2
+ description: Suggest an endpoint, helper or improvement
3
+ labels: [enhancement]
4
+ body:
5
+ - type: textarea
6
+ id: need
7
+ attributes:
8
+ label: What are you trying to do?
9
+ description: Describe the task first, then the function you wish existed.
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: endpoint
14
+ attributes:
15
+ label: Reportnet endpoint, if you know it
16
+ description: HTTP method and path (for example from the Reportnet web app's network tab), and the role needed.
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: monthly
7
+ - package-ecosystem: uv
8
+ directory: /
9
+ schedule:
10
+ interval: monthly
@@ -0,0 +1,11 @@
1
+ ## What and why
2
+
3
+ <!-- What does this change, and why is it needed? Link an issue if there is one. -->
4
+
5
+ ## Checklist
6
+
7
+ - [ ] `uv run ruff check .`, `uv run mypy reportnet_api` and `uv run pytest` pass
8
+ - [ ] Generated files were regenerated with their script, not edited by hand
9
+ - [ ] New behaviour has a mocked test; live-service claims are dated in `docs/live_testing_notes.md`
10
+ - [ ] README / reference updated if behaviour changed; a line added to `CHANGELOG.md`
11
+ - [ ] No tokens, API keys, real ids or personal data in code, tests or docs
@@ -0,0 +1,60 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
18
+ env:
19
+ UV_PYTHON: ${{ matrix.python-version }}
20
+ steps:
21
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22
+ with:
23
+ persist-credentials: false
24
+
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
27
+ with:
28
+ enable-cache: true
29
+
30
+ - name: Install dependencies (exactly as locked)
31
+ run: uv sync --all-groups --locked
32
+
33
+ - name: Lint (ruff)
34
+ run: uv run ruff check .
35
+
36
+ - name: Type check (mypy)
37
+ run: uv run mypy reportnet_api
38
+
39
+ - name: Test (pytest)
40
+ run: uv run pytest
41
+
42
+ package:
43
+ runs-on: ubuntu-latest
44
+ steps:
45
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
46
+ with:
47
+ persist-credentials: false
48
+
49
+ - name: Install uv
50
+ uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
51
+
52
+ - name: Build sdist and wheel
53
+ run: uv build --out-dir dist
54
+
55
+ - name: Install the wheel in a clean environment and import it
56
+ run: |
57
+ uv venv /tmp/wheel-check
58
+ uv pip install --python /tmp/wheel-check/bin/python dist/*.whl
59
+ /tmp/wheel-check/bin/python -c "import reportnet_api; print(reportnet_api.find('export')[0])"
60
+ /tmp/wheel-check/bin/reportnet --demo dataflows
@@ -0,0 +1,43 @@
1
+ name: Docs
2
+
3
+ # Publishes the site to GitHub Pages (Settings -> Pages -> Source: GitHub Actions) when the
4
+ # docs change on main; can also be run by hand.
5
+ on:
6
+ push:
7
+ branches: [main]
8
+ paths: [docs/**, mkdocs.yml]
9
+ workflow_dispatch:
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ concurrency:
15
+ group: pages
16
+ cancel-in-progress: true
17
+
18
+ jobs:
19
+ build:
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
23
+ with:
24
+ persist-credentials: false
25
+ - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
26
+ - name: Build the site (fails on broken links)
27
+ run: uv run --locked --group docs mkdocs build --strict
28
+ - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
29
+ with:
30
+ path: site
31
+
32
+ deploy:
33
+ needs: build
34
+ runs-on: ubuntu-latest
35
+ permissions:
36
+ pages: write
37
+ id-token: write
38
+ environment:
39
+ name: github-pages
40
+ url: ${{ steps.deployment.outputs.page_url }}
41
+ steps:
42
+ - id: deployment
43
+ uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
@@ -0,0 +1,70 @@
1
+ name: Release
2
+
3
+ # Publishes to PyPI with Trusted Publishing (no token is stored anywhere).
4
+ # - Publishing a GitHub release uploads to PyPI.
5
+ # - Running the workflow by hand uploads to TestPyPI (a rehearsal).
6
+ # One-time setup is described in docs/RELEASING.md.
7
+
8
+ on:
9
+ release:
10
+ types: [published]
11
+ workflow_dispatch:
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ build:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
21
+ with:
22
+ persist-credentials: false
23
+ - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
24
+ - name: Check the tag matches the package version
25
+ if: github.event_name == 'release'
26
+ run: |
27
+ version=$(uv run --no-project python -c "import tomllib;print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
28
+ test "v$version" = "${GITHUB_REF_NAME}" || { echo "tag ${GITHUB_REF_NAME} != v$version"; exit 1; }
29
+ - name: Lint, type check and test before publishing
30
+ run: |
31
+ uv sync --all-groups --locked
32
+ uv run ruff check .
33
+ uv run mypy reportnet_api
34
+ uv run pytest
35
+ - run: uv build --out-dir dist
36
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
37
+ with:
38
+ name: dist
39
+ path: dist
40
+
41
+ publish-testpypi:
42
+ if: github.event_name == 'workflow_dispatch'
43
+ needs: build
44
+ runs-on: ubuntu-latest
45
+ environment: testpypi
46
+ permissions:
47
+ id-token: write
48
+ steps:
49
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
50
+ with:
51
+ name: dist
52
+ path: dist
53
+ - uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
54
+ with:
55
+ repository-url: https://test.pypi.org/legacy/
56
+ skip-existing: true
57
+
58
+ publish-pypi:
59
+ if: github.event_name == 'release'
60
+ needs: build
61
+ runs-on: ubuntu-latest
62
+ environment: pypi
63
+ permissions:
64
+ id-token: write
65
+ steps:
66
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
67
+ with:
68
+ name: dist
69
+ path: dist
70
+ - uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
@@ -0,0 +1,231 @@
1
+ # Local scratch files (test-run reports, etc.) - never committed
2
+ /tmp/
3
+
4
+ # Raw live-API response captures from manual testing (Phase 7/T05 etc.) -
5
+ # may contain presigned URLs, job IDs, or other live-instance details.
6
+ /live_responses/
7
+
8
+ # Byte-compiled / optimized / DLL files
9
+ __pycache__/
10
+ *.py[codz]
11
+ *$py.class
12
+
13
+ # C extensions
14
+ *.so
15
+
16
+ # Distribution / packaging
17
+ .Python
18
+ build/
19
+ develop-eggs/
20
+ dist/
21
+ downloads/
22
+ eggs/
23
+ .eggs/
24
+ lib/
25
+ lib64/
26
+ parts/
27
+ sdist/
28
+ var/
29
+ wheels/
30
+ share/python-wheels/
31
+ *.egg-info/
32
+ .installed.cfg
33
+ *.egg
34
+ MANIFEST
35
+
36
+ # PyInstaller
37
+ # Usually these files are written by a python script from a template
38
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
39
+ *.manifest
40
+ *.spec
41
+
42
+ # Installer logs
43
+ pip-log.txt
44
+ pip-delete-this-directory.txt
45
+
46
+ # Unit test / coverage reports
47
+ htmlcov/
48
+ .tox/
49
+ .nox/
50
+ .coverage
51
+ .coverage.*
52
+ .cache
53
+ nosetests.xml
54
+ coverage.xml
55
+ *.cover
56
+ *.py.cover
57
+ .hypothesis/
58
+ .pytest_cache/
59
+ cover/
60
+
61
+ # Translations
62
+ *.mo
63
+ *.pot
64
+
65
+ # Django stuff:
66
+ *.log
67
+ local_settings.py
68
+ db.sqlite3
69
+ db.sqlite3-journal
70
+
71
+ # Flask stuff:
72
+ instance/
73
+ .webassets-cache
74
+
75
+ # Scrapy stuff:
76
+ .scrapy
77
+
78
+ # Sphinx documentation
79
+ docs/_build/
80
+
81
+ # PyBuilder
82
+ .pybuilder/
83
+ target/
84
+
85
+ # Jupyter Notebook
86
+ .ipynb_checkpoints
87
+
88
+ # IPython
89
+ profile_default/
90
+ ipython_config.py
91
+
92
+ # pyenv
93
+ # For a library or package, you might want to ignore these files since the code is
94
+ # intended to run in multiple environments; otherwise, check them in:
95
+ # .python-version
96
+
97
+ # pipenv
98
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
99
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
100
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
101
+ # install all needed dependencies.
102
+ # Pipfile.lock
103
+
104
+ # UV
105
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # uv.lock
109
+
110
+ # poetry
111
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
112
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
113
+ # commonly ignored for libraries.
114
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
115
+ # poetry.lock
116
+ # poetry.toml
117
+
118
+ # pdm
119
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
120
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
121
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
122
+ # pdm.lock
123
+ # pdm.toml
124
+ .pdm-python
125
+ .pdm-build/
126
+
127
+ # pixi
128
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
129
+ # pixi.lock
130
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
131
+ # in the .venv directory. It is recommended not to include this directory in version control.
132
+ .pixi
133
+
134
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
135
+ __pypackages__/
136
+
137
+ # Celery stuff
138
+ celerybeat-schedule
139
+ celerybeat.pid
140
+
141
+ # Redis
142
+ *.rdb
143
+ *.aof
144
+ *.pid
145
+
146
+ # RabbitMQ
147
+ mnesia/
148
+ rabbitmq/
149
+ rabbitmq-data/
150
+
151
+ # ActiveMQ
152
+ activemq-data/
153
+
154
+ # SageMath parsed files
155
+ *.sage.py
156
+
157
+ # Environments
158
+ .env
159
+ .envrc
160
+ .venv
161
+ env/
162
+ venv/
163
+ ENV/
164
+ env.bak/
165
+ venv.bak/
166
+
167
+ # Spyder project settings
168
+ .spyderproject
169
+ .spyproject
170
+
171
+ # Rope project settings
172
+ .ropeproject
173
+
174
+ # mkdocs documentation
175
+ /site
176
+
177
+ # mypy
178
+ .mypy_cache/
179
+ .dmypy.json
180
+ dmypy.json
181
+
182
+ # Pyre type checker
183
+ .pyre/
184
+
185
+ # pytype static type analyzer
186
+ .pytype/
187
+
188
+ # Cython debug symbols
189
+ cython_debug/
190
+
191
+ # PyCharm
192
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
193
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
194
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
195
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
196
+ # .idea/
197
+
198
+ # Abstra
199
+ # Abstra is an AI-powered process automation framework.
200
+ # Ignore directories containing user credentials, local state, and settings.
201
+ # Learn more at https://abstra.io/docs
202
+ .abstra/
203
+
204
+ # Visual Studio Code
205
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
206
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
207
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
208
+ # you could uncomment the following to ignore the entire vscode folder
209
+ # .vscode/
210
+ # Temporary file for partial code execution
211
+ tempCodeRunnerFile.py
212
+
213
+ # Ruff stuff:
214
+ .ruff_cache/
215
+
216
+ # PyPI configuration file
217
+ .pypirc
218
+
219
+ # Marimo
220
+ marimo/_static/
221
+ marimo/_lsp/
222
+ __marimo__/
223
+
224
+ # Streamlit
225
+ .streamlit/secrets.toml
226
+
227
+ # OS and editor files
228
+ .DS_Store
229
+ Thumbs.db
230
+ .idea/
231
+ .vscode/
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,21 @@
1
+ # Changelog
2
+
3
+ All notable changes are listed here. The project follows [Semantic Versioning](https://semver.org/):
4
+ while the major version is `0`, a **minor** release (0.x.0) may change the API, and a patch
5
+ release (0.x.y) only fixes bugs. Breaking changes are called out below.
6
+
7
+ ## 0.1.0 (2026-11-18)
8
+
9
+ First public version.
10
+
11
+ - Sync and async clients for the Reportnet 3 REST API, generated resource methods plus
12
+ hand-written ones for endpoints missing from the API's Swagger description.
13
+ - `reportnet_api.easy`: notebook helpers (pandas DataFrames or plain records), typed
14
+ columns, safer uploads (`check_import_file`, `import_dataframe`, `confirm=True` for
15
+ `replace=True`), validation helpers, progress and job waiting.
16
+ - Dataflow and dataset handles, `find()` search, `easy.guide()` cheat sheet.
17
+ - `demo_client()` for trying the helpers without a credential; a read-only `reportnet`
18
+ command line.
19
+ - The credential is only sent to the configured host, and a plain-`http` base URL warns.
20
+ - `read_records`/`read_all_records` for plain dicts without pandas (FME, scripts).
21
+ - Python 3.11 or newer.
@@ -0,0 +1,9 @@
1
+ # Code of conduct
2
+
3
+ This project follows the [Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
4
+ In short: be respectful and constructive, assume good intent, and keep discussions about
5
+ the work. Harassment or personal attacks are not tolerated.
6
+
7
+ To report unacceptable behaviour, contact the maintainers privately through the
8
+ repository's GitHub page (the profile of the maintainer listed in `pyproject.toml`). Reports
9
+ are handled confidentially. Security problems go through [SECURITY.md](SECURITY.md) instead.
@@ -0,0 +1,54 @@
1
+ # Contributing
2
+
3
+ Thanks for helping. This is a small library, so the process is light.
4
+
5
+ ## Set up
6
+
7
+ ```
8
+ uv sync --all-groups # install deps + dev tools
9
+ uv run ruff check . # lint
10
+ uv run mypy reportnet_api
11
+ uv run pytest # no network needed: HTTP is mocked
12
+ ```
13
+
14
+ All three must pass; CI runs the same commands on Python 3.11 to 3.14 and also builds the
15
+ wheel. The docs site is built with `uv run --group docs mkdocs build --strict`.
16
+
17
+ ## Generated files: do not hand-edit
18
+
19
+ - `reportnet_api/models/generated.py` is generated from `spec/api-docs.json`
20
+ (`scripts/regen_models.sh`).
21
+ - `reportnet_api/resources/*.py` are generated by `scripts/generate_resources.py`
22
+ (`scripts/regen_resources.sh`), except the hand-written `*_ext.py` modules.
23
+ - `docs/reference/*.md` is generated (`scripts/regen_docs.sh`) from the code, the spec
24
+ and the notes in `scripts/docs_caveats.py`.
25
+
26
+ A manual fix to a generated file is silently lost on the next regeneration. Fix the
27
+ generator, the template or `docs_caveats.py` instead, regenerate, and commit the
28
+ regenerated output separately from hand-written changes.
29
+
30
+ ## Tests and live behaviour
31
+
32
+ - Add a mocked test (`respx`) for every change in behaviour.
33
+ - Statements about what the live API does belong in `docs/live_testing_notes.md` with
34
+ the date and how it was observed. Mark anything unverified as unverified.
35
+ - Never commit tokens, API keys, response captures or real dataflow/dataset ids, and
36
+ keep personal data (emails, names) out of tests and docs: use `example.org`.
37
+ - Please do not run write or delete calls against a dataflow you do not own.
38
+
39
+ ## Versions, releases and the changelog
40
+
41
+ Supported Python versions follow the upstream support window: when a Python version reaches
42
+ end of life it is dropped from `requires-python`, the classifiers and the CI matrix. Add a
43
+ line to `CHANGELOG.md` for every user-visible change; releases are described in
44
+ `docs/RELEASING.md`.
45
+
46
+ ## Code of conduct
47
+
48
+ See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
49
+
50
+ ## Pull requests
51
+
52
+ Keep them small and focused, explain the reason for the change, and update the README
53
+ or reference where behaviour changes. By contributing you agree your work is released
54
+ under the project's MIT license.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 European Environment Agency (EEA)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.