From d089f94f4594b934b7b93fe8f39bd7b4a4bf634d Mon Sep 17 00:00:00 2001 From: Jayaram Kancherla Date: Tue, 3 Dec 2024 16:01:11 -0800 Subject: [PATCH] export cache config and fix package name in README --- README.md | 4 ++-- src/pybiocfilecache/__init__.py | 1 + src/pybiocfilecache/models.py | 26 +++++++++++++------------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 85713ca..e5f89b0 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ pip install pybiocfilecache ## Quick Start ```python -from biocfilecache import BiocFileCache +from pybiocfilecache import BiocFileCache # Initialize cache cache = BiocFileCache("path/to/cache/directory") @@ -37,7 +37,7 @@ print(resource.rpath) # Path to cached file ### Configuration ```python -from biocfilecache import BiocFileCache, CacheConfig +from pybiocfilecache import BiocFileCache, CacheConfig from datetime import timedelta from pathlib import Path diff --git a/src/pybiocfilecache/__init__.py b/src/pybiocfilecache/__init__.py index 9479535..31ee898 100644 --- a/src/pybiocfilecache/__init__.py +++ b/src/pybiocfilecache/__init__.py @@ -16,3 +16,4 @@ del version, PackageNotFoundError from .cache import BiocFileCache +from .config import CacheConfig diff --git a/src/pybiocfilecache/models.py b/src/pybiocfilecache/models.py index 71c0998..d944575 100644 --- a/src/pybiocfilecache/models.py +++ b/src/pybiocfilecache/models.py @@ -25,43 +25,43 @@ class Resource(Base): Attributes: id: - Auto-incrementing primary key + Auto-incrementing primary key. rid: - Unique resource identifier (UUID) + Unique resource identifier (UUID). rname: - User-provided resource name + User-provided resource name. create_time: - When the resource was first added + When the resource was first added. access_time: - Last time the resource was accessed + Last time the resource was accessed. rpath: - Path to the resource in the cache + Path to the resource in the cache. rtype: - Type of resource (local, web, relative) + Type of resource (local, web, relative). fpath: - Original file path + Original file path. last_modified_time: - Last time the resource was modified + Last time the resource was modified. etag: - Checksum/hash of the resource + Checksum/hash of the resource. expires: - When the resource should be considered expired + When the resource should be considered expired. tags: - Optional comma-separated tags for categorization + Optional comma-separated tags for categorization. size_bytes: - Size of the resource in bytes + Size of the resource in bytes. """ __tablename__ = "resource"