squarecloud-api 3.5.0__tar.gz → 3.5.1__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 (22) hide show
  1. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/PKG-INFO +2 -3
  2. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/pyproject.toml +3 -10
  3. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/__init__.py +3 -1
  4. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/app.py +1 -1
  5. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/cli/app.py +3 -6
  6. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/client.py +9 -4
  7. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/http/http_client.py +1 -1
  8. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/listeners/capture_listener.py +1 -1
  9. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/LICENSE +0 -0
  10. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/README.md +0 -0
  11. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/cli/__init__.py +0 -0
  12. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/cli/files.py +0 -0
  13. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/cli/main.py +0 -0
  14. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/data.py +0 -0
  15. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/errors.py +0 -0
  16. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/file.py +0 -0
  17. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/http/__init__.py +0 -0
  18. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/http/endpoints.py +0 -0
  19. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/listeners/__init__.py +0 -0
  20. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/listeners/request_listener.py +0 -0
  21. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/logging.py +0 -0
  22. {squarecloud_api-3.5.0 → squarecloud_api-3.5.1}/squarecloud/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: squarecloud-api
3
- Version: 3.5.0
3
+ Version: 3.5.1
4
4
  Summary: SquareCloud API wrapper
5
5
  Home-page: https://github.com/squarecloudofc/wrapper-api-py
6
6
  License: MIT
@@ -13,10 +13,9 @@ Classifier: Programming Language :: Python :: 3.9
13
13
  Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Programming Language :: Python :: 3.12
16
- Requires-Dist: aiohttp (==3.9.3)
16
+ Requires-Dist: aiohttp (==3.9.5)
17
17
  Requires-Dist: click (>=8.1.6,<9.0.0)
18
18
  Requires-Dist: pydantic (>=2.5.2,<3.0.0)
19
- Requires-Dist: pypi (>=2.1,<3.0)
20
19
  Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
21
20
  Requires-Dist: rich (>=13.5.2,<14.0.0)
22
21
  Project-URL: Documentation, https://docs.squarecloud.app/sdks/py
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = 'squarecloud-api'
3
- version = '3.5.0'
3
+ version = '3.5.1'
4
4
  description = 'SquareCloud API wrapper'
5
5
  authors = ['Robert Nogueira <robertlucasnogueira@gmail.com>']
6
6
  repository = 'https://github.com/squarecloudofc/wrapper-api-py'
@@ -11,31 +11,24 @@ packages = [{ include = 'squarecloud' }]
11
11
 
12
12
  [tool.poetry.dependencies]
13
13
  python = '^3.9'
14
- aiohttp = '3.9.3'
14
+ aiohttp = "3.9.5"
15
15
  click = '^8.1.6'
16
16
  rich = '^13.5.2'
17
17
  pydantic = '^2.5.2'
18
18
  python-dotenv = '^1.0.0'
19
- pypi = "^2.1"
20
19
 
21
20
  [tool.poetry.group.dev.dependencies]
22
21
  pytest = '^7.4.3'
23
22
  pytest-cov = '^4.1.0'
24
23
  blue = '^0.9.1'
25
24
  isort = '^5.12.0'
26
- taskipy = '^1.12.0'
27
25
  pytest-asyncio = '^0.21.1'
28
26
  pre-commit = '^3.3.3'
29
27
  ruff = '^0.0.289'
30
28
  memory-profiler = '^0.61.0'
31
29
  requests = '^2.31.0'
32
30
  pytest-rerunfailures = "^13.0"
33
-
34
-
35
- [[tool.poetry.source]]
36
- name = 'pypi-test'
37
- url = 'https://test.pypi.org/simple/'
38
- priority = 'primary'
31
+ taskipy = "^1.13.0"
39
32
 
40
33
  [build-system]
41
34
  requires = ['poetry-core']
@@ -6,6 +6,8 @@ from .client import Client
6
6
  from .data import (
7
7
  AppData,
8
8
  BackupData,
9
+ DeployData,
10
+ DomainAnalytics,
9
11
  FileInfo,
10
12
  LogsData,
11
13
  PlanData,
@@ -16,4 +18,4 @@ from .data import (
16
18
  from .file import File
17
19
  from .http.endpoints import Endpoint
18
20
 
19
- __version__ = '3.5.0'
21
+ __version__ = '3.5.1'
@@ -223,7 +223,7 @@ class Application(CaptureListenerManager):
223
223
  :return: The class name, tag and id of the element
224
224
  :rtype: str
225
225
  """
226
- return f'<{self.__class__.__name__} tag={self.tag} id={self.id}>'
226
+ return f'<{self.__class__.__name__} tag={self.name} id={self.id}>'
227
227
 
228
228
  @property
229
229
  def client(self) -> 'Client':
@@ -52,7 +52,7 @@ async def app_group(ctx: Context, app_id: str, token: str):
52
52
  if not ctx.invoked_subcommand:
53
53
  with Console().status('loading'):
54
54
  app = await client.app(app_id)
55
- table = Table(title=app.tag, header_style='purple')
55
+ table = Table(title=app.name, header_style='purple')
56
56
  table.add_column('Name', justify='center')
57
57
  table.add_column('ID', justify='center')
58
58
  table.add_column('RAM', justify='center')
@@ -61,12 +61,11 @@ async def app_group(ctx: Context, app_id: str, token: str):
61
61
  table.add_column('Cluster', justify='center')
62
62
 
63
63
  table.add_row(
64
- app.tag,
64
+ app.name,
65
65
  app.id,
66
66
  str(app.ram),
67
67
  app.lang,
68
68
  app.desc,
69
- str(app.is_website),
70
69
  app.cluster,
71
70
  style='green',
72
71
  )
@@ -132,16 +131,14 @@ async def app_list(ctx: Context, token: str):
132
131
  table.add_column('RAM', justify='center')
133
132
  table.add_column('Language', justify='center')
134
133
  table.add_column('Description', justify='center')
135
- table.add_column('Is Website', justify='center')
136
134
  table.add_column('Cluster', justify='center')
137
135
  for app in apps:
138
136
  table.add_row(
139
- app.tag,
137
+ app.name,
140
138
  app.id,
141
139
  str(app.ram),
142
140
  app.lang,
143
141
  app.desc,
144
- str(app.is_website),
145
142
  app.cluster,
146
143
  style='green',
147
144
  )
@@ -3,7 +3,7 @@ from __future__ import annotations
3
3
 
4
4
  from functools import wraps
5
5
  from io import BytesIO
6
- from typing import Any, Callable, Literal, TextIO
6
+ from typing import Any, Callable, Literal, ParamSpec, TextIO, TypeVar
7
7
 
8
8
  from typing_extensions import deprecated
9
9
 
@@ -27,6 +27,9 @@ from .listeners import Listener, ListenerConfig
27
27
  from .listeners.request_listener import RequestListenerManager
28
28
  from .logging import logger
29
29
 
30
+ P = ParamSpec('P')
31
+ R = TypeVar('R')
32
+
30
33
 
31
34
  @deprecated(
32
35
  'create_config_file is deprecated, '
@@ -180,10 +183,12 @@ class Client(RequestListenerManager):
180
183
  :return: a callable
181
184
  """
182
185
 
183
- def wrapper(func: Callable):
186
+ def wrapper(func: Callable[P, R]) -> Callable[P, R]:
184
187
  @wraps(func)
185
- async def decorator(self: Client, *args, **kwargs) -> Response:
186
- result: Any
188
+ async def decorator(
189
+ self: Client, *args: P.args, **kwargs: P.kwargs
190
+ ) -> R:
191
+ # result: Any
187
192
  response: Response
188
193
  result = await func(self, *args, **kwargs)
189
194
  response = self._http.last_response
@@ -164,7 +164,7 @@ class HTTPClient:
164
164
  """
165
165
  headers = {
166
166
  'Authorization': self.api_key,
167
- 'User-Agent': 'squarecloud-api/3.5.0',
167
+ 'User-Agent': 'squarecloud-api/3.5.1',
168
168
  }
169
169
  extra_error_kwargs: dict[str, Any] = {}
170
170
 
@@ -145,7 +145,7 @@ class CaptureListenerManager(ListenerManager):
145
145
  logger.error(
146
146
  f'Failed to call listener "{listener.callback.__name__}.\n'
147
147
  f'Error: {exc.__repr__()}.\n'
148
- f'APP-TAG: {listener.app.tag}\n'
148
+ f'APP-TAG: {listener.app.name}\n'
149
149
  f'APP-ID: {listener.app.id}',
150
150
  extra={'type': 'listener'},
151
151
  )
File without changes