Skip to content

Commit b402617

Browse files
committed
MOD: Remove 'nearest' gateway option
1 parent 5a15eb6 commit b402617

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

databento/common/enums.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
class HistoricalGateway(Enum):
66
"""Represents a historical data center gateway location."""
77

8-
NEAREST = "nearest"
98
BO1 = "bo1"
109

1110

@@ -14,7 +13,6 @@ class LiveGateway(Enum):
1413
"""Represents a live data center gateway location."""
1514

1615
ORIGIN = "origin"
17-
NEAREST = "nearest"
1816
NY4 = "ny4"
1917
DC3 = "dc3"
2018

databento/historical/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Historical:
2020
key : str, optional
2121
The user API key for authentication.
2222
If ``None`` then the `DATABENTO_API_KEY` environment variable is used.
23-
gateway : HistoricalGateway or str, default HistoricalGateway.NEAREST
23+
gateway : HistoricalGateway or str, default HistoricalGateway.BO1
2424
The API server gateway.
2525
If ``None`` then the default gateway is used.
2626
@@ -33,7 +33,7 @@ class Historical:
3333
def __init__(
3434
self,
3535
key: Optional[str] = None,
36-
gateway: Union[HistoricalGateway, str] = HistoricalGateway.NEAREST,
36+
gateway: Union[HistoricalGateway, str] = HistoricalGateway.BO1,
3737
):
3838
if key is None:
3939
key = os.environ.get("DATABENTO_API_KEY")
@@ -42,7 +42,7 @@ def __init__(
4242

4343
# Configure data access gateway
4444
gateway = enum_or_str_lowercase(gateway, "gateway")
45-
if gateway in ("nearest", "bo1"):
45+
if gateway == "bo1":
4646
gateway = "https://hist.databento.com"
4747

4848
self._key = key

tests/test_historical_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ def test_default_host_returns_expected(self) -> None:
3232
"gateway, expected",
3333
[
3434
[HistoricalGateway.BO1, "https://hist.databento.com"],
35-
[HistoricalGateway.NEAREST, "https://hist.databento.com"],
3635
["bo1", "https://hist.databento.com"],
37-
["nearest", "https://hist.databento.com"],
3836
],
3937
)
4038
def test_gateway_nearest_and_bo1_map_to_hist_databento(

0 commit comments

Comments
 (0)