squarecloud-api 3.8.0__tar.gz → 4.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.
Files changed (41) hide show
  1. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0}/LICENSE +19 -19
  2. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0}/PKG-INFO +7 -9
  3. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0}/README.md +54 -54
  4. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0}/pyproject.toml +148 -146
  5. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/__init__.py +50 -48
  6. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/app.py +764 -769
  7. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/client.py +1149 -870
  8. squarecloud_api-4.0.0/src/squarecloud/data/__init__.py +44 -0
  9. squarecloud_api-4.0.0/src/squarecloud/data/app.py +41 -0
  10. squarecloud_api-4.0.0/src/squarecloud/data/base.py +15 -0
  11. squarecloud_api-4.0.0/src/squarecloud/data/base_database.py +8 -0
  12. squarecloud_api-4.0.0/src/squarecloud/data/certificate.py +58 -0
  13. squarecloud_api-4.0.0/src/squarecloud/data/database.py +10 -0
  14. squarecloud_api-4.0.0/src/squarecloud/data/database_info.py +17 -0
  15. squarecloud_api-4.0.0/src/squarecloud/data/deploy_data.py +11 -0
  16. squarecloud_api-4.0.0/src/squarecloud/data/dns_record.py +8 -0
  17. squarecloud_api-4.0.0/src/squarecloud/data/domain_analytics.py +62 -0
  18. squarecloud_api-4.0.0/src/squarecloud/data/file_info.py +30 -0
  19. squarecloud_api-4.0.0/src/squarecloud/data/language.py +6 -0
  20. squarecloud_api-4.0.0/src/squarecloud/data/logs.py +15 -0
  21. squarecloud_api-4.0.0/src/squarecloud/data/plan.py +23 -0
  22. squarecloud_api-4.0.0/src/squarecloud/data/snapshot.py +34 -0
  23. squarecloud_api-4.0.0/src/squarecloud/data/snapshot_info.py +16 -0
  24. squarecloud_api-4.0.0/src/squarecloud/data/status.py +46 -0
  25. squarecloud_api-4.0.0/src/squarecloud/data/upload.py +37 -0
  26. squarecloud_api-4.0.0/src/squarecloud/data/user.py +26 -0
  27. squarecloud_api-4.0.0/src/squarecloud/data/workspace.py +53 -0
  28. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/errors.py +238 -229
  29. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/file.py +60 -60
  30. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/http/__init__.py +4 -4
  31. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/http/endpoints.py +584 -358
  32. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/http/http_client.py +1121 -823
  33. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/listeners/__init__.py +140 -171
  34. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/listeners/capture_listener.py +115 -160
  35. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/listeners/request_listener.py +74 -114
  36. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/logger.py +58 -58
  37. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/utils.py +75 -75
  38. squarecloud_api-3.8.0/squarecloud/_internal/constants.py +0 -3
  39. squarecloud_api-3.8.0/squarecloud/_internal/decorators.py +0 -16
  40. squarecloud_api-3.8.0/squarecloud/data.py +0 -345
  41. {squarecloud_api-3.8.0 → squarecloud_api-4.0.0/src}/squarecloud/py.typed +0 -0
@@ -1,20 +1,20 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2022 Robert Nogueira
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
- the Software, and to permit persons to whom the Software is furnished to do so,
10
- subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Robert Nogueira
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
20
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,20 +1,18 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: squarecloud-api
3
- Version: 3.8.0
3
+ Version: 4.0.0
4
4
  Summary: SquareCloud API wrapper
5
5
  License: MIT
6
+ License-File: LICENSE
6
7
  Author: Robert Nogueira
7
8
  Author-email: robertlucasnogueira@gmail.com
8
- Requires-Python: >=3.13,<4.0
9
+ Requires-Python: >=3.13,<3.15
9
10
  Classifier: License :: OSI Approved :: MIT License
10
11
  Classifier: Programming Language :: Python :: 3
11
12
  Classifier: Programming Language :: Python :: 3.13
12
- Provides-Extra: pydantic
13
- Requires-Dist: aiohttp (>=3.11.14,<4.0.0)
14
- Requires-Dist: pydantic (==2.9.2) ; extra == "pydantic"
15
- Requires-Dist: typing-extensions (>=4.12.2,<5.0.0)
16
- Project-URL: Documentation, https://docs.squarecloud.app/sdks/py
17
- Project-URL: Repository, https://github.com/squarecloudofc/wrapper-api-py
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Requires-Dist: aiohttp (>=3.13.2,<3.14.0)
15
+ Requires-Dist: typing-extensions (>=4.15.0,<4.16.0)
18
16
  Description-Content-Type: text/markdown
19
17
 
20
18
  [Square Cloud]: https://squarecloud.app
@@ -1,54 +1,54 @@
1
- [Square Cloud]: https://squarecloud.app
2
-
3
- [Square Cloud API]: https://docs.squarecloud.app/api-reference/
4
-
5
- [@allma]: https://github.com/Robert-Nogueira
6
-
7
-
8
- <div align="center">
9
- <img alt="Square Cloud Banner" src="https://cdn.squarecloud.app/png/github-readme.png">
10
- </div>
11
-
12
- <h1 align="center">squarecloud-api</h1>
13
-
14
- <p align="center">A Python SDK for consuming the <a href="https://squarecloud.app" target="_blank">Square Cloud</a> API.</p>
15
-
16
- ## Installation
17
-
18
- ````shell
19
- pip install squarecloud-api
20
- ````
21
-
22
- ## Getting api key
23
-
24
- to get your api key/token just go to the [Square Cloud] website and
25
- register/login, after that go
26
- to `dashboard` > `my account` > `Regenerate API/CLI KEY` and copy the key.
27
-
28
- ## Documentation
29
- Visit our [official documentation](https://docs.squarecloud.app/sdks/py) for more information about how to use this library.
30
-
31
- ## Getting started
32
-
33
- ```python
34
- import asyncio
35
- import squarecloud as square
36
-
37
- client = square.Client('API_KEY')
38
-
39
- async def main():
40
- status = await client.app_status(app_id='application_id')
41
- print(status)
42
- print(status.ram)
43
- print(status.cpu)
44
-
45
- asyncio.run(main())
46
- ```
47
-
48
- ## Contributing
49
-
50
- Feel free to contribute with suggestions or bug reports at our [GitHub repository](https://github.com/squarecloudofc/wrapper-api-py).
51
-
52
- ## Authors
53
-
54
- - [@allma]
1
+ [Square Cloud]: https://squarecloud.app
2
+
3
+ [Square Cloud API]: https://docs.squarecloud.app/api-reference/
4
+
5
+ [@allma]: https://github.com/Robert-Nogueira
6
+
7
+
8
+ <div align="center">
9
+ <img alt="Square Cloud Banner" src="https://cdn.squarecloud.app/png/github-readme.png">
10
+ </div>
11
+
12
+ <h1 align="center">squarecloud-api</h1>
13
+
14
+ <p align="center">A Python SDK for consuming the <a href="https://squarecloud.app" target="_blank">Square Cloud</a> API.</p>
15
+
16
+ ## Installation
17
+
18
+ ````shell
19
+ pip install squarecloud-api
20
+ ````
21
+
22
+ ## Getting api key
23
+
24
+ to get your api key/token just go to the [Square Cloud] website and
25
+ register/login, after that go
26
+ to `dashboard` > `my account` > `Regenerate API/CLI KEY` and copy the key.
27
+
28
+ ## Documentation
29
+ Visit our [official documentation](https://docs.squarecloud.app/sdks/py) for more information about how to use this library.
30
+
31
+ ## Getting started
32
+
33
+ ```python
34
+ import asyncio
35
+ import squarecloud as square
36
+
37
+ client = square.Client('API_KEY')
38
+
39
+ async def main():
40
+ status = await client.app_status(app_id='application_id')
41
+ print(status)
42
+ print(status.ram)
43
+ print(status.cpu)
44
+
45
+ asyncio.run(main())
46
+ ```
47
+
48
+ ## Contributing
49
+
50
+ Feel free to contribute with suggestions or bug reports at our [GitHub repository](https://github.com/squarecloudofc/wrapper-api-py).
51
+
52
+ ## Authors
53
+
54
+ - [@allma]
@@ -1,146 +1,148 @@
1
- [tool.poetry]
2
- name = 'squarecloud-api'
3
- version = '3.8.0'
4
- description = 'SquareCloud API wrapper'
5
- authors = ['Robert Nogueira <robertlucasnogueira@gmail.com>']
6
- repository = 'https://github.com/squarecloudofc/wrapper-api-py'
7
- documentation = 'https://docs.squarecloud.app/sdks/py'
8
- license = 'MIT License'
9
- readme = 'README.md'
10
- packages = [{ include = "squarecloud" }]
11
-
12
-
13
- [tool.poetry.dependencies]
14
- python = '^3.13'
15
- typing-extensions = "^4.12.2"
16
- aiohttp = "^3.11.14"
17
- pydantic = "2.9.2"
18
-
19
- [tool.poetry.extras]
20
- pydantic = ["pydantic"]
21
-
22
- [tool.poetry.group.dev.dependencies]
23
- isort = "^6.0.1"
24
- pre-commit = "^4.2.0"
25
- pytest = "^8.3.5"
26
- pytest-asyncio = "^0.26.0"
27
- pytest-cov = "^6.0.0"
28
- pytest-rerunfailures = "^15.0"
29
- ruff = "^0.11.2"
30
- taskipy = "^1.14.1"
31
- bandit = {extras = ["toml"], version = "^1.8.3"}
32
- cz-conventional-gitmoji = "^0.7.0"
33
- memory-profiler = '^0.61.0'
34
- requests = '^2.31.0'
35
- python-dotenv = "^1.0.1"
36
- safety = "^3.3.1"
37
- vulture = "^2.14"
38
- mypy-extensions = "^1.0.0"
39
- commitizen = "^4.5.1"
40
-
41
- [build-system]
42
- requires = ['poetry-core']
43
- build-backend = 'poetry.core.masonry.api'
44
-
45
- [tool.pytest.ini_options]
46
- asyncio_mode = 'auto'
47
- markers = [
48
- 'app',
49
- 'app_data',
50
- 'listeners',
51
- 'capture_listener',
52
- 'request_listener',
53
- 'files',
54
- 'upload',
55
- ]
56
-
57
- [tool.isort]
58
- profile = 'black'
59
- line_length = 79
60
-
61
- [tool.taskipy.tasks]
62
- lint = 'isort . && ruff check .'
63
- pre_test = 'task lint'
64
- test = 'pytest -vv -s --reruns 5 --only-rerun TooManyRequests --reruns-delay 90 -x --cov=tests tests'
65
- post_test = 'coverage html'
66
- publish-test = 'poetry publish -r pypi-test --build'
67
- install-test = 'pip install -i https://test.pypi.org/pypi/ --extra-index-url https://pypi.org/simple --upgrade squarecloud-api'
68
- clear-test-apps = 'python -m scripts.clear_test_apps'
69
-
70
- [tool.ruff]
71
- line-length = 79
72
- exclude = ['env', 'tests']
73
-
74
- [tool.bandit]
75
- exclude_dirs = ["docs", "venv", "migrations", "examples", "tests"]
76
- skips = ["B101", "B311"]
77
- severity_threshold = "low"
78
- confidence_threshold = "low"
79
- recursive = true
80
- quiet = false
81
-
82
- [tool.bandit.tests]
83
- B102 = "exec_used" # Use of 'exec' detected
84
- B103 = "set_bad_file_permissions" # Insecure file permissions
85
- B104 = "hardcoded_bind_all_interfaces" # Binding to all interfaces
86
- B105 = "hardcoded_password_string" # Hardcoded password in a string
87
- B106 = "hardcoded_password_funcarg" # Hardcoded password in function argument
88
- B107 = "hardcoded_password_default" # Hardcoded password in a default argument
89
- B108 = "hardcoded_tmp_directory" # Use of hardcoded temporary directory
90
- B109 = "password_config_option_not_marked_secret" # Password config not marked as secret
91
- B110 = "try_except_pass" # 'try-except-pass' pattern detected
92
- B111 = "execute_with_run_as_root_equals_true" # Executing with 'run_as_root=True'
93
- B112 = "try_except_continue" # 'try-except-continue' pattern detected
94
- B113 = "request_without_timeout" # HTTP request without a timeout
95
-
96
- # Security vulnerabilities in web applications
97
- B201 = "flask_debug_true" # Flask app running with 'debug=True'
98
- B202 = "tarfile_unsafe_members" # Tarfile extract with unsafe members
99
-
100
- # Cryptography-related issues
101
- B324 = "hashlib" # Weak or insecure hash function
102
-
103
- # SSL/TLS issues
104
- B501 = "request_with_no_cert_validation" # Requests without certificate validation
105
- B502 = "ssl_with_bad_version" # Use of outdated SSL versions
106
- B503 = "ssl_with_bad_defaults" # Insecure SSL defaults
107
- B504 = "ssl_with_no_version" # SSL/TLS without specifying a version
108
- B505 = "weak_cryptographic_key" # Weak cryptographic key detected
109
-
110
- # Serialization & data handling
111
- B506 = "yaml_load" # Use of unsafe 'yaml.load'
112
- B507 = "ssh_no_host_key_verification" # SSH without host key verification
113
- B508 = "snmp_insecure_version" # Insecure SNMP version used
114
- B509 = "snmp_weak_cryptography" # Weak SNMP cryptography used
115
-
116
- # Process execution risks
117
- B601 = "paramiko_calls" # Use of Paramiko library detected
118
- B602 = "subprocess_popen_with_shell_equals_true" # Popen with 'shell=True'
119
- B603 = "subprocess_without_shell_equals_true" # Popen without 'shell=True'
120
- B604 = "any_other_function_with_shell_equals_true" # Dangerous shell execution function
121
- B605 = "start_process_with_a_shell" # Starting a process with a shell
122
- B606 = "start_process_with_no_shell" # Process started without shell
123
- B607 = "start_process_with_partial_path" # Process started with a partial path
124
-
125
- # Database security
126
- B608 = "hardcoded_sql_expressions" # Hardcoded SQL expressions detected
127
- B609 = "linux_commands_wildcard_injection" # Linux command injection via wildcards
128
- B610 = "django_extra_used" # Use of Django's 'extra()' method
129
- B611 = "django_rawsql_used" # Use of raw SQL in Django
130
- B612 = "logging_config_insecure_listen" # Insecure logging configuration
131
-
132
- # Miscellaneous security issues
133
- B613 = "trojansource" # Trojan Source attack patterns detected
134
- B614 = "pytorch_load" # Use of 'torch.load', which can be unsafe
135
-
136
- # Template security risks
137
- B701 = "jinja2_autoescape_false" # Jinja2 autoescape disabled
138
- B702 = "use_of_mako_templates" # Use of Mako templates detected
139
- B703 = "django_mark_safe" # Use of Django's 'mark_safe'
140
- B704 = "markupsafe_markup_xss" # Potential XSS via MarkupSafe
141
-
142
- [tool.commitizen]
143
- name = "cz_gitmoji"
144
-
145
- [tool.ruff.lint.per-file-ignores]
146
- '__init__.py' = ['F401']
1
+ [project]
2
+ name = "squarecloud-api"
3
+ version = "4.0.0"
4
+ description = "SquareCloud API wrapper"
5
+ authors = [
6
+ {name = "Robert Nogueira",email = "robertlucasnogueira@gmail.com"}
7
+ ]
8
+ repository = 'https://github.com/squarecloudofc/wrapper-api-py'
9
+ documentation = 'https://docs.squarecloud.app/en/sdks/py/client'
10
+ license = {text = "MIT License"}
11
+ readme = "README.md"
12
+ requires-python = ">=3.13,<3.15"
13
+
14
+ dependencies = [
15
+ "aiohttp~=3.13.2",
16
+ "typing-extensions~=4.15.0",
17
+ ]
18
+
19
+ [tool.poetry]
20
+ packages = [{ from= "src", include = "squarecloud" }]
21
+
22
+ [build-system]
23
+ requires = ["poetry-core>=2.0.0,<3.0.0"]
24
+ build-backend = "poetry.core.masonry.api"
25
+
26
+ [dependency-groups]
27
+ dev = [
28
+ "bandit[toml]~=1.9.2",
29
+ "commitizen~=4.10.1",
30
+ "cz-conventional-gitmoji~=0.7.0",
31
+ "isort~=7.0.0",
32
+ "memory-profiler~=0.61.0",
33
+ "mypy-extensions~=1.1.0",
34
+ "pre-commit~=4.5.0",
35
+ "pytest~=9.0.2",
36
+ "pytest-asyncio~=1.3.0",
37
+ "pytest-cov~=7.1.0",
38
+ "pytest-rerunfailures~=16.1",
39
+ "python-dotenv~=1.2.1",
40
+ "requests~=2.32.5",
41
+ "ruff~=0.14.9",
42
+ "safety~=3.7.0",
43
+ "taskipy~=1.14.1",
44
+ "vulture~=2.14",
45
+ ]
46
+
47
+ [tool.pytest.ini_options]
48
+ asyncio_mode = 'auto'
49
+ markers = [
50
+ 'app',
51
+ 'app_data',
52
+ 'listeners',
53
+ 'capture_listener',
54
+ 'request_listener',
55
+ 'files',
56
+ 'upload',
57
+ ]
58
+
59
+ [tool.isort]
60
+ profile = 'black'
61
+ line_length = 79
62
+
63
+ [tool.taskipy.tasks]
64
+ lint = 'isort . && ruff check .'
65
+ pre_test = 'task lint'
66
+ test = 'pytest -vv -s --reruns 5 --only-rerun TooManyRequests --reruns-delay 90 -x --cov=tests tests'
67
+ post_test = 'coverage html'
68
+ publish-test = 'poetry publish -r pypi-test --build'
69
+ install-test = 'pip install -i https://test.pypi.org/pypi/ --extra-index-url https://pypi.org/simple --upgrade squarecloud-api'
70
+ clear-test-apps = 'python -m scripts.clear_test_apps'
71
+
72
+ [tool.ruff]
73
+ line-length = 79
74
+ exclude = ['env', 'tests']
75
+
76
+ [tool.bandit]
77
+ exclude_dirs = ["docs", "venv", "migrations", "examples", "tests"]
78
+ skips = ["B101", "B311"]
79
+ severity_threshold = "low"
80
+ confidence_threshold = "low"
81
+ recursive = true
82
+ quiet = false
83
+
84
+ [tool.bandit.tests]
85
+ B102 = "exec_used" # Use of 'exec' detected
86
+ B103 = "set_bad_file_permissions" # Insecure file permissions
87
+ B104 = "hardcoded_bind_all_interfaces" # Binding to all interfaces
88
+ B105 = "hardcoded_password_string" # Hardcoded password in a string
89
+ B106 = "hardcoded_password_funcarg" # Hardcoded password in function argument
90
+ B107 = "hardcoded_password_default" # Hardcoded password in a default argument
91
+ B108 = "hardcoded_tmp_directory" # Use of hardcoded temporary directory
92
+ B109 = "password_config_option_not_marked_secret" # Password config not marked as secret
93
+ B110 = "try_except_pass" # 'try-except-pass' pattern detected
94
+ B111 = "execute_with_run_as_root_equals_true" # Executing with 'run_as_root=True'
95
+ B112 = "try_except_continue" # 'try-except-continue' pattern detected
96
+ B113 = "request_without_timeout" # HTTP request without a timeout
97
+
98
+ # Security vulnerabilities in web applications
99
+ B201 = "flask_debug_true" # Flask app running with 'debug=True'
100
+ B202 = "tarfile_unsafe_members" # Tarfile extract with unsafe members
101
+
102
+ # Cryptography-related issues
103
+ B324 = "hashlib" # Weak or insecure hash function
104
+
105
+ # SSL/TLS issues
106
+ B501 = "request_with_no_cert_validation" # Requests without certificate validation
107
+ B502 = "ssl_with_bad_version" # Use of outdated SSL versions
108
+ B503 = "ssl_with_bad_defaults" # Insecure SSL defaults
109
+ B504 = "ssl_with_no_version" # SSL/TLS without specifying a version
110
+ B505 = "weak_cryptographic_key" # Weak cryptographic key detected
111
+
112
+ # Serialization & data handling
113
+ B506 = "yaml_load" # Use of unsafe 'yaml.load'
114
+ B507 = "ssh_no_host_key_verification" # SSH without host key verification
115
+ B508 = "snmp_insecure_version" # Insecure SNMP version used
116
+ B509 = "snmp_weak_cryptography" # Weak SNMP cryptography used
117
+
118
+ # Process execution risks
119
+ B601 = "paramiko_calls" # Use of Paramiko library detected
120
+ B602 = "subprocess_popen_with_shell_equals_true" # Popen with 'shell=True'
121
+ B603 = "subprocess_without_shell_equals_true" # Popen without 'shell=True'
122
+ B604 = "any_other_function_with_shell_equals_true" # Dangerous shell execution function
123
+ B605 = "start_process_with_a_shell" # Starting a process with a shell
124
+ B606 = "start_process_with_no_shell" # Process started without shell
125
+ B607 = "start_process_with_partial_path" # Process started with a partial path
126
+
127
+ # Database security
128
+ B608 = "hardcoded_sql_expressions" # Hardcoded SQL expressions detected
129
+ B609 = "linux_commands_wildcard_injection" # Linux command injection via wildcards
130
+ B610 = "django_extra_used" # Use of Django's 'extra()' method
131
+ B611 = "django_rawsql_used" # Use of raw SQL in Django
132
+ B612 = "logging_config_insecure_listen" # Insecure logging configuration
133
+
134
+ # Miscellaneous security issues
135
+ B613 = "trojansource" # Trojan Source attack patterns detected
136
+ B614 = "pytorch_load" # Use of 'torch.load', which can be unsafe
137
+
138
+ # Template security risks
139
+ B701 = "jinja2_autoescape_false" # Jinja2 autoescape disabled
140
+ B702 = "use_of_mako_templates" # Use of Mako templates detected
141
+ B703 = "django_mark_safe" # Use of Django's 'mark_safe'
142
+ B704 = "markupsafe_markup_xss" # Potential XSS via MarkupSafe
143
+
144
+ [tool.commitizen]
145
+ name = "cz_gitmoji"
146
+
147
+ [tool.ruff.lint.per-file-ignores]
148
+ '__init__.py' = ['F401']
@@ -1,48 +1,50 @@
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
- DeployData,
9
- DNSRecord,
10
- DomainAnalytics,
11
- FileInfo,
12
- LogsData,
13
- PlanData,
14
- ResumedStatus,
15
- Snapshot,
16
- SnapshotInfo,
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
- 'Snapshot',
33
- 'SnapshotInfo',
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
+ 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
+ DeployData,
9
+ DNSRecord,
10
+ DomainAnalytics,
11
+ FileInfo,
12
+ LogsData,
13
+ PlanData,
14
+ ResumedStatus,
15
+ Snapshot,
16
+ SnapshotInfo,
17
+ StatusData,
18
+ UploadData,
19
+ UserData,
20
+ Workspace,
21
+ )
22
+ from .file import File
23
+ from .http.endpoints import Endpoint
24
+ from .http.http_client import Response
25
+
26
+ __all__ = [
27
+ 'Application',
28
+ 'Client',
29
+ 'File',
30
+ 'Endpoint',
31
+ 'Response',
32
+ 'AppData',
33
+ 'Snapshot',
34
+ 'SnapshotInfo',
35
+ 'DeployData',
36
+ 'DNSRecord',
37
+ 'DomainAnalytics',
38
+ 'FileInfo',
39
+ 'LogsData',
40
+ 'PlanData',
41
+ 'ResumedStatus',
42
+ 'StatusData',
43
+ 'UploadData',
44
+ 'UserData',
45
+ 'Workspace',
46
+ 'errors',
47
+ 'utils',
48
+ ]
49
+
50
+ __version__ = '4.0.0'