Skip to content

Commit 2b7c2c8

Browse files
committed
Merge branch 'main' into 56-update-code-to-match-new-api-spec
2 parents 8232649 + 13a5841 commit 2b7c2c8

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

meorg_client/client.py

+16
Original file line numberDiff line numberDiff line change
@@ -482,3 +482,19 @@ def success(self) -> bool:
482482
True if successful, False otherwise.
483483
"""
484484
return self.last_response.status_code in mcc.HTTP_STATUS_SUCCESS_RANGE
485+
486+
def is_initialised(self, dev: bool = False) -> bool:
487+
"""Check if the client is initialised.
488+
NOTE: This does not check the login actually works.
489+
Parameters
490+
----------
491+
dev : bool, optional
492+
Use dev credentials, by default False
493+
Returns
494+
-------
495+
bool
496+
True if initialised, False otherwise.
497+
"""
498+
cred_filename = "credentials.json" if not dev else "credentials-dev.json"
499+
cred_filepath = mu.get_user_data_filepath(cred_filename)
500+
return cred_filepath.exists()

pyproject.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ license = {file="LICENSE"}
1818
dynamic = ["version"]
1919

2020
# Dependencies
21-
requires-python = ">=3.11"
21+
requires-python = ">=3.9"
2222
dependencies = [
2323
"requests>=2.31.0",
2424
"requests-mock>=1.11.0",
2525
"PyYAML>=6.0.1",
2626
"click>=8.1.7",
27-
"pandas>=2.2.2"
27+
"pandas>=2.2.2",
28+
"tqdm>=4.66.5"
2829
]
2930

3031
authors = [

0 commit comments

Comments
 (0)