PyFunceble-dev 4.3.1__py3-none-any.whl → 4.4.1__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.
Files changed (264) hide show
  1. PyFunceble/__init__.py +1 -1
  2. PyFunceble/checker/__init__.py +1 -1
  3. PyFunceble/checker/availability/__init__.py +1 -1
  4. PyFunceble/checker/availability/base.py +12 -4
  5. PyFunceble/checker/availability/domain.py +4 -2
  6. PyFunceble/checker/availability/domain_and_ip.py +3 -1
  7. PyFunceble/checker/availability/extras/__init__.py +1 -1
  8. PyFunceble/checker/availability/extras/base.py +1 -1
  9. PyFunceble/checker/availability/extras/dns.py +1 -1
  10. PyFunceble/checker/availability/extras/etoxic.py +1 -1
  11. PyFunceble/checker/availability/extras/external.py +1 -1
  12. PyFunceble/checker/availability/extras/parked.py +1 -1
  13. PyFunceble/checker/availability/extras/rules.py +1 -1
  14. PyFunceble/checker/availability/extras/subject_switch.py +1 -1
  15. PyFunceble/checker/availability/ip.py +1 -1
  16. PyFunceble/checker/availability/params.py +1 -1
  17. PyFunceble/checker/availability/status.py +1 -1
  18. PyFunceble/checker/availability/url.py +1 -1
  19. PyFunceble/checker/base.py +14 -2
  20. PyFunceble/checker/complex_json_encoder.py +1 -1
  21. PyFunceble/checker/params_base.py +1 -1
  22. PyFunceble/checker/reputation/__init__.py +1 -1
  23. PyFunceble/checker/reputation/base.py +11 -3
  24. PyFunceble/checker/reputation/domain.py +1 -1
  25. PyFunceble/checker/reputation/domain_and_ip.py +1 -1
  26. PyFunceble/checker/reputation/ip.py +1 -1
  27. PyFunceble/checker/reputation/params.py +1 -1
  28. PyFunceble/checker/reputation/status.py +1 -1
  29. PyFunceble/checker/reputation/url.py +1 -1
  30. PyFunceble/checker/status_base.py +1 -1
  31. PyFunceble/checker/syntax/__init__.py +1 -1
  32. PyFunceble/checker/syntax/base.py +6 -3
  33. PyFunceble/checker/syntax/domain.py +1 -1
  34. PyFunceble/checker/syntax/domain_and_ip.py +1 -1
  35. PyFunceble/checker/syntax/domain_base.py +1 -1
  36. PyFunceble/checker/syntax/ip.py +1 -1
  37. PyFunceble/checker/syntax/ipv4.py +1 -1
  38. PyFunceble/checker/syntax/ipv6.py +1 -1
  39. PyFunceble/checker/syntax/params.py +1 -1
  40. PyFunceble/checker/syntax/second_lvl_domain.py +1 -1
  41. PyFunceble/checker/syntax/status.py +1 -1
  42. PyFunceble/checker/syntax/subdomain.py +1 -1
  43. PyFunceble/checker/syntax/url.py +1 -1
  44. PyFunceble/checker/utils/__init__.py +1 -1
  45. PyFunceble/checker/utils/whois.py +8 -4
  46. PyFunceble/cli/__init__.py +1 -1
  47. PyFunceble/cli/continuous_integration/__init__.py +1 -1
  48. PyFunceble/cli/continuous_integration/base.py +1 -1
  49. PyFunceble/cli/continuous_integration/exceptions.py +1 -1
  50. PyFunceble/cli/continuous_integration/github_actions.py +1 -1
  51. PyFunceble/cli/continuous_integration/gitlab_ci.py +1 -1
  52. PyFunceble/cli/continuous_integration/jenkins.py +1 -1
  53. PyFunceble/cli/continuous_integration/standalone.py +1 -1
  54. PyFunceble/cli/continuous_integration/travis_ci.py +1 -1
  55. PyFunceble/cli/continuous_integration/utils.py +1 -1
  56. PyFunceble/cli/credential_loader.py +1 -1
  57. PyFunceble/cli/entry_points/__init__.py +1 -1
  58. PyFunceble/cli/entry_points/clean.py +1 -1
  59. PyFunceble/cli/entry_points/iana.py +1 -1
  60. PyFunceble/cli/entry_points/production.py +1 -1
  61. PyFunceble/cli/entry_points/public_suffix.py +1 -1
  62. PyFunceble/cli/entry_points/pyfunceble/__init__.py +1 -1
  63. PyFunceble/cli/entry_points/pyfunceble/argsparser.py +1 -1
  64. PyFunceble/cli/entry_points/pyfunceble/cli.py +5 -10
  65. PyFunceble/cli/execution_time.py +1 -1
  66. PyFunceble/cli/facility.py +1 -1
  67. PyFunceble/cli/factory.py +1 -1
  68. PyFunceble/cli/file_preloader.py +1 -1
  69. PyFunceble/cli/filesystem/__init__.py +1 -1
  70. PyFunceble/cli/filesystem/cleanup.py +1 -1
  71. PyFunceble/cli/filesystem/counter.py +1 -1
  72. PyFunceble/cli/filesystem/dir_base.py +1 -1
  73. PyFunceble/cli/filesystem/dir_structure/__init__.py +1 -1
  74. PyFunceble/cli/filesystem/dir_structure/backup.py +1 -1
  75. PyFunceble/cli/filesystem/dir_structure/base.py +1 -1
  76. PyFunceble/cli/filesystem/dir_structure/restore.py +1 -1
  77. PyFunceble/cli/filesystem/json_base.py +1 -1
  78. PyFunceble/cli/filesystem/printer/__init__.py +1 -1
  79. PyFunceble/cli/filesystem/printer/base.py +1 -1
  80. PyFunceble/cli/filesystem/printer/file.py +1 -1
  81. PyFunceble/cli/filesystem/printer/stdout.py +3 -1
  82. PyFunceble/cli/filesystem/registrar_counter.py +1 -1
  83. PyFunceble/cli/filesystem/status_file.py +1 -1
  84. PyFunceble/cli/migrators/__init__.py +1 -1
  85. PyFunceble/cli/migrators/alembic.py +1 -1
  86. PyFunceble/cli/migrators/base.py +1 -1
  87. PyFunceble/cli/migrators/csv_file/__init__.py +1 -1
  88. PyFunceble/cli/migrators/csv_file/base.py +1 -1
  89. PyFunceble/cli/migrators/csv_file/inactive_source_delete.py +1 -1
  90. PyFunceble/cli/migrators/csv_file/whois_registrar_add.py +1 -1
  91. PyFunceble/cli/migrators/db_base.py +1 -1
  92. PyFunceble/cli/migrators/file_cleanup/__init__.py +1 -1
  93. PyFunceble/cli/migrators/file_cleanup/base.py +1 -1
  94. PyFunceble/cli/migrators/file_cleanup/hashes_file.py +1 -1
  95. PyFunceble/cli/migrators/file_cleanup/mining_file.py +1 -1
  96. PyFunceble/cli/migrators/file_cleanup/production_config_file.py +1 -1
  97. PyFunceble/cli/migrators/json2csv/__init__.py +1 -1
  98. PyFunceble/cli/migrators/json2csv/base.py +1 -1
  99. PyFunceble/cli/migrators/json2csv/inactive.py +1 -1
  100. PyFunceble/cli/migrators/json2csv/whois.py +1 -1
  101. PyFunceble/cli/migrators/mariadb/__init__.py +1 -1
  102. PyFunceble/cli/migrators/mariadb/base.py +1 -1
  103. PyFunceble/cli/migrators/mariadb/file_and_status.py +1 -1
  104. PyFunceble/cli/migrators/mariadb/whois_record_idna_subject.py +1 -1
  105. PyFunceble/cli/processes/__init__.py +1 -1
  106. PyFunceble/cli/processes/base.py +8 -1
  107. PyFunceble/cli/processes/chancy_producer.py +1 -1
  108. PyFunceble/cli/processes/chancy_tester.py +1 -1
  109. PyFunceble/cli/processes/dir_files_sorter.py +1 -1
  110. PyFunceble/cli/processes/file_sorter.py +1 -1
  111. PyFunceble/cli/processes/migrator.py +1 -1
  112. PyFunceble/cli/processes/miner.py +1 -1
  113. PyFunceble/cli/processes/producer.py +1 -1
  114. PyFunceble/cli/processes/tester.py +1 -1
  115. PyFunceble/cli/processes/workers/__init__.py +1 -1
  116. PyFunceble/cli/processes/workers/base.py +1 -1
  117. PyFunceble/cli/processes/workers/chancy_producer.py +1 -1
  118. PyFunceble/cli/processes/workers/chancy_tester.py +1 -1
  119. PyFunceble/cli/processes/workers/dir_files_sorter.py +1 -1
  120. PyFunceble/cli/processes/workers/file_sorter.py +1 -1
  121. PyFunceble/cli/processes/workers/file_sorter_base.py +1 -1
  122. PyFunceble/cli/processes/workers/migrator.py +1 -1
  123. PyFunceble/cli/processes/workers/miner.py +1 -1
  124. PyFunceble/cli/processes/workers/producer.py +10 -4
  125. PyFunceble/cli/processes/workers/tester.py +6 -6
  126. PyFunceble/cli/scripts/__init__.py +1 -1
  127. PyFunceble/cli/scripts/iana.py +1 -1
  128. PyFunceble/cli/scripts/production.py +1 -1
  129. PyFunceble/cli/scripts/public_suffix.py +1 -1
  130. PyFunceble/cli/storage.py +1 -1
  131. PyFunceble/cli/storage_facility.py +1 -1
  132. PyFunceble/cli/system/__init__.py +1 -1
  133. PyFunceble/cli/system/base.py +1 -1
  134. PyFunceble/cli/system/integrator.py +1 -1
  135. PyFunceble/cli/system/launcher.py +19 -6
  136. PyFunceble/cli/utils/__init__.py +1 -1
  137. PyFunceble/cli/utils/ascii_logo.py +1 -1
  138. PyFunceble/cli/utils/sort.py +1 -1
  139. PyFunceble/cli/utils/stdout.py +1 -1
  140. PyFunceble/cli/utils/testing.py +10 -4
  141. PyFunceble/cli/utils/version.py +1 -1
  142. PyFunceble/config/__init__.py +1 -1
  143. PyFunceble/config/compare.py +1 -1
  144. PyFunceble/config/loader.py +1 -1
  145. PyFunceble/converter/__init__.py +1 -1
  146. PyFunceble/converter/adblock_input_line2subject.py +1 -1
  147. PyFunceble/converter/base.py +1 -1
  148. PyFunceble/converter/cidr2subject.py +1 -1
  149. PyFunceble/converter/input_line2subject.py +1 -1
  150. PyFunceble/converter/internal_url.py +1 -1
  151. PyFunceble/converter/rpz_input_line2subject.py +2 -1
  152. PyFunceble/converter/rpz_policy2subject.py +2 -1
  153. PyFunceble/converter/subject2complements.py +2 -1
  154. PyFunceble/converter/url2netloc.py +1 -1
  155. PyFunceble/converter/wildcard2subject.py +2 -1
  156. PyFunceble/data/alembic/__init__.py +1 -1
  157. PyFunceble/data/alembic/mysql/__init__.py +1 -1
  158. PyFunceble/data/alembic/mysql/env.py +1 -1
  159. PyFunceble/data/alembic/mysql/versions/__init__.py +1 -1
  160. PyFunceble/data/alembic/postgresql/__init__.py +1 -1
  161. PyFunceble/data/alembic/postgresql/env.py +1 -1
  162. PyFunceble/data/alembic/postgresql/versions/__init__.py +1 -1
  163. PyFunceble/database/__init__.py +1 -1
  164. PyFunceble/database/credential/__init__.py +1 -1
  165. PyFunceble/database/credential/base.py +2 -2
  166. PyFunceble/database/credential/mariadb.py +1 -1
  167. PyFunceble/database/credential/mysql.py +1 -1
  168. PyFunceble/database/credential/postgresql.py +1 -1
  169. PyFunceble/database/schemas/__init__.py +1 -1
  170. PyFunceble/database/schemas/autocontinue.py +1 -1
  171. PyFunceble/database/schemas/inactive.py +1 -1
  172. PyFunceble/database/schemas/status.py +1 -1
  173. PyFunceble/database/schemas/whois_record.py +1 -1
  174. PyFunceble/database/session.py +1 -1
  175. PyFunceble/database/sqlalchemy/__init__.py +1 -1
  176. PyFunceble/database/sqlalchemy/all_schemas.py +1 -1
  177. PyFunceble/database/sqlalchemy/base_schema.py +1 -1
  178. PyFunceble/dataset/__init__.py +1 -1
  179. PyFunceble/dataset/autocontinue/__init__.py +1 -1
  180. PyFunceble/dataset/autocontinue/base.py +1 -1
  181. PyFunceble/dataset/autocontinue/csv.py +16 -2
  182. PyFunceble/dataset/autocontinue/sql.py +1 -1
  183. PyFunceble/dataset/base.py +26 -1
  184. PyFunceble/dataset/csv_base.py +4 -1
  185. PyFunceble/dataset/db_base.py +15 -1
  186. PyFunceble/dataset/iana.py +7 -2
  187. PyFunceble/dataset/inactive/__init__.py +1 -1
  188. PyFunceble/dataset/inactive/base.py +1 -1
  189. PyFunceble/dataset/inactive/csv.py +1 -1
  190. PyFunceble/dataset/inactive/sql.py +1 -1
  191. PyFunceble/dataset/ipv4_reputation.py +8 -2
  192. PyFunceble/dataset/public_suffix.py +7 -2
  193. PyFunceble/dataset/sql_base.py +1 -1
  194. PyFunceble/dataset/user_agent.py +7 -2
  195. PyFunceble/dataset/whois/__init__.py +1 -1
  196. PyFunceble/dataset/whois/base.py +1 -1
  197. PyFunceble/dataset/whois/csv.py +1 -1
  198. PyFunceble/dataset/whois/sql.py +1 -1
  199. PyFunceble/downloader/__init__.py +1 -1
  200. PyFunceble/downloader/base.py +1 -1
  201. PyFunceble/downloader/exceptions.py +1 -1
  202. PyFunceble/downloader/iana.py +1 -1
  203. PyFunceble/downloader/ipv4_reputation.py +1 -1
  204. PyFunceble/downloader/public_suffix.py +1 -1
  205. PyFunceble/downloader/user_agents.py +1 -1
  206. PyFunceble/exceptions.py +1 -1
  207. PyFunceble/facility.py +1 -1
  208. PyFunceble/factory.py +1 -1
  209. PyFunceble/helpers/__init__.py +1 -1
  210. PyFunceble/helpers/command.py +2 -2
  211. PyFunceble/helpers/dict.py +1 -1
  212. PyFunceble/helpers/directory.py +1 -1
  213. PyFunceble/helpers/download.py +1 -1
  214. PyFunceble/helpers/environment_variable.py +1 -1
  215. PyFunceble/helpers/exceptions.py +1 -1
  216. PyFunceble/helpers/file.py +1 -1
  217. PyFunceble/helpers/hash.py +1 -1
  218. PyFunceble/helpers/list.py +1 -1
  219. PyFunceble/helpers/merge.py +1 -1
  220. PyFunceble/helpers/regex.py +1 -1
  221. PyFunceble/logger.py +1 -1
  222. PyFunceble/query/__init__.py +1 -1
  223. PyFunceble/query/dns/__init__.py +1 -1
  224. PyFunceble/query/dns/nameserver.py +1 -1
  225. PyFunceble/query/dns/query_tool.py +1 -1
  226. PyFunceble/query/dns/resolver.py +1 -1
  227. PyFunceble/query/http_status_code.py +1 -1
  228. PyFunceble/query/netinfo/__init__.py +1 -1
  229. PyFunceble/query/netinfo/address.py +1 -1
  230. PyFunceble/query/netinfo/base.py +1 -1
  231. PyFunceble/query/netinfo/hostbyaddr.py +1 -1
  232. PyFunceble/query/platform.py +1 -1
  233. PyFunceble/query/record/__init__.py +1 -1
  234. PyFunceble/query/record/base.py +1 -1
  235. PyFunceble/query/record/dns.py +1 -1
  236. PyFunceble/query/record/whois.py +1 -1
  237. PyFunceble/query/requests/__init__.py +1 -1
  238. PyFunceble/query/requests/adapter/__init__.py +1 -1
  239. PyFunceble/query/requests/adapter/base.py +1 -1
  240. PyFunceble/query/requests/adapter/http.py +1 -1
  241. PyFunceble/query/requests/adapter/https.py +1 -1
  242. PyFunceble/query/requests/requester.py +1 -1
  243. PyFunceble/query/whois/__init__.py +1 -1
  244. PyFunceble/query/whois/converter/__init__.py +1 -1
  245. PyFunceble/query/whois/converter/base.py +1 -1
  246. PyFunceble/query/whois/converter/digit2digits.py +1 -1
  247. PyFunceble/query/whois/converter/expiration_date.py +1 -1
  248. PyFunceble/query/whois/converter/month2unified.py +1 -1
  249. PyFunceble/query/whois/converter/registrar.py +1 -1
  250. PyFunceble/query/whois/query_tool.py +1 -1
  251. PyFunceble/sessions.py +1 -1
  252. PyFunceble/storage.py +2 -2
  253. PyFunceble/storage_facility.py +1 -1
  254. PyFunceble/utils/__init__.py +1 -1
  255. PyFunceble/utils/platform.py +1 -1
  256. PyFunceble/utils/profile.py +1 -1
  257. PyFunceble/utils/version.py +1 -1
  258. {pyfunceble_dev-4.3.1.dist-info → pyfunceble_dev-4.4.1.dist-info}/METADATA +115 -115
  259. pyfunceble_dev-4.4.1.dist-info/RECORD +284 -0
  260. {pyfunceble_dev-4.3.1.dist-info → pyfunceble_dev-4.4.1.dist-info}/WHEEL +1 -1
  261. {pyfunceble_dev-4.3.1.dist-info → pyfunceble_dev-4.4.1.dist-info}/licenses/LICENSE +1 -1
  262. pyfunceble_dev-4.3.1.dist-info/RECORD +0 -284
  263. {pyfunceble_dev-4.3.1.dist-info → pyfunceble_dev-4.4.1.dist-info}/entry_points.txt +0 -0
  264. {pyfunceble_dev-4.3.1.dist-info → pyfunceble_dev-4.4.1.dist-info}/top_level.txt +0 -0
PyFunceble/__init__.py CHANGED
@@ -34,7 +34,7 @@ License:
34
34
  ::
35
35
 
36
36
 
37
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
37
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
38
38
 
39
39
  Licensed under the Apache License, Version 2.0 (the "License");
40
40
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -54,7 +54,7 @@ License:
54
54
 
55
55
  import multiprocessing
56
56
  from datetime import datetime
57
- from typing import Dict, List, Optional
57
+ from typing import Any, Dict, List, Optional
58
58
 
59
59
  from sqlalchemy.orm import Session
60
60
 
@@ -110,8 +110,12 @@ class AvailabilityCheckerBase(CheckerBase):
110
110
  Optional, Activates/Disables the check of the status before the actual
111
111
  status gathering.
112
112
  :param bool use_whois_db:
113
- Optional, Activates/Disable the usage of a local database to store the
113
+ Optional, Activates/Disables the usage of a local database to store the
114
114
  WHOIS datasets.
115
+ :param bool use_platform:
116
+ Optional, Activates/Disables the usage of the platform features.
117
+ :param multiprocessing.Lock shared_lock:
118
+ Optional, The shared lock to use to access shared resources.
115
119
  """
116
120
 
117
121
  # pylint: disable=too-many-public-methods, too-many-instance-attributes
@@ -160,6 +164,7 @@ class AvailabilityCheckerBase(CheckerBase):
160
164
  db_session: Optional[Session] = None,
161
165
  use_whois_db: Optional[bool] = None,
162
166
  use_platform: Optional[bool] = None,
167
+ shared_lock: Optional[Any] = None,
163
168
  ) -> None:
164
169
  self.dns_query_tool = DNSQueryTool()
165
170
  self.whois_query_tool = WhoisQueryTool()
@@ -226,6 +231,7 @@ class AvailabilityCheckerBase(CheckerBase):
226
231
  do_syntax_check_first=do_syntax_check_first,
227
232
  db_session=db_session,
228
233
  use_platform=use_platform,
234
+ shared_lock=shared_lock,
229
235
  )
230
236
 
231
237
  @property
@@ -761,7 +767,9 @@ class AvailabilityCheckerBase(CheckerBase):
761
767
  if (
762
768
  PyFunceble.facility.ConfigLoader.is_already_loaded() and self.use_whois_db
763
769
  ): # pragma: no cover ## Not interesting enough to spend time on it.
764
- whois_object = get_whois_dataset_object(db_session=self.db_session)
770
+ whois_object = get_whois_dataset_object(
771
+ db_session=self.db_session, shared_lock=self.shared_lock
772
+ )
765
773
  known_record = whois_object[self.subject]
766
774
 
767
775
  if known_record and not isinstance(known_record, dict):
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -115,7 +115,9 @@ class DomainAvailabilityChecker(AvailabilityCheckerBase):
115
115
  self.status.idna_subject,
116
116
  )
117
117
 
118
- lookup_result = DomainReputationChecker(self.status.idna_subject).get_status()
118
+ lookup_result = DomainReputationChecker(
119
+ self.status.idna_subject, shared_lock=self.shared_lock
120
+ ).get_status()
119
121
 
120
122
  # pylint: disable=no-member
121
123
  if lookup_result and lookup_result.is_malicious():
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -112,6 +112,7 @@ class DomainAndIPAvailabilityChecker(AvailabilityCheckerBase):
112
112
  db_session=self.db_session,
113
113
  use_whois_db=self.use_whois_db,
114
114
  use_platform=self.use_platform,
115
+ shared_lock=self.shared_lock,
115
116
  )
116
117
  else:
117
118
  query_object = DomainAvailabilityChecker(
@@ -126,6 +127,7 @@ class DomainAndIPAvailabilityChecker(AvailabilityCheckerBase):
126
127
  db_session=self.db_session,
127
128
  use_whois_db=self.use_whois_db,
128
129
  use_platform=self.use_platform,
130
+ shared_lock=self.shared_lock,
129
131
  )
130
132
 
131
133
  query_object.dns_query_tool = self.dns_query_tool
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ License:
36
36
  ::
37
37
 
38
38
 
39
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
39
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
40
40
 
41
41
  Licensed under the Apache License, Version 2.0 (the "License");
42
42
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ License:
36
36
  ::
37
37
 
38
38
 
39
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
39
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
40
40
 
41
41
  Licensed under the Apache License, Version 2.0 (the "License");
42
42
  you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ License:
36
36
  ::
37
37
 
38
38
 
39
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
39
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
40
40
 
41
41
  Licensed under the Apache License, Version 2.0 (the "License");
42
42
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -52,7 +52,7 @@ License:
52
52
 
53
53
  import datetime
54
54
  import functools
55
- from typing import Optional
55
+ from typing import Any, Optional
56
56
 
57
57
  import domain2idna
58
58
  from sqlalchemy.orm import Session
@@ -77,6 +77,12 @@ class CheckerBase:
77
77
 
78
78
  .. warning::
79
79
  This does not apply to the syntax checker - itself.
80
+ :param Session db_session:
81
+ Optional, The database session to use.
82
+ :param bool use_platform:
83
+ Optional, Authorizes the usage of the platform.
84
+ :param Any shared_lock:
85
+ Optional, The shared lock to use to access shared resources.
80
86
  """
81
87
 
82
88
  STD_DO_SYNTAX_CHECK_FIRST: bool = False
@@ -97,6 +103,8 @@ class CheckerBase:
97
103
  status: Optional[CheckerStatusBase] = None
98
104
  params: Optional[CheckerParamsBase] = None
99
105
 
106
+ shared_lock: Optional[Any] = None
107
+
100
108
  def __init__(
101
109
  self,
102
110
  subject: Optional[str] = None,
@@ -104,6 +112,7 @@ class CheckerBase:
104
112
  do_syntax_check_first: Optional[bool] = None,
105
113
  db_session: Optional[Session] = None,
106
114
  use_platform: Optional[bool] = None,
115
+ shared_lock: Optional[Any] = None,
107
116
  ) -> None:
108
117
  self.platform_query_tool = PlatformQueryTool()
109
118
  self.url2netloc = Url2Netloc()
@@ -115,6 +124,9 @@ class CheckerBase:
115
124
  if self.status is None:
116
125
  self.status = CheckerStatusBase()
117
126
 
127
+ if shared_lock is not None:
128
+ self.shared_lock = shared_lock
129
+
118
130
  if subject is not None:
119
131
  self.subject = subject
120
132
 
@@ -37,7 +37,7 @@ License:
37
37
  ::
38
38
 
39
39
 
40
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
40
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
41
41
 
42
42
  Licensed under the Apache License, Version 2.0 (the "License");
43
43
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -50,7 +50,7 @@ License:
50
50
  limitations under the License.
51
51
  """
52
52
 
53
- from typing import List, Optional
53
+ from typing import Any, List, Optional
54
54
 
55
55
  from sqlalchemy.orm import Session
56
56
 
@@ -75,6 +75,12 @@ class ReputationCheckerBase(CheckerBase):
75
75
  :param bool do_syntax_check_first:
76
76
  Optional, Activates/Disables the check of the status before the actual
77
77
  status gathering.
78
+ :param Session db_session:
79
+ Optional, The database session to use.
80
+ :param bool use_platform:
81
+ Optional, Authorizes the usage of the platform.
82
+ :param Any shared_lock:
83
+ Optional, The shared lock to use to access shared resources.
78
84
  """
79
85
 
80
86
  dns_query_tool: Optional[DNSQueryTool] = None
@@ -92,9 +98,10 @@ class ReputationCheckerBase(CheckerBase):
92
98
  do_syntax_check_first: Optional[bool] = None,
93
99
  db_session: Optional[Session] = None,
94
100
  use_platform: Optional[bool] = None,
101
+ shared_lock: Optional[Any] = None,
95
102
  ) -> None:
96
103
  self.dns_query_tool = DNSQueryTool()
97
- self.ipv4_reputation_query_tool = IPV4ReputationDataset()
104
+ self.ipv4_reputation_query_tool = IPV4ReputationDataset(shared_lock=shared_lock)
98
105
  self.domain_syntax_checker = DomainSyntaxChecker()
99
106
  self.ip_syntax_checker = IPSyntaxChecker()
100
107
  self.url_syntax_checker = URLSyntaxChecker()
@@ -110,6 +117,7 @@ class ReputationCheckerBase(CheckerBase):
110
117
  do_syntax_check_first=do_syntax_check_first,
111
118
  db_session=db_session,
112
119
  use_platform=use_platform,
120
+ shared_lock=shared_lock,
113
121
  )
114
122
 
115
123
  @staticmethod
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ License:
36
36
  ::
37
37
 
38
38
 
39
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
39
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
40
40
 
41
41
  Licensed under the Apache License, Version 2.0 (the "License");
42
42
  you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ License:
36
36
  ::
37
37
 
38
38
 
39
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
39
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
40
40
 
41
41
  Licensed under the Apache License, Version 2.0 (the "License");
42
42
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -50,7 +50,7 @@ License:
50
50
  limitations under the License.
51
51
  """
52
52
 
53
- from typing import Optional
53
+ from typing import Any, Optional
54
54
 
55
55
  from sqlalchemy.orm import Session
56
56
 
@@ -78,13 +78,16 @@ class SyntaxCheckerBase(CheckerBase):
78
78
  self,
79
79
  subject: Optional[str] = None,
80
80
  db_session: Optional[Session] = None,
81
+ shared_lock: Optional[Any] = None,
81
82
  ) -> None:
82
83
  self.params = SyntaxCheckerParams()
83
84
 
84
85
  self.status = SyntaxCheckerStatus()
85
86
  self.status.params = self.params
86
87
 
87
- super().__init__(subject=subject, db_session=db_session)
88
+ super().__init__(
89
+ subject=subject, db_session=db_session, shared_lock=shared_lock
90
+ )
88
91
 
89
92
  def subject_propagator(self) -> "CheckerBase":
90
93
  """
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ License:
36
36
  ::
37
37
 
38
38
 
39
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
39
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
40
40
 
41
41
  Licensed under the Apache License, Version 2.0 (the "License");
42
42
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ License:
36
36
  ::
37
37
 
38
38
 
39
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
39
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
40
40
 
41
41
  Licensed under the Apache License, Version 2.0 (the "License");
42
42
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ License:
35
35
  ::
36
36
 
37
37
 
38
- Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025 Nissar Chababy
38
+ Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024, 2025, 2026 Nissar Chababy
39
39
 
40
40
  Licensed under the Apache License, Version 2.0 (the "License");
41
41
  you may not use this file except in compliance with the License.