Skip to content

Commit 4580c38

Browse files
authored
adds base url override to config (#67)
1 parent 2b85bef commit 4580c38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

method/configuration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
class ConfigurationOpts(TypedDict):
1919
api_key: str
2020
env: Optional[EnvironmentLiterals]
21+
base_url: Optional[str]
2122

2223

2324
class Configuration:
@@ -26,7 +27,7 @@ class Configuration:
2627
env: EnvironmentLiterals
2728

2829
def __init__(self, opts: ConfigurationOpts):
29-
url = 'https://{env}.methodfi.com'
30+
url = opts.get('base_url', 'https://{env}.methodfi.com')
3031

3132
self.__validate(opts)
3233
self.api_key = opts.get('api_key', '')

0 commit comments

Comments
 (0)