squarecloud-api 3.7.2__py3-none-any.whl → 3.7.4__py3-none-any.whl

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.
squarecloud/__init__.py CHANGED
@@ -1,24 +1,48 @@
1
- from __future__ import annotations
2
-
3
- from . import errors, utils
4
- from .app import Application
5
- from .client import Client
6
- from .data import (
7
- AppData,
8
- Backup,
9
- BackupInfo,
10
- DeployData,
11
- DNSRecord,
12
- DomainAnalytics,
13
- FileInfo,
14
- LogsData,
15
- PlanData,
16
- ResumedStatus,
17
- StatusData,
18
- UploadData,
19
- UserData,
20
- )
21
- from .file import File
22
- from .http.endpoints import Endpoint
23
-
24
- __version__ = '3.7.2'
1
+ from __future__ import annotations
2
+
3
+ from . import errors, utils
4
+ from .app import Application
5
+ from .client import Client
6
+ from .data import (
7
+ AppData,
8
+ Backup,
9
+ BackupInfo,
10
+ DeployData,
11
+ DNSRecord,
12
+ DomainAnalytics,
13
+ FileInfo,
14
+ LogsData,
15
+ PlanData,
16
+ ResumedStatus,
17
+ StatusData,
18
+ UploadData,
19
+ UserData,
20
+ )
21
+ from .file import File
22
+ from .http.endpoints import Endpoint
23
+ from .http.http_client import Response
24
+
25
+ __all__ = [
26
+ 'Application',
27
+ 'Client',
28
+ 'File',
29
+ 'Endpoint',
30
+ 'Response',
31
+ 'AppData',
32
+ 'Backup',
33
+ 'BackupInfo',
34
+ 'DeployData',
35
+ 'DNSRecord',
36
+ 'DomainAnalytics',
37
+ 'FileInfo',
38
+ 'LogsData',
39
+ 'PlanData',
40
+ 'ResumedStatus',
41
+ 'StatusData',
42
+ 'UploadData',
43
+ 'UserData',
44
+ 'errors',
45
+ 'utils',
46
+ ]
47
+
48
+ __version__ = '3.7.4'
@@ -1,3 +1,3 @@
1
- from importlib.util import find_spec
2
-
3
- USING_PYDANTIC = bool(find_spec('pydantic'))
1
+ from importlib.util import find_spec
2
+
3
+ USING_PYDANTIC = bool(find_spec('pydantic'))
@@ -1,12 +1,16 @@
1
- from .constants import USING_PYDANTIC
2
-
3
- if USING_PYDANTIC:
4
- from pydantic import ConfigDict, validate_call
5
-
6
-
7
- def validate(func: callable) -> callable:
8
- if USING_PYDANTIC:
9
- return validate_call(
10
- func, config=ConfigDict(arbitrary_types_allowed=True)
11
- )
12
- return func
1
+ from typing import Any, Callable, TypeVar
2
+
3
+ from .constants import USING_PYDANTIC
4
+
5
+ if USING_PYDANTIC:
6
+ from pydantic import ConfigDict, validate_call
7
+
8
+ F = TypeVar('F', bound=Callable[..., Any])
9
+
10
+
11
+ def validate(func: F) -> Callable[..., Any] | F:
12
+ if USING_PYDANTIC:
13
+ return validate_call(config=ConfigDict(arbitrary_types_allowed=True))(
14
+ func
15
+ )
16
+ return func