brynq-sdk-zermelo 2.1.1__tar.gz → 3.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_zermelo
3
- Version: 2.1.1
3
+ Version: 3.0.0
4
4
  Summary: Zermelo wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -1,7 +1,7 @@
1
1
  from brynq_sdk_brynq import BrynQ
2
2
  from pandas import json_normalize
3
3
  from time import mktime
4
- from typing import List, Union
4
+ from typing import List, Union, Literal, Optional
5
5
  import requests
6
6
  import pandas as pd
7
7
  import numpy as np
@@ -12,7 +12,7 @@ import sys
12
12
 
13
13
 
14
14
  class Zermelo(BrynQ):
15
- def __init__(self, label: Union[str, List], storage_location, initial_zermelo_extract=False, extract_cancelled_appointments=True, debug=False):
15
+ def __init__(self, storage_location, system_type: Optional[Literal['source', 'target']] = None, initial_zermelo_extract=False, extract_cancelled_appointments=True, debug=False):
16
16
  """
17
17
  Extracts data from source based on the entered parameters
18
18
  For documentation see: https://wartburg.zportal.nl/static/swagger/ & https://zermelo.atlassian.net/wiki/display/DEV/API+Entities
@@ -21,7 +21,8 @@ class Zermelo(BrynQ):
21
21
  :param extract_cancelled_appointments: doesn't get the cancelled appointments by default. Can be changed to an empty string to get the cancelled appointments
22
22
  """
23
23
  super().__init__()
24
- credentials = self.get_system_credential(system='zermelo', label=label)
24
+ credentials = self.interfaces.credentials.get(system="zermelo", system_type=system_type)
25
+ credentials = credentials.get('data')
25
26
  self.access_token = credentials['token']
26
27
  self.url = f"https://{credentials['customer']}.zportal.nl/api/v3/"
27
28
  self.storage_location = storage_location
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq-sdk-zermelo
3
- Version: 2.1.1
3
+ Version: 3.0.0
4
4
  Summary: Zermelo wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -1,3 +1,3 @@
1
- brynq-sdk-brynq>=2
1
+ brynq-sdk-brynq<5,>=4
2
2
  pandas<3,>=1
3
3
  requests<=3,>=2
@@ -2,7 +2,7 @@ from setuptools import setup, find_namespace_packages
2
2
 
3
3
  setup(
4
4
  name='brynq_sdk_zermelo',
5
- version='2.1.1',
5
+ version='3.0.0',
6
6
  description='Zermelo wrapper from BrynQ',
7
7
  long_description='Zermelo 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>=1,<3',
15
15
  'requests>=2,<=3'
16
16
  ],