class documentation

class HTTPLFSClient(LFSClient):

Constructor: HTTPLFSClient(url, config)

View In Hierarchy

LFS client for HTTP/HTTPS operations.

Method __init__ Initialize HTTP LFS client.
Method batch Perform batch operation to get transfer URLs.
Method download Download an LFS object.
Method upload Upload an LFS object.
Method _get_pool_manager Get urllib3 pool manager with git config applied.
Method _make_request Make an HTTP request to the LFS server.
Method _parse_batch_response Parse JSON response into LFSBatchResponse dataclass.
Instance Variable _pool_manager Undocumented

Inherited from LFSClient:

Class Method from_config Create LFS client from git config.
Class Method from_url Create appropriate LFS client based on URL scheme.
Instance Variable config Undocumented
Property url Get the LFS server URL without trailing slash.
Instance Variable _base_url Undocumented
def __init__(self, url: str, config: Config | None = None):

Initialize HTTP LFS client.

Parameters
url:strLFS server URL (http:// or https://)
config:Config | NoneOptional git config for authentication/proxy settings
def batch(self, operation: str, objects: list[dict[str, str | int]], ref: str | None = None) -> LFSBatchResponse:

Perform batch operation to get transfer URLs.

Parameters
operation:str"download" or "upload"
objects:list[dict[str, str | int]]List of {"oid": str, "size": int} dicts
ref:str | NoneOptional ref name
Returns
LFSBatchResponseBatch response from server
def download(self, oid: str, size: int, ref: str | None = None) -> bytes:

Download an LFS object.

Parameters
oid:strObject ID (SHA256)
size:intExpected size
ref:str | NoneOptional ref name
Returns
bytesObject content
def upload(self, oid: str, size: int, content: bytes, ref: str | None = None):

Upload an LFS object.

Parameters
oid:strObject ID (SHA256)
size:intObject size
content:bytesObject content
ref:str | NoneOptional ref name
def _get_pool_manager(self) -> urllib3.PoolManager | urllib3.ProxyManager | AuthCallbackPoolManager:

Get urllib3 pool manager with git config applied.

def _make_request(self, method: str, path: str, data: bytes | None = None, headers: dict[str, str] | None = None) -> bytes:

Make an HTTP request to the LFS server.

def _parse_batch_response(self, data: Mapping[str, Any]) -> LFSBatchResponse:

Parse JSON response into LFSBatchResponse dataclass.

_pool_manager: urllib3.PoolManager | urllib3.ProxyManager | AuthCallbackPoolManager | None =

Undocumented