Skip to content

Commit

Permalink
Export cache config and fix package name in README (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkanche authored Dec 4, 2024
1 parent 74f8ade commit b2361a0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/pybiocfilecache/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
del version, PackageNotFoundError

from .cache import BiocFileCache
from .config import CacheConfig
26 changes: 13 additions & 13 deletions src/pybiocfilecache/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b2361a0

Please sign in to comment.