Skip to content

Commit e39868d

Browse files
committed
Rename host to base_url in AtlanClient
1 parent 889bfcd commit e39868d

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

pyatlan/HISTORY.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## 0.0.19 (Mar 30, 2023)
2+
3+
* Renamed environment variable used to specify the Atlan URL from ATLAN_HOST to ATLAN_BASE_URL
4+
* Renamed initialization parameter in pyatlan.client.atlan.AtlanClient from host to base_url
5+
6+
## 0.0.18 (Mar 27, 2023)
7+
8+
* Added workflow to run code scan with [CodeQl](https://codeql.github.com/)
9+
* Added workflow to upload to [pypi](https://pypi.org) on release
10+
11+
## 0.0.17 (Mar 22, 2023)
12+
13+
* Initial public release

pyatlan/client/atlan.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def get_session():
113113

114114
class AtlanClient(BaseSettings):
115115
_default_client: "ClassVar[Optional[AtlanClient]]" = None
116-
host: HttpUrl
116+
base_url: HttpUrl
117117
api_key: str
118118
_session: requests.Session = PrivateAttr(default_factory=get_session)
119119
_request_params: dict = PrivateAttr()
@@ -238,7 +238,7 @@ def _create_params(
238238
self, api, query_params, request_obj, exclude_unset: bool = True
239239
):
240240
params = copy.deepcopy(self._request_params)
241-
path = os.path.join(self.host, api.path)
241+
path = os.path.join(self.base_url, api.path)
242242
params["headers"]["Accept"] = api.consumes
243243
params["headers"]["content-type"] = api.produces
244244
if query_params is not None:

pyatlan/version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.18
1+
0.0.19

tests/integration/test_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ def test_register_client_with_bad_parameter_raises_valueerror():
1010

1111

1212
def test_register_client():
13-
client = AtlanClient(host="http://mark.atlan.com", api_key="123")
13+
client = AtlanClient(base_url="http://mark.atlan.com", api_key="123")
1414
AtlanClient.register_client(client)
1515
assert AtlanClient.get_default_client() == client

0 commit comments

Comments
 (0)