proxystore.endpoint.storage¶
Blob storage interface for endpoints.
    
              Bases: Protocol
Endpoint storage protocol for blobs.
async
  
¶
    
async
  
¶
    Get a blob from storage.
Parameters:
- 
            key(str) –Key associated with the blob to get. 
- 
            default(bytes | None, default:None) –Default return value if the blob does not exist. 
Returns:
- 
              bytes | None–The blob associated with the key or the value of default.
Source code in proxystore/endpoint/storage.py
              
async
  
¶
    Store the blob associated with a key.
Parameters:
Raises:
- 
              ObjectSizeExceededError–If the max object size is configured and the data exceeds that size. 
Source code in proxystore/endpoint/storage.py
              
DictStorage(
    *, max_object_size: int | None = MAX_OBJECT_SIZE_DEFAULT
)
Simple dictionary-based storage for blobs.
Parameters:
- 
            max_object_size(int | None, default:MAX_OBJECT_SIZE_DEFAULT) –Optional max size in bytes for any single object stored by the endpoint. If exceeded, an error is raised. 
Source code in proxystore/endpoint/storage.py
                    
                  
async
  
¶
    
async
  
¶
    Get a blob from storage.
Parameters:
- 
            key(str) –Key associated with the blob to get. 
- 
            default(bytes | None, default:None) –Default return value if the blob does not exist. 
Returns:
- 
              bytes | None–The blob associated with the key or the value of default.
Source code in proxystore/endpoint/storage.py
              
async
  
¶
    Store the blob associated with a key.
Parameters:
Raises:
- 
              ObjectSizeExceededError–If the max object size is configured and the data exceeds that size. 
Source code in proxystore/endpoint/storage.py
              
SQLiteStorage(
    database_path: str | Path = ":memory:",
    *,
    max_object_size: int | None = MAX_OBJECT_SIZE_DEFAULT
)
SQLite storage protocol for blobs.
Parameters:
- 
            database_path(str | Path, default:':memory:') –Path to database file. 
- 
            max_object_size(int | None, default:MAX_OBJECT_SIZE_DEFAULT) –Optional max size in bytes for any single object stored by the endpoint. If exceeded, an error is raised. 
Source code in proxystore/endpoint/storage.py
                    
async
  
¶
    Get the database connection object.
Source code in proxystore/endpoint/storage.py
              
async
  
¶
evict(key: str) -> None
async
  
¶
    Check if a blob exists in the storage.
Parameters:
- 
            key(str) –Key associated with the blob to check. 
Returns:
- 
              bool–If a blob associated with the key exists. 
Source code in proxystore/endpoint/storage.py
              
async
  
¶
    Get a blob from storage.
Parameters:
- 
            key(str) –Key associated with the blob to get. 
- 
            default(bytes | None, default:None) –Default return value if the blob does not exist. 
Returns:
- 
              bytes | None–The blob associated with the key or the value of default.
Source code in proxystore/endpoint/storage.py
              
async
  
¶
    Store the blob associated with a key.
Parameters:
Raises:
- 
              ObjectSizeExceededError–If the max object size is configured and the data exceeds that size.