-
Notifications
You must be signed in to change notification settings - Fork 203
Expand file tree
/
Copy path_http.pyi
More file actions
61 lines (49 loc) · 1.76 KB
/
Copy path_http.pyi
File metadata and controls
61 lines (49 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: Copyright (c) 2024 Development Seed
from typing import Self
from ._client import ClientConfig
from ._retry import RetryConfig
class HTTPStore:
"""Configure a connection to a generic HTTP server."""
def __new__(
self,
url: str,
*,
client_options: ClientConfig | None = None,
retry_config: RetryConfig | None = None,
) -> Self:
"""Construct a new HTTPStore from a URL.
Any path on the URL will be assigned as the `prefix` for the store. So if you
pass `https://example.com/path/to/directory`, the store will be created with a
prefix of `path/to/directory`, and all further operations will use paths
relative to that prefix.
Args:
url: The base URL to use for the store.
Keyword Args:
client_options: HTTP Client options. Defaults to None.
retry_config: Retry configuration. Defaults to None.
Returns:
HTTPStore
"""
@classmethod
def from_url(
cls,
url: str,
*,
client_options: ClientConfig | None = None,
retry_config: RetryConfig | None = None,
) -> Self:
"""Construct a new HTTPStore from a URL.
This is an alias of [`HTTPStore.__init__`][vortex.store.HTTPStore.__init__].
"""
def __eq__(self, value: object) -> bool: ...
def __getnewargs_ex__(self): ...
@property
def url(self) -> str:
"""Get the base url of this store."""
@property
def client_options(self) -> ClientConfig | None:
"""Get the store's client configuration."""
@property
def retry_config(self) -> RetryConfig | None:
"""Get the store's retry configuration."""