brynq-sdk-allsolutions 1.0.3__tar.gz → 2.0.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq_sdk_allsolutions
3
- Version: 1.0.3
3
+ Version: 2.0.0
4
4
  Summary: All solutions wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -1,6 +1,7 @@
1
1
  import hashlib
2
2
  import json
3
- from typing import Callable, Tuple, Any, Union, List
3
+ import os
4
+ from typing import Callable, Tuple, Any, Union, List, Literal, Optional
4
5
  import requests
5
6
  import pandas as pd
6
7
 
@@ -8,12 +9,14 @@ from brynq_sdk_brynq import BrynQ
8
9
 
9
10
 
10
11
  class AllSolutions(BrynQ):
11
- def __init__(self, interface_id: int, debug: bool = False):
12
+ def __init__(self, system_type: Optional[Literal['source', 'target']] = None, debug: bool = False):
12
13
  super().__init__()
14
+ self.timeout = 3600
13
15
  self.token = None
14
16
  self.refresh_token = None
15
17
  self.debug = debug
16
- credentials = self.interfaces.credentials.get(interface_id=interface_id, system='all-solutions', system_type=None)
18
+ self.data_interface_id = os.getenv("DATA_INTERFACE_ID")
19
+ credentials = self.interfaces.credentials.get(system='all-solutions', system_type=system_type)
17
20
  self.url = credentials['data']['url']
18
21
  self.client_id = credentials['data']['client_id']
19
22
  self.secret_id = credentials['data']['secret_id']
@@ -21,7 +24,6 @@ class AllSolutions(BrynQ):
21
24
  self.password = credentials['data']['password']
22
25
  self.content_type_header = {'Content-Type': 'application/json'}
23
26
  self.filter_freeform_string = "$filter-freeform"
24
- self.timeout = 3600
25
27
 
26
28
  # authentication functions
27
29
  def _get_refreshtoken(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq-sdk-allsolutions
3
- Version: 1.0.3
3
+ Version: 2.0.0
4
4
  Summary: All solutions wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -0,0 +1,2 @@
1
+ brynq-sdk-brynq<5,>=4
2
+ pandas<3.0.0,>=2.2.0
@@ -2,7 +2,7 @@ from setuptools import setup, find_namespace_packages
2
2
 
3
3
  setup(
4
4
  name='brynq_sdk_allsolutions',
5
- version='1.0.3',
5
+ version='2.0.0',
6
6
  description='All solutions wrapper from BrynQ',
7
7
  long_description='All solutions wrapper from BrynQ',
8
8
  author='BrynQ',
@@ -10,7 +10,7 @@ setup(
10
10
  packages=find_namespace_packages(include=['brynq_sdk*']),
11
11
  license='BrynQ License',
12
12
  install_requires=[
13
- 'brynq-sdk-brynq>=2',
13
+ 'brynq-sdk-brynq>=4,<5',
14
14
  'pandas>=2.2.0,<3.0.0',
15
15
  ],
16
16
  zip_safe=False,
@@ -1,2 +0,0 @@
1
- brynq-sdk-brynq>=2
2
- pandas<3.0.0,>=2.2.0