api-to-dataframe 1.2.0__tar.gz → 1.2.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: api-to-dataframe
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: A package to convert API responses to pandas dataframe
5
5
  Home-page: https://github.com/IvanildoBarauna/api-to-dataframe
6
6
  License: MIT
@@ -98,7 +98,7 @@ client = ClientBuilder(endpoint="https://api.example.com"
98
98
  ,connection_timeout=10
99
99
  ,headers=headers
100
100
  ,retries=5
101
- ,delay=10)
101
+ ,initial_delay=10)
102
102
 
103
103
 
104
104
  ### timeout, retry_strategy and headers are opcionals parameters
@@ -73,7 +73,7 @@ client = ClientBuilder(endpoint="https://api.example.com"
73
73
  ,connection_timeout=10
74
74
  ,headers=headers
75
75
  ,retries=5
76
- ,delay=10)
76
+ ,initial_delay=10)
77
77
 
78
78
 
79
79
  ### timeout, retry_strategy and headers are opcionals parameters
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "api-to-dataframe"
3
- version = "1.2.0"
3
+ version = "1.2.2"
4
4
  description = "A package to convert API responses to pandas dataframe"
5
5
  authors = ["IvanildoBarauna <ivanildo.jnr@outlook.com>"]
6
6
  readme = "README.md"
@@ -1,5 +1,4 @@
1
- from api_to_dataframe.models.retainer import RetryStrategies
2
- from api_to_dataframe.models.retainer import Strategies
1
+ from api_to_dataframe.models.retainer import RetryStrategies, Strategies
3
2
  from api_to_dataframe.models.get_data import GetData
4
3
 
5
4
 
@@ -9,7 +8,7 @@ class ClientBuilder:
9
8
  headers: dict = None,
10
9
  retry_strategy: Strategies = Strategies.NoRetryStrategy,
11
10
  retries: int = 3,
12
- delay: int = 1,
11
+ initial_delay: int = 1,
13
12
  connection_timeout: int = 1):
14
13
 
15
14
  """
@@ -36,7 +35,7 @@ class ClientBuilder:
36
35
  raise ValueError("::: endpoint param is mandatory :::")
37
36
  if not isinstance(retries, int) or retries < 0:
38
37
  raise ValueError("retries must be a non-negative integer")
39
- if not isinstance(delay, int) or delay < 0:
38
+ if not isinstance(initial_delay, int) or initial_delay < 0:
40
39
  raise ValueError("delay must be a non-negative integer")
41
40
  if not isinstance(connection_timeout, int) or connection_timeout < 0:
42
41
  raise ValueError("connection_timeout must be a non-negative integer")
@@ -46,7 +45,7 @@ class ClientBuilder:
46
45
  self.connection_timeout = connection_timeout
47
46
  self.headers = headers
48
47
  self.retries = retries
49
- self.delay = delay
48
+ self.delay = initial_delay
50
49
 
51
50
  @RetryStrategies
52
51
  def get_api_data(self):