Skip to main content

Table of Contents

Module spoon_ai.neofs.client

NeoFSClient Objects​

class NeoFSClient()

set_container_eacl​

def set_container_eacl(container_id: str,
eacl: Eacl,
*,
bearer_token: Optional[str] = None,
wallet_connect: bool = True) -> SuccessResponse

Set container eACL.

Arguments:

  • container_id - Container ID
  • eacl - eACL object
  • bearer_token - Optional Bearer Token (recommended for eACL operations)
  • wallet_connect - Whether to use wallet_connect mode (default True)

download_object_by_id​

def download_object_by_id(container_id: str,
object_id: str,
*,
bearer_token: Optional[str] = None,
download: bool | None = None,
range_header: str | None = None) -> httpx.Response

Download object by ID. Bearer token is optional for public containers.

get_object_header_by_id​

def get_object_header_by_id(container_id: str,
object_id: str,
*,
bearer_token: Optional[str] = None,
range_header: str | None = None) -> httpx.Response

Get object header by ID. Bearer token is optional for public containers.

download_object_by_attribute​

def download_object_by_attribute(
container_id: str,
attr_key: str,
attr_val: str,
*,
bearer_token: Optional[str] = None,
download: bool | None = None,
range_header: str | None = None) -> httpx.Response

Download object by attribute. Bearer token is optional for public containers.

get_object_header_by_attribute​

def get_object_header_by_attribute(
container_id: str,
attr_key: str,
attr_val: str,
*,
bearer_token: Optional[str] = None,
range_header: str | None = None) -> httpx.Response

Get object header by attribute. Bearer token is optional for public containers.

delete_object​

def delete_object(container_id: str,
object_id: str,
*,
bearer_token: Optional[str] = None) -> SuccessResponse

Delete object. Bearer token is optional for public containers, required for eACL containers with DENY DELETE rule.

search_objects​

def search_objects(container_id: str,
search_request: SearchRequest,
*,
bearer_token: Optional[str] = None,
cursor: str = "",
limit: int = 100) -> ObjectListV2

Search objects. Bearer token is optional for public containers.

NeoFSException Objects​

class NeoFSException(Exception)

Base exception for the NeoFS client.

NeoFSAPIException Objects​

class NeoFSAPIException(NeoFSException)

Raised when the API returns an error.