pyBiocFileCache 0.7.0__tar.gz → 0.8.0.dev0__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 (71) hide show
  1. pybiocfilecache-0.8.0.dev0/.coveragerc +13 -0
  2. pybiocfilecache-0.8.0.dev0/.gitattributes +10 -0
  3. pybiocfilecache-0.8.0.dev0/.github/dependabot.yml +15 -0
  4. pybiocfilecache-0.8.0.dev0/.github/workflows/pre-commit.yml +16 -0
  5. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/.github/workflows/publish-pypi.yml +14 -16
  6. pybiocfilecache-0.8.0.dev0/.github/workflows/r-interop-tests.yml +56 -0
  7. pybiocfilecache-0.8.0.dev0/.github/workflows/run-tests.yml +72 -0
  8. pybiocfilecache-0.8.0.dev0/.gitignore +112 -0
  9. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/.pre-commit-config.yaml +6 -4
  10. pybiocfilecache-0.8.0.dev0/.python-version +1 -0
  11. pybiocfilecache-0.8.0.dev0/.readthedocs.yml +21 -0
  12. pybiocfilecache-0.8.0.dev0/.zenodo.json +14 -0
  13. pybiocfilecache-0.8.0.dev0/AUTHORS.md +4 -0
  14. pybiocfilecache-0.8.0.dev0/CHANGELOG.md +4 -0
  15. pybiocfilecache-0.8.0.dev0/CITATION.cff +10 -0
  16. pybiocfilecache-0.8.0.dev0/CONTRIBUTING.md +20 -0
  17. pybiocfilecache-0.8.0.dev0/PKG-INFO +21 -0
  18. pybiocfilecache-0.8.0.dev0/README.md +4 -0
  19. pybiocfilecache-0.8.0.dev0/docs/authors.md +1 -0
  20. pybiocfilecache-0.8.0.dev0/docs/best_practices.md +49 -0
  21. pybiocfilecache-0.8.0.dev0/docs/changelog.md +1 -0
  22. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/docs/conf.py +60 -38
  23. pybiocfilecache-0.8.0.dev0/docs/contributing.md +4 -0
  24. pybiocfilecache-0.8.0.dev0/docs/license.md +5 -0
  25. pybiocfilecache-0.8.0.dev0/docs/readme.md +1 -0
  26. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/docs/requirements.txt +3 -2
  27. pybiocfilecache-0.8.0.dev0/pyproject.toml +66 -0
  28. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/src/pybiocfilecache/cache.py +256 -112
  29. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/src/pybiocfilecache/models.py +2 -1
  30. pybiocfilecache-0.8.0.dev0/src/pybiocfilecache/py.typed +0 -0
  31. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/src/pybiocfilecache/utils.py +14 -6
  32. pybiocfilecache-0.8.0.dev0/tests/test_cache.py +304 -0
  33. pybiocfilecache-0.8.0.dev0/tests/test_r_interop.py +146 -0
  34. pybiocfilecache-0.8.0.dev0/tox.ini +58 -0
  35. pybiocfilecache-0.8.0.dev0/uv.lock +1993 -0
  36. pybiocfilecache-0.7.0/.coveragerc +0 -28
  37. pybiocfilecache-0.7.0/.github/workflows/run-tests.yml +0 -33
  38. pybiocfilecache-0.7.0/.gitignore +0 -56
  39. pybiocfilecache-0.7.0/.readthedocs.yml +0 -23
  40. pybiocfilecache-0.7.0/AUTHORS.md +0 -5
  41. pybiocfilecache-0.7.0/CHANGELOG.md +0 -52
  42. pybiocfilecache-0.7.0/PKG-INFO +0 -117
  43. pybiocfilecache-0.7.0/README.md +0 -92
  44. pybiocfilecache-0.7.0/docs/authors.md +0 -5
  45. pybiocfilecache-0.7.0/docs/best_practices.md +0 -28
  46. pybiocfilecache-0.7.0/docs/changelog.md +0 -52
  47. pybiocfilecache-0.7.0/docs/readme.md +0 -92
  48. pybiocfilecache-0.7.0/pyproject.toml +0 -27
  49. pybiocfilecache-0.7.0/setup.cfg +0 -75
  50. pybiocfilecache-0.7.0/setup.py +0 -20
  51. pybiocfilecache-0.7.0/src/pyBiocFileCache.egg-info/PKG-INFO +0 -117
  52. pybiocfilecache-0.7.0/src/pyBiocFileCache.egg-info/SOURCES.txt +0 -42
  53. pybiocfilecache-0.7.0/src/pyBiocFileCache.egg-info/dependency_links.txt +0 -1
  54. pybiocfilecache-0.7.0/src/pyBiocFileCache.egg-info/not-zip-safe +0 -1
  55. pybiocfilecache-0.7.0/src/pyBiocFileCache.egg-info/requires.txt +0 -10
  56. pybiocfilecache-0.7.0/src/pyBiocFileCache.egg-info/top_level.txt +0 -1
  57. pybiocfilecache-0.7.0/tests/test_cache.py +0 -139
  58. pybiocfilecache-0.7.0/tox.ini +0 -72
  59. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/CONTRIBUTING.rst +0 -0
  60. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/LICENSE.txt +0 -0
  61. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/docs/Makefile +0 -0
  62. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/docs/_static/.gitignore +0 -0
  63. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/docs/contributing.rst +0 -0
  64. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/docs/index.md +0 -0
  65. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/docs/license.rst +0 -0
  66. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/src/pybiocfilecache/__init__.py +0 -0
  67. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/src/pybiocfilecache/config.py +0 -0
  68. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/src/pybiocfilecache/const.py +0 -0
  69. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/tests/conftest.py +0 -0
  70. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/tests/data/test1.txt +0 -0
  71. {pybiocfilecache-0.7.0 → pybiocfilecache-0.8.0.dev0}/tests/data/test2.txt +0 -0
@@ -0,0 +1,13 @@
1
+ [run]
2
+ source = src
3
+ omit = tests/*
4
+
5
+ [report]
6
+ exclude_lines =
7
+ pragma: no cover
8
+ def __repr__
9
+ if self.debug:
10
+ raise AssertionError
11
+ raise NotImplementedError
12
+ if 0:
13
+ if __name__ == .__main__.:
@@ -0,0 +1,10 @@
1
+ # Enforce Unix line endings
2
+ * text=auto eol=lf
3
+
4
+ # Git LFS configurations for large scientific datasets
5
+ *.h5 filter=lfs diff=lfs merge=lfs -text
6
+ *.hdf5 filter=lfs diff=lfs merge=lfs -text
7
+ *.rds filter=lfs diff=lfs merge=lfs -text
8
+ *.rda filter=lfs diff=lfs merge=lfs -text
9
+ *.csv.gz filter=lfs diff=lfs merge=lfs -text
10
+ *.bam filter=lfs diff=lfs merge=lfs -text
@@ -0,0 +1,15 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ labels:
8
+ - "dependencies"
9
+
10
+ - package-ecosystem: "pip"
11
+ directory: "/"
12
+ schedule:
13
+ interval: "weekly"
14
+ labels:
15
+ - "dependencies"
@@ -0,0 +1,16 @@
1
+ name: pre-commit
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [main]
7
+
8
+ jobs:
9
+ pre-commit:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: actions/setup-python@v5
14
+ with:
15
+ python-version: '3.12'
16
+ - uses: pre-commit/action@v3.0.1
@@ -1,6 +1,3 @@
1
- # This workflow will install Python dependencies, run tests and lint with a single version of Python
2
- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
-
4
1
  name: Publish to PyPI
5
2
 
6
3
  on:
@@ -19,19 +16,28 @@ jobs:
19
16
  steps:
20
17
  - uses: actions/checkout@v4
21
18
 
22
- - name: Set up Python 3.11
19
+ - name: Set up Python 3.12
23
20
  uses: actions/setup-python@v5
24
21
  with:
25
- python-version: 3.11
22
+ python-version: 3.12
26
23
 
27
24
  - name: Install dependencies
28
25
  run: |
29
26
  python -m pip install --upgrade pip
30
- pip install tox
27
+ pip install uv tox
28
+ uv sync
29
+
30
+ - name: Test
31
+ run: |
32
+ tox -e default
31
33
 
32
- - name: Test with tox
34
+ - name: Build Project
33
35
  run: |
34
- tox
36
+ tox -e build
37
+
38
+ # This uses the trusted publisher workflow so no token is required.
39
+ - name: Publish to PyPI
40
+ uses: pypa/gh-action-pypi-publish@release/v1
35
41
 
36
42
  - name: Build docs
37
43
  run: |
@@ -45,11 +51,3 @@ jobs:
45
51
  branch: gh-pages # The branch the action should deploy to.
46
52
  folder: ./docs/_build/html
47
53
  clean: true # Automatically remove deleted files from the deploy branch
48
-
49
- - name: Build Project and Publish
50
- run: |
51
- python -m tox -e clean,build
52
-
53
- # This uses the trusted publisher workflow so no token is required.
54
- - name: Publish to PyPI
55
- uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,56 @@
1
+ name: R and Python Interop Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ - main
8
+ pull_request:
9
+ branches:
10
+ - master
11
+ - main
12
+ workflow_dispatch:
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ concurrency:
18
+ group: >-
19
+ ${{ github.workflow }}-${{ github.ref_type }}-
20
+ ${{ github.event.pull_request.number || github.sha }}
21
+ cancel-in-progress: true
22
+
23
+ jobs:
24
+ r-python-roundtrip:
25
+ runs-on: ubuntu-latest
26
+ name: R (BiocFileCache) <-> Python roundtrip
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+
30
+ - uses: actions/setup-python@v5
31
+ with:
32
+ python-version: "3.12"
33
+
34
+ - name: Install Python dependencies
35
+ run: |
36
+ python -m pip install --upgrade pip
37
+ pip install uv
38
+ uv sync
39
+
40
+ - uses: r-lib/actions/setup-r@v2
41
+ with:
42
+ use-public-rspm: true
43
+
44
+ - name: Install R BiocFileCache
45
+ run: |
46
+ Rscript -e '
47
+ if (!requireNamespace("BiocManager", quietly = TRUE))
48
+ install.packages("BiocManager", repos = "https://cloud.r-project.org")
49
+ BiocManager::install("BiocFileCache", ask = FALSE, update = FALSE)
50
+ '
51
+
52
+ - name: Verify R BiocFileCache is available
53
+ run: Rscript -e "library(BiocFileCache)"
54
+
55
+ - name: Run R/Python roundtrip tests
56
+ run: uv run pytest tests/test_r_interop.py -v
@@ -0,0 +1,72 @@
1
+ name: Test the library
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master # for legacy repos
7
+ - main
8
+ pull_request:
9
+ branches:
10
+ - master # for legacy repos
11
+ - main
12
+ workflow_dispatch: # Allow manually triggering the workflow
13
+ schedule:
14
+ # Run roughly every 15 days at 00:00 UTC
15
+ # (useful to check if updates on dependencies break the package)
16
+ - cron: "0 0 1,16 * *"
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ concurrency:
22
+ group: >-
23
+ ${{ github.workflow }}-${{ github.ref_type }}-
24
+ ${{ github.event.pull_request.number || github.sha }}
25
+ cancel-in-progress: true
26
+
27
+ jobs:
28
+ test:
29
+ strategy:
30
+ matrix:
31
+ python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
32
+ platform:
33
+ - ubuntu-latest
34
+ - macos-latest
35
+ - windows-latest
36
+ runs-on: ${{ matrix.platform }}
37
+ name: Python ${{ matrix.python }}, ${{ matrix.platform }}
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+
41
+ - uses: actions/setup-python@v5
42
+ id: setup-python
43
+ with:
44
+ python-version: ${{ matrix.python }}
45
+
46
+ - name: Install dependencies
47
+ run: |
48
+ python -m pip install --upgrade pip
49
+ pip install uv tox
50
+ uv sync
51
+
52
+ - name: Run tests
53
+ run: |
54
+ tox -e default -- --cov --cov-branch --cov-report=xml
55
+
56
+ - name: Check for codecov token availability
57
+ id: codecov-check
58
+ shell: bash
59
+ run: |
60
+ if [ ${{ secrets.CODECOV_TOKEN }} != '' ]; then
61
+ echo "codecov=true" >> $GITHUB_OUTPUT;
62
+ else
63
+ echo "codecov=false" >> $GITHUB_OUTPUT;
64
+ fi
65
+
66
+ - name: Upload coverage reports to Codecov with GitHub Action
67
+ uses: codecov/codecov-action@v5
68
+ if: ${{ steps.codecov-check.outputs.codecov == 'true' }}
69
+ env:
70
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
71
+ slug: ${{ github.repository }}
72
+ flags: ${{ matrix.platform }} - py${{ matrix.python }}
@@ -0,0 +1,112 @@
1
+ # Temporary and binary files
2
+ *~
3
+ *.py[cod]
4
+ *.so
5
+ *.cfg
6
+ !.isort.cfg
7
+ !setup.cfg
8
+ *.orig
9
+ *.log
10
+ *.pot
11
+ __pycache__/*
12
+ .cache/*
13
+ .*.swp
14
+ */.ipynb_checkpoints/*
15
+ .DS_Store
16
+
17
+ # Project files
18
+ .ropeproject
19
+ .project
20
+ .pydevproject
21
+ .settings
22
+ .idea
23
+ .vscode
24
+ tags
25
+
26
+ # Package files
27
+ *.egg
28
+ *.eggs/
29
+ .installed.cfg
30
+ *.egg-info
31
+
32
+ # Unittest and coverage
33
+ htmlcov/*
34
+ .coverage
35
+ .coverage.*
36
+ .tox
37
+ junit*.xml
38
+ coverage.xml
39
+ .pytest_cache/
40
+
41
+ # Build and docs folder/files
42
+ build/*
43
+ dist/*
44
+ sdist/*
45
+ docs/api/*
46
+ docs/_rst/*
47
+ docs/_build/*
48
+ cover/*
49
+ MANIFEST
50
+
51
+ # Per-project virtualenvs
52
+ .venv*/
53
+ .conda*/
54
+
55
+ # remove cache
56
+ cache
57
+
58
+ # Byte-compiled / optimized / DLL files
59
+ __pycache__/
60
+ *$py.class
61
+ # C extensions
62
+ # Distribution / packaging
63
+ .Python
64
+ build/
65
+ develop-eggs/
66
+ dist/
67
+ downloads/
68
+ eggs/
69
+ .eggs/
70
+ lib/
71
+ lib64/
72
+ parts/
73
+ sdist/
74
+ var/
75
+ wheels/
76
+ share/python-wheels/
77
+ *.egg-info/
78
+ # PyInstaller
79
+ *.manifest
80
+ *.spec
81
+ # Installer logs
82
+ pip-log.txt
83
+ pip-delete-this-directory.txt
84
+ # Unit test / coverage reports
85
+ htmlcov/
86
+ .tox/
87
+ .nox/
88
+ .cache
89
+ nosetests.xml
90
+ *.cover
91
+ *.py,cover
92
+ .hypothesis/
93
+ cover/
94
+ # Sphinx documentation
95
+ docs/_build/
96
+ # Environments
97
+ .env
98
+ .venv
99
+ env/
100
+ venv/
101
+ ENV/
102
+ env.bak/
103
+ venv.bak/
104
+ # mypy, ruff, etc
105
+ .mypy_cache/
106
+ .ruff_cache/
107
+ .pyre/
108
+ # Editors
109
+ .vscode/
110
+ .idea/
111
+ *.swp
112
+ *.swo
@@ -2,7 +2,7 @@ exclude: '^docs/conf.py'
2
2
 
3
3
  repos:
4
4
  - repo: https://github.com/pre-commit/pre-commit-hooks
5
- rev: v5.0.0
5
+ rev: v6.0.0
6
6
  hooks:
7
7
  - id: trailing-whitespace
8
8
  - id: check-added-large-files
@@ -33,10 +33,12 @@ repos:
33
33
 
34
34
  - repo: https://github.com/astral-sh/ruff-pre-commit
35
35
  # Ruff version.
36
- rev: v0.11.0
36
+ rev: v0.16.2
37
37
  hooks:
38
- - id: ruff
39
- args: [--fix, --exit-non-zero-on-fix]
38
+ # Run the linter.
39
+ - id: ruff-check
40
+ args: [--fix, --exit-zero]
41
+ # Run the formatter.
40
42
  - id: ruff-format
41
43
 
42
44
  ## If like to embrace black styles even in the docs:
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,21 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ version: 2
5
+
6
+ build:
7
+ os: ubuntu-22.04
8
+ tools:
9
+ python: "3.12"
10
+ jobs:
11
+ post_install:
12
+ - curl -LsSf https://astral.sh/uv/install.sh | sh
13
+ - uv sync
14
+
15
+ sphinx:
16
+ configuration: docs/conf.py
17
+
18
+ python:
19
+ install:
20
+ - method: pip
21
+ path: .
@@ -0,0 +1,14 @@
1
+ {
2
+ "title": "pybiocfilecache",
3
+ "description": "File based cache for resources and metadata",
4
+ "creators": [
5
+ {
6
+ "name": "Jayaram Kancherla",
7
+ "affiliation": "YOUR_AFFILIATION",
8
+ "orcid": "0000-0000-0000-0000"
9
+ }
10
+ ],
11
+ "access_right": "open",
12
+ "license": "MIT",
13
+ "upload_type": "software"
14
+ }
@@ -0,0 +1,4 @@
1
+ ```{include} ../AUTHORS.md
2
+ :relative-docs: docs/
3
+ :relative-images:
4
+ ```
@@ -0,0 +1,4 @@
1
+ ```{include} ../CHANGELOG.md
2
+ :relative-docs: docs/
3
+ :relative-images:
4
+ ```
@@ -0,0 +1,10 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it as below."
3
+ authors:
4
+ - family-names: "Kancherla"
5
+ given-names: "Jayaram"
6
+ orcid: "https://orcid.org/0000-0000-0000-0000"
7
+ title: "pybiocfilecache"
8
+ version: 0.1.0
9
+ date-released: 2026-08-24
10
+ url: "https://github.com/YOUR_ORG_OR_USERNAME/pybiocfilecache"
@@ -0,0 +1,20 @@
1
+ # Contributing
2
+
3
+ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
4
+
5
+ ## Report Bugs
6
+ Report bugs at the issue tracker.
7
+
8
+ ## Fix Bugs
9
+ Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.
10
+
11
+ ## Implement Features
12
+ Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
13
+
14
+ ## Submit Feedback
15
+ The best way to send feedback is to file an issue.
16
+
17
+ If you are proposing a feature:
18
+ - Explain in detail how it would work.
19
+ - Keep the scope as narrow as possible, to make it easier to implement.
20
+ - Remember that this is a volunteer-driven project, and that contributions are welcome!
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.5
2
+ Name: pybiocfilecache
3
+ Version: 0.8.0.dev0
4
+ Summary: File based cache for resources and metadata
5
+ Author-email: Jayaram Kancherla <jayaram.kancherla@gmail.com>
6
+ License-File: AUTHORS.md
7
+ License-File: LICENSE.txt
8
+ Requires-Python: >=3.12
9
+ Requires-Dist: biocframe>=0.7.3
10
+ Requires-Dist: importlib-metadata>=9.0.0; python_full_version < '3.8'
11
+ Requires-Dist: sqlalchemy>=2.0.52
12
+ Provides-Extra: testing
13
+ Requires-Dist: pytest-cov>=7.1.0; extra == 'testing'
14
+ Requires-Dist: pytest>=9.1.1; extra == 'testing'
15
+ Requires-Dist: setuptools>=84.0.0; extra == 'testing'
16
+ Description-Content-Type: text/markdown
17
+
18
+ ```{include} ../README.md
19
+ :relative-docs: docs/
20
+ :relative-images:
21
+ ```
@@ -0,0 +1,4 @@
1
+ ```{include} ../README.md
2
+ :relative-docs: docs/
3
+ :relative-images:
4
+ ```
@@ -0,0 +1 @@
1
+ ../AUTHORS.md
@@ -0,0 +1,49 @@
1
+ # Best Practices
2
+
3
+ 1. Use context managers for automatic database cleanup:
4
+ ```python
5
+ from pybiocfilecache import BiocFileCache
6
+
7
+ with BiocFileCache("cache_directory") as cache:
8
+ cache.add("myfile", "path/to/file.txt")
9
+ ```
10
+
11
+ 2. Look up resources by `rname` or `rid`, and use `wait=False` to inspect missing files without waiting:
12
+ ```python
13
+ # Standard lookup (waits up to 30s if a file copy is in progress)
14
+ rec = cache.get("myfile")
15
+
16
+ # Immediate lookup when checking or repairing a missing cached file
17
+ rec = cache.get(rid="BFC1", wait=False)
18
+ ```
19
+
20
+ 3. Search, update, and remove resources by `rname` or `rid` (especially useful when sharing a cache with R `BiocFileCache`):
21
+ ```python
22
+ matches = cache.search("myfile", field="rname", exact=False)
23
+ cache.update(rid="BFC1", fpath="path/to/new_file.txt")
24
+ cache.remove(rid="BFC1")
25
+ ```
26
+
27
+ 4. Set expiration dates for temporary files:
28
+ ```python
29
+ from datetime import datetime, timedelta, timezone
30
+
31
+ cache.add(
32
+ "temp.txt",
33
+ "temp.txt",
34
+ expires=datetime.now(timezone.utc) + timedelta(hours=1),
35
+ )
36
+ ```
37
+
38
+ 5. Regular maintenance and integrity checks:
39
+ ```python
40
+ # Remove expired resources
41
+ cache.cleanup()
42
+
43
+ # Verify checksums of cached files
44
+ valid, invalid = cache.verify_cache()
45
+
46
+ # Monitor cache statistics
47
+ stats = cache.get_stats()
48
+ print(stats["total_resources"], stats["expired_resources"])
49
+ ```
@@ -0,0 +1 @@
1
+ ../CHANGELOG.md