collibra-connector 1.0.4__tar.gz → 1.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {collibra_connector-1.0.4 → collibra_connector-1.0.6}/PKG-INFO +1 -1
- collibra_connector-1.0.6/collibra_connector/__init__.py +39 -0
- {collibra_connector-1.0.4 → collibra_connector-1.0.6}/collibra_connector/connector.py +23 -1
- {collibra_connector-1.0.4 → collibra_connector-1.0.6}/collibra_connector.egg-info/PKG-INFO +1 -1
- {collibra_connector-1.0.4 → collibra_connector-1.0.6}/pyproject.toml +1 -1
- collibra_connector-1.0.4/collibra_connector/__init__.py +0 -3
- {collibra_connector-1.0.4 → collibra_connector-1.0.6}/LICENSE +0 -0
- {collibra_connector-1.0.4 → collibra_connector-1.0.6}/README.md +0 -0
- {collibra_connector-1.0.4 → collibra_connector-1.0.6}/collibra_connector.egg-info/SOURCES.txt +0 -0
- {collibra_connector-1.0.4 → collibra_connector-1.0.6}/collibra_connector.egg-info/dependency_links.txt +0 -0
- {collibra_connector-1.0.4 → collibra_connector-1.0.6}/collibra_connector.egg-info/requires.txt +0 -0
- {collibra_connector-1.0.4 → collibra_connector-1.0.6}/collibra_connector.egg-info/top_level.txt +0 -0
- {collibra_connector-1.0.4 → collibra_connector-1.0.6}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: collibra-connector
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: A standard Python connector for the Collibra Data Governance Center API.
|
|
5
5
|
Author-email: Raül Dalgamonni <rauldalgamonnialonso@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/rauldaal/collibra-python-connector
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#
|
|
2
|
+
#
|
|
3
|
+
# ███
|
|
4
|
+
# ██ ███ ███
|
|
5
|
+
# ████ ███
|
|
6
|
+
# ███ ████ ██ ███ ████
|
|
7
|
+
# ███ ████ ███ ███ ████
|
|
8
|
+
# ███ ███
|
|
9
|
+
# ███ ███
|
|
10
|
+
# ██████████████ ███ ███ ████████
|
|
11
|
+
# ███████████ █ ███ ██████
|
|
12
|
+
#
|
|
13
|
+
# ███ █████████████ ████████████ ███
|
|
14
|
+
# ███ █████████████ ████████████ ███
|
|
15
|
+
#
|
|
16
|
+
# ██████ █ █████████████
|
|
17
|
+
# ███████ ████ ███ ██████████████
|
|
18
|
+
# ████ ███
|
|
19
|
+
# ████ ███
|
|
20
|
+
# ███ ████ ███ ███ ████
|
|
21
|
+
# ██ ████ ██ ███ ██
|
|
22
|
+
# ████ ███
|
|
23
|
+
# ██ ███ ███
|
|
24
|
+
# █
|
|
25
|
+
#
|
|
26
|
+
#
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
Collibra Connector Library
|
|
30
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
31
|
+
|
|
32
|
+
Uses the Collibra API to connect and interact with Collibra's data governance platform.
|
|
33
|
+
This library provides a simple interface to handle connection and URLs
|
|
34
|
+
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
from .connector import CollibraConnector
|
|
38
|
+
|
|
39
|
+
__version__ = "0.1.0"
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import requests
|
|
1
3
|
from requests.auth import HTTPBasicAuth
|
|
2
4
|
|
|
5
|
+
from .api import Asset
|
|
3
6
|
|
|
4
7
|
class CollibraConnector():
|
|
5
8
|
"""
|
|
@@ -8,7 +11,7 @@ class CollibraConnector():
|
|
|
8
11
|
The authentication is done using HTTP Basic Auth.
|
|
9
12
|
"""
|
|
10
13
|
|
|
11
|
-
def __init__(self, api: str, username: str, password: str):
|
|
14
|
+
def __init__(self, api: str, username: str, password: str, timeout: int = 30):
|
|
12
15
|
"""
|
|
13
16
|
Initializes the CollibraConnector with API URL and authentication credentials.
|
|
14
17
|
:param api: The API URL for Collibra.
|
|
@@ -18,10 +21,29 @@ class CollibraConnector():
|
|
|
18
21
|
self.__auth = HTTPBasicAuth(username, password)
|
|
19
22
|
self.__api = api + "/rest/2.0"
|
|
20
23
|
self.__base_url = api
|
|
24
|
+
self.__timeout = timeout
|
|
25
|
+
|
|
26
|
+
self.asset = Asset(self)
|
|
27
|
+
|
|
28
|
+
logging.basicConfig(level=logging.INFO)
|
|
29
|
+
self.logger = logging.getLogger(__name__)
|
|
21
30
|
|
|
22
31
|
def __repr__(self):
|
|
23
32
|
return f"CollibraConnector(api={self.__api}, auth={self.__auth})"
|
|
24
33
|
|
|
34
|
+
def test_connection(self):
|
|
35
|
+
"""Test the connection to Collibra API"""
|
|
36
|
+
try:
|
|
37
|
+
response = requests.get(
|
|
38
|
+
f"{self.__api}/info",
|
|
39
|
+
auth=self.__auth,
|
|
40
|
+
timeout=self.__timeout
|
|
41
|
+
)
|
|
42
|
+
return response.status_code == 200
|
|
43
|
+
except Exception as e:
|
|
44
|
+
self.logger.error(f"Connection test failed: {e}")
|
|
45
|
+
return False
|
|
46
|
+
|
|
25
47
|
@property
|
|
26
48
|
def api(self):
|
|
27
49
|
return self.__api
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: collibra-connector
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: A standard Python connector for the Collibra Data Governance Center API.
|
|
5
5
|
Author-email: Raül Dalgamonni <rauldalgamonnialonso@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/rauldaal/collibra-python-connector
|
|
File without changes
|
|
File without changes
|
{collibra_connector-1.0.4 → collibra_connector-1.0.6}/collibra_connector.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{collibra_connector-1.0.4 → collibra_connector-1.0.6}/collibra_connector.egg-info/requires.txt
RENAMED
|
File without changes
|
{collibra_connector-1.0.4 → collibra_connector-1.0.6}/collibra_connector.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|