fmconsult-utils-python-sdk 2.0.1__tar.gz → 2.0.2__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.
Files changed (48) hide show
  1. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/PKG-INFO +1 -1
  2. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/pyproject.toml +1 -1
  3. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/http/api.py +30 -29
  4. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult_utils_python_sdk.egg-info/PKG-INFO +1 -1
  5. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/LICENSE +0 -0
  6. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/README.md +0 -0
  7. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/setup.cfg +0 -0
  8. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/__init__.py +0 -0
  9. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/__init__.py +0 -0
  10. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/auth/__init__.py +0 -0
  11. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/auth/decorator.py +0 -0
  12. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/auth/profile_builder.py +0 -0
  13. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/auth/token_manager.py +0 -0
  14. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/database/__init__.py +0 -0
  15. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/database/connection.py +0 -0
  16. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/database/models/__init__.py +0 -0
  17. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/database/models/application.py +0 -0
  18. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/database/models/base.py +0 -0
  19. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/database/models/city.py +0 -0
  20. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/database/models/country.py +0 -0
  21. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/database/models/state.py +0 -0
  22. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/decorators/__init__.py +0 -0
  23. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/decorators/auth.py +0 -0
  24. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/exceptions/__init__.py +0 -0
  25. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/exceptions/authorization.py +0 -0
  26. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/exceptions/bad_request_exception.py +0 -0
  27. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/exceptions/conflict_exception.py +0 -0
  28. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/exceptions/forbidden_exception.py +0 -0
  29. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/exceptions/not_found_exception.py +0 -0
  30. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/exceptions/not_implemented_exception.py +0 -0
  31. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/exceptions/unauthorized_exception.py +0 -0
  32. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/exceptions/unavailable_exception.py +0 -0
  33. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/http/__init__.py +0 -0
  34. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/utils/__init__.py +0 -0
  35. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/utils/cast.py +0 -0
  36. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/utils/cnpj.py +0 -0
  37. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/utils/configs.py +0 -0
  38. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/utils/cpf.py +0 -0
  39. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/utils/date.py +0 -0
  40. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/utils/enum.py +0 -0
  41. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/utils/haversine.py +0 -0
  42. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/utils/object.py +0 -0
  43. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/utils/pagination.py +0 -0
  44. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/utils/string.py +0 -0
  45. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult/utils/url.py +0 -0
  46. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult_utils_python_sdk.egg-info/SOURCES.txt +0 -0
  47. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult_utils_python_sdk.egg-info/dependency_links.txt +0 -0
  48. {fmconsult_utils_python_sdk-2.0.1 → fmconsult_utils_python_sdk-2.0.2}/src/fmconsult_utils_python_sdk.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmconsult-utils-python-sdk
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: Canivete suiço da FMConsult
5
5
  Author-email: Filipe Coelho <filipe@fmconsult.com.br>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "fmconsult-utils-python-sdk"
7
- version = "2.0.1"
7
+ version = "2.0.2"
8
8
  description = "Canivete suiço da FMConsult"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -15,13 +15,13 @@ class ContentType(Enum):
15
15
 
16
16
  class ApiBase(object):
17
17
  def __init__(self, additional_headers=None):
18
- self.logging_level = None
19
- try:
20
- self.cph = ConfigPropertiesHelper()
21
- self.logging_level = self.cph.get_property_value('SELF', 'self.logging.level')
22
- except:
23
- logging.warning('Logging level not found in config file')
24
- pass
18
+ # self.logging_level = None
19
+ # try:
20
+ # self.cph = ConfigPropertiesHelper()
21
+ # self.logging_level = self.cph.get_property_value('SELF', 'self.logging.level')
22
+ # except:
23
+ # logging.warning('Logging level not found in config file')
24
+ # pass
25
25
 
26
26
  self.headers = {
27
27
  'x-api-token': self.api_token
@@ -49,29 +49,30 @@ class ApiBase(object):
49
49
 
50
50
  def call_request(self, http_method:HTTPMethod, request_url, params=None, payload=None, content_type:ContentType=ContentType.APPLICATION_JSON):
51
51
  try:
52
- logging.info(f'{str(http_method).upper()} url:')
53
- logging.info(request_url)
52
+ # if not(self.logging_level is None) and self.logging_level == 'DEBUG':
53
+ # logging.info(f'{str(http_method).upper()} url:')
54
+ # logging.info(request_url)
54
55
 
55
56
  self.headers['Content-Type'] = content_type.value
56
57
 
57
- if not(self.logging_level is None) and self.logging_level == 'DEBUG':
58
- logging.info(f'{str(http_method).upper()} headers:')
59
- logging.info(jsonpickle.encode(self.headers))
58
+ # if not(self.logging_level is None) and self.logging_level == 'DEBUG':
59
+ # logging.info(f'{str(http_method).upper()} headers:')
60
+ # logging.info(jsonpickle.encode(self.headers))
60
61
 
61
62
  # Verifica se há parâmetros a serem enviados na URL
62
- if not params is None:
63
- if not(self.logging_level is None) and self.logging_level == 'DEBUG':
64
- logging.info(f'{str(http_method).upper()} params:')
65
- logging.info(jsonpickle.encode(params))
63
+ # if not params is None:
64
+ # if not(self.logging_level is None) and self.logging_level == 'DEBUG':
65
+ # logging.info(f'{str(http_method).upper()} params:')
66
+ # logging.info(jsonpickle.encode(params))
66
67
 
67
68
  # Log do payload (apenas se for POST ou PUT)
68
- if not payload is None:
69
- if not(self.logging_level is None) and self.logging_level == 'DEBUG':
70
- logging.info(f'{str(http_method).upper()} payload:')
71
- if content_type == ContentType.APPLICATION_JSON:
72
- logging.info(jsonpickle.encode(payload))
73
- else:
74
- logging.info(payload)
69
+ # if not payload is None:
70
+ # if not(self.logging_level is None) and self.logging_level == 'DEBUG':
71
+ # logging.info(f'{str(http_method).upper()} payload:')
72
+ # if content_type == ContentType.APPLICATION_JSON:
73
+ # logging.info(jsonpickle.encode(payload))
74
+ # else:
75
+ # logging.info(payload)
75
76
 
76
77
  # Configuração dos parâmetros para requisição
77
78
  req_args = {
@@ -89,9 +90,9 @@ class ApiBase(object):
89
90
  else:
90
91
  req_args['data'] = payload
91
92
 
92
- if not(self.logging_level is None) and self.logging_level == 'DEBUG':
93
- logging.info(f'request args:')
94
- logging.info(req_args)
93
+ # if not(self.logging_level is None) and self.logging_level == 'DEBUG':
94
+ # logging.info(f'request args:')
95
+ # logging.info(req_args)
95
96
 
96
97
  res = self.__make_request(req_args)
97
98
 
@@ -110,9 +111,9 @@ class ApiBase(object):
110
111
 
111
112
  res = res.content.decode('utf-8')
112
113
 
113
- if not(self.logging_level is None) and self.logging_level == 'DEBUG':
114
- logging.info(f'{str(http_method).upper()} response:')
115
- logging.info(jsonpickle.encode(res))
114
+ # if not(self.logging_level is None) and self.logging_level == 'DEBUG':
115
+ # logging.info(f'{str(http_method).upper()} response:')
116
+ # logging.info(jsonpickle.encode(res))
116
117
 
117
118
  return res
118
119
  except UnavailableException as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmconsult-utils-python-sdk
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: Canivete suiço da FMConsult
5
5
  Author-email: Filipe Coelho <filipe@fmconsult.com.br>
6
6
  License: MIT License