We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f0eb1a9 + bad2e4f commit 651a5d6Copy full SHA for 651a5d6
tests/smoke.py
@@ -13,11 +13,13 @@
13
from wherobots.db import connect, connect_direct
14
from wherobots.db.constants import DEFAULT_ENDPOINT
15
from wherobots.db.connection import Connection
16
+from wherobots.db.region import Region
17
18
if __name__ == "__main__":
19
parser = argparse.ArgumentParser()
20
parser.add_argument("--api-key-file", help="File containing the API key")
21
parser.add_argument("--token-file", help="File containing the token")
22
+ parser.add_argument("--region", help="Region to connect to (ie. aws-us-west-2)")
23
parser.add_argument(
24
"--debug",
25
help="Enable debug logging",
@@ -73,9 +75,10 @@
73
75
api_key=api_key,
74
76
shutdown_after_inactive_seconds=args.shutdown_after_inactive_seconds,
77
wait_timeout=900,
78
+ region=Region(args.region) if args.region else Region.AWS_US_WEST_2,
79
)
80
- def render(results: pandas.DataFrame):
81
+ def render(results: pandas.DataFrame) -> None:
82
table = Table()
83
table.add_column("#")
84
for column in results.columns:
wherobots/db/driver.py
@@ -56,10 +56,10 @@ def gen_user_agent_header():
56
57
def connect(
58
host: str = DEFAULT_ENDPOINT,
59
- token: str = None,
60
- api_key: str = None,
61
- runtime: Runtime = None,
62
- region: Region = None,
+ token: Union[str, None] = None,
+ api_key: Union[str, None] = None,
+ runtime: Union[Runtime, None] = None,
+ region: Union[Region, None] = None,
63
wait_timeout: float = DEFAULT_SESSION_WAIT_TIMEOUT_SECONDS,
64
read_timeout: float = DEFAULT_READ_TIMEOUT_SECONDS,
65
reuse_session: bool = DEFAULT_REUSE_SESSION,
@@ -163,7 +163,7 @@ def http_to_ws(uri: str) -> str:
163
def connect_direct(
164
uri: str,
165
protocol: Version = PROTOCOL_VERSION,
166
- headers: Dict[str, str] = None,
+ headers: Union[Dict[str, str], None] = None,
167
168
results_format: Union[ResultsFormat, None] = None,
169
data_compression: Union[DataCompression, None] = None,
wherobots/db/region.py
@@ -3,3 +3,4 @@
3
4
class Region(Enum):
5
AWS_US_WEST_2 = "aws-us-west-2"
6
+ AWS_EU_EAST_1 = "aws-eu-west-1"
0 commit comments