catocli 2.0.5__py3-none-any.whl → 2.1.0__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.

Potentially problematic release.


This version of catocli might be problematic. Click here for more details.

Files changed (361) hide show
  1. catocli/Utils/clidriver.py +10 -0
  2. catocli/__init__.py +1 -1
  3. catocli/parsers/custom/export_sites/export_sites.py +18 -1
  4. catocli/parsers/custom/import_sites_to_tf/__init__.py +3 -1
  5. catocli/parsers/custom/import_sites_to_tf/import_sites_to_tf.py +71 -5
  6. catocli/parsers/mutation_accountManagement/__init__.py +13 -0
  7. catocli/parsers/mutation_accountManagement_disableAccount/README.md +16 -0
  8. catocli/parsers/mutation_groups/README.md +7 -0
  9. catocli/parsers/mutation_groups/__init__.py +48 -0
  10. catocli/parsers/mutation_groups_createGroup/README.md +18 -0
  11. catocli/parsers/mutation_groups_deleteGroup/README.md +18 -0
  12. catocli/parsers/mutation_groups_updateGroup/README.md +18 -0
  13. catocli/parsers/mutation_site/__init__.py +104 -0
  14. catocli/parsers/mutation_site_assignSiteBwLicense/README.md +17 -0
  15. catocli/parsers/mutation_site_removeSecondaryAwsVSocket/README.md +17 -0
  16. catocli/parsers/mutation_site_removeSecondaryAzureVSocket/README.md +17 -0
  17. catocli/parsers/mutation_site_removeSiteBwLicense/README.md +17 -0
  18. catocli/parsers/mutation_site_replaceSiteBwLicense/README.md +17 -0
  19. catocli/parsers/mutation_site_updateSecondaryAwsVSocket/README.md +17 -0
  20. catocli/parsers/mutation_site_updateSecondaryAzureVSocket/README.md +17 -0
  21. catocli/parsers/mutation_site_updateSiteBwLicense/README.md +17 -0
  22. catocli/parsers/mutation_site_updateSiteGeneralDetails/README.md +1 -1
  23. catocli/parsers/mutation_sites/__init__.py +104 -0
  24. catocli/parsers/mutation_sites_assignSiteBwLicense/README.md +17 -0
  25. catocli/parsers/mutation_sites_removeSecondaryAwsVSocket/README.md +17 -0
  26. catocli/parsers/mutation_sites_removeSecondaryAzureVSocket/README.md +17 -0
  27. catocli/parsers/mutation_sites_removeSiteBwLicense/README.md +17 -0
  28. catocli/parsers/mutation_sites_replaceSiteBwLicense/README.md +17 -0
  29. catocli/parsers/mutation_sites_updateSecondaryAwsVSocket/README.md +17 -0
  30. catocli/parsers/mutation_sites_updateSecondaryAzureVSocket/README.md +17 -0
  31. catocli/parsers/mutation_sites_updateSiteBwLicense/README.md +17 -0
  32. catocli/parsers/mutation_sites_updateSiteGeneralDetails/README.md +1 -1
  33. catocli/parsers/parserApiClient.py +17 -8
  34. catocli/parsers/query_eventsFeed/README.md +1 -1
  35. catocli/parsers/query_groups/README.md +7 -0
  36. catocli/parsers/query_groups/__init__.py +54 -0
  37. catocli/parsers/query_groups_group/README.md +7 -0
  38. catocli/parsers/query_groups_groupList/README.md +18 -0
  39. catocli/parsers/query_groups_group_members/README.md +18 -0
  40. catocli/parsers/query_groups_whereUsed/README.md +17 -0
  41. catocli/parsers/query_popLocations/README.md +17 -0
  42. catocli/parsers/query_popLocations/__init__.py +16 -0
  43. catocli/parsers/query_site/__init__.py +26 -0
  44. catocli/parsers/query_site_secondaryAwsVSocket/README.md +17 -0
  45. catocli/parsers/query_site_secondaryAzureVSocket/README.md +17 -0
  46. catocli/parsers/query_socketPortMetrics/README.md +23 -0
  47. catocli/parsers/query_socketPortMetrics/__init__.py +16 -0
  48. catocli/parsers/query_socketPortMetricsTimeSeries/README.md +24 -0
  49. catocli/parsers/query_socketPortMetricsTimeSeries/__init__.py +16 -0
  50. {catocli-2.0.5.dist-info → catocli-2.1.0.dist-info}/METADATA +3 -2
  51. {catocli-2.0.5.dist-info → catocli-2.1.0.dist-info}/RECORD +249 -297
  52. {catocli-2.0.5.dist-info → catocli-2.1.0.dist-info}/WHEEL +1 -1
  53. {catocli-2.0.5.dist-info → catocli-2.1.0.dist-info}/top_level.txt +0 -2
  54. models/mutation.accountManagement.addAccount.json +97 -0
  55. models/mutation.accountManagement.disableAccount.json +545 -0
  56. models/mutation.accountManagement.removeAccount.json +102 -3
  57. models/mutation.accountManagement.updateAccount.json +97 -0
  58. models/mutation.admin.addAdmin.json +6 -9
  59. models/mutation.container.delete.json +2 -2
  60. models/mutation.container.fqdn.addValues.json +3 -3
  61. models/mutation.container.fqdn.createFromFile.json +3 -3
  62. models/mutation.container.fqdn.removeValues.json +3 -3
  63. models/mutation.container.fqdn.updateFromFile.json +3 -3
  64. models/mutation.container.ipAddressRange.addValues.json +3 -3
  65. models/mutation.container.ipAddressRange.createFromFile.json +3 -3
  66. models/mutation.container.ipAddressRange.removeValues.json +3 -3
  67. models/mutation.container.ipAddressRange.updateFromFile.json +3 -3
  68. models/mutation.groups.createGroup.json +3178 -0
  69. models/mutation.groups.deleteGroup.json +2758 -0
  70. models/mutation.groups.updateGroup.json +4429 -0
  71. models/mutation.hardware.updateHardwareShipping.json +30 -10
  72. models/mutation.policy.appTenantRestriction.addRule.json +33 -33
  73. models/mutation.policy.appTenantRestriction.addSection.json +4 -4
  74. models/mutation.policy.appTenantRestriction.createPolicyRevision.json +33 -33
  75. models/mutation.policy.appTenantRestriction.discardPolicyRevision.json +33 -33
  76. models/mutation.policy.appTenantRestriction.moveRule.json +27 -27
  77. models/mutation.policy.appTenantRestriction.moveSection.json +4 -4
  78. models/mutation.policy.appTenantRestriction.publishPolicyRevision.json +33 -33
  79. models/mutation.policy.appTenantRestriction.removeRule.json +27 -27
  80. models/mutation.policy.appTenantRestriction.removeSection.json +4 -4
  81. models/mutation.policy.appTenantRestriction.updatePolicy.json +33 -33
  82. models/mutation.policy.appTenantRestriction.updateRule.json +33 -33
  83. models/mutation.policy.appTenantRestriction.updateSection.json +4 -4
  84. models/mutation.policy.dynamicIpAllocation.addRule.json +12 -12
  85. models/mutation.policy.dynamicIpAllocation.addSection.json +4 -4
  86. models/mutation.policy.dynamicIpAllocation.createPolicyRevision.json +18 -18
  87. models/mutation.policy.dynamicIpAllocation.discardPolicyRevision.json +18 -18
  88. models/mutation.policy.dynamicIpAllocation.moveRule.json +12 -12
  89. models/mutation.policy.dynamicIpAllocation.moveSection.json +4 -4
  90. models/mutation.policy.dynamicIpAllocation.publishPolicyRevision.json +18 -18
  91. models/mutation.policy.dynamicIpAllocation.removeRule.json +12 -12
  92. models/mutation.policy.dynamicIpAllocation.removeSection.json +4 -4
  93. models/mutation.policy.dynamicIpAllocation.updatePolicy.json +18 -18
  94. models/mutation.policy.dynamicIpAllocation.updateRule.json +12 -12
  95. models/mutation.policy.dynamicIpAllocation.updateSection.json +4 -4
  96. models/mutation.policy.internetFirewall.addRule.json +141 -141
  97. models/mutation.policy.internetFirewall.addSection.json +4 -4
  98. models/mutation.policy.internetFirewall.createPolicyRevision.json +102 -102
  99. models/mutation.policy.internetFirewall.discardPolicyRevision.json +102 -102
  100. models/mutation.policy.internetFirewall.moveRule.json +96 -96
  101. models/mutation.policy.internetFirewall.moveSection.json +4 -4
  102. models/mutation.policy.internetFirewall.publishPolicyRevision.json +102 -102
  103. models/mutation.policy.internetFirewall.removeRule.json +96 -96
  104. models/mutation.policy.internetFirewall.removeSection.json +4 -4
  105. models/mutation.policy.internetFirewall.updatePolicy.json +102 -102
  106. models/mutation.policy.internetFirewall.updateRule.json +141 -141
  107. models/mutation.policy.internetFirewall.updateSection.json +4 -4
  108. models/mutation.policy.remotePortFwd.addRule.json +21 -21
  109. models/mutation.policy.remotePortFwd.addSection.json +4 -4
  110. models/mutation.policy.remotePortFwd.createPolicyRevision.json +24 -24
  111. models/mutation.policy.remotePortFwd.discardPolicyRevision.json +24 -24
  112. models/mutation.policy.remotePortFwd.moveRule.json +18 -18
  113. models/mutation.policy.remotePortFwd.moveSection.json +4 -4
  114. models/mutation.policy.remotePortFwd.publishPolicyRevision.json +24 -24
  115. models/mutation.policy.remotePortFwd.removeRule.json +18 -18
  116. models/mutation.policy.remotePortFwd.removeSection.json +4 -4
  117. models/mutation.policy.remotePortFwd.updatePolicy.json +24 -24
  118. models/mutation.policy.remotePortFwd.updateRule.json +21 -21
  119. models/mutation.policy.remotePortFwd.updateSection.json +4 -4
  120. models/mutation.policy.socketLan.addRule.json +97 -97
  121. models/mutation.policy.socketLan.addSection.json +4 -4
  122. models/mutation.policy.socketLan.createPolicyRevision.json +91 -91
  123. models/mutation.policy.socketLan.discardPolicyRevision.json +91 -91
  124. models/mutation.policy.socketLan.moveRule.json +85 -85
  125. models/mutation.policy.socketLan.moveSection.json +4 -4
  126. models/mutation.policy.socketLan.publishPolicyRevision.json +91 -91
  127. models/mutation.policy.socketLan.removeRule.json +85 -85
  128. models/mutation.policy.socketLan.removeSection.json +4 -4
  129. models/mutation.policy.socketLan.updatePolicy.json +91 -91
  130. models/mutation.policy.socketLan.updateRule.json +97 -97
  131. models/mutation.policy.socketLan.updateSection.json +4 -4
  132. models/mutation.policy.terminalServer.addRule.json +7 -7
  133. models/mutation.policy.terminalServer.addSection.json +4 -4
  134. models/mutation.policy.terminalServer.createPolicyRevision.json +13 -13
  135. models/mutation.policy.terminalServer.discardPolicyRevision.json +13 -13
  136. models/mutation.policy.terminalServer.moveRule.json +7 -7
  137. models/mutation.policy.terminalServer.moveSection.json +4 -4
  138. models/mutation.policy.terminalServer.publishPolicyRevision.json +13 -13
  139. models/mutation.policy.terminalServer.removeRule.json +7 -7
  140. models/mutation.policy.terminalServer.removeSection.json +4 -4
  141. models/mutation.policy.terminalServer.updatePolicy.json +13 -13
  142. models/mutation.policy.terminalServer.updateRule.json +7 -7
  143. models/mutation.policy.terminalServer.updateSection.json +4 -4
  144. models/mutation.policy.wanFirewall.addRule.json +157 -157
  145. models/mutation.policy.wanFirewall.addSection.json +4 -4
  146. models/mutation.policy.wanFirewall.createPolicyRevision.json +121 -121
  147. models/mutation.policy.wanFirewall.discardPolicyRevision.json +121 -121
  148. models/mutation.policy.wanFirewall.moveRule.json +115 -115
  149. models/mutation.policy.wanFirewall.moveSection.json +4 -4
  150. models/mutation.policy.wanFirewall.publishPolicyRevision.json +121 -121
  151. models/mutation.policy.wanFirewall.removeRule.json +115 -115
  152. models/mutation.policy.wanFirewall.removeSection.json +4 -4
  153. models/mutation.policy.wanFirewall.updatePolicy.json +121 -121
  154. models/mutation.policy.wanFirewall.updateRule.json +157 -157
  155. models/mutation.policy.wanFirewall.updateSection.json +4 -4
  156. models/mutation.policy.wanNetwork.addRule.json +103 -103
  157. models/mutation.policy.wanNetwork.addSection.json +4 -4
  158. models/mutation.policy.wanNetwork.createPolicyRevision.json +97 -97
  159. models/mutation.policy.wanNetwork.discardPolicyRevision.json +97 -97
  160. models/mutation.policy.wanNetwork.moveRule.json +91 -91
  161. models/mutation.policy.wanNetwork.moveSection.json +4 -4
  162. models/mutation.policy.wanNetwork.publishPolicyRevision.json +97 -97
  163. models/mutation.policy.wanNetwork.removeRule.json +91 -91
  164. models/mutation.policy.wanNetwork.removeSection.json +4 -4
  165. models/mutation.policy.wanNetwork.updatePolicy.json +97 -97
  166. models/mutation.policy.wanNetwork.updateRule.json +103 -103
  167. models/mutation.policy.wanNetwork.updateSection.json +4 -4
  168. models/mutation.site.addBgpPeer.json +10 -10
  169. models/mutation.site.addIpsecIkeV2SiteTunnels.json +2 -2
  170. models/mutation.site.addSocketAddOnCard.json +2 -2
  171. models/mutation.site.assignSiteBwLicense.json +12879 -0
  172. models/mutation.site.removeBgpPeer.json +10 -10
  173. models/mutation.site.removeIpsecIkeV2SiteTunnels.json +2 -2
  174. models/mutation.site.removeSecondaryAwsVSocket.json +375 -0
  175. models/mutation.site.removeSecondaryAzureVSocket.json +354 -0
  176. models/mutation.site.removeSiteBwLicense.json +12822 -0
  177. models/mutation.site.removeSocketAddOnCard.json +2 -2
  178. models/mutation.site.replaceSiteBwLicense.json +12939 -0
  179. models/mutation.site.startSiteUpgrade.json +36 -15
  180. models/mutation.site.updateBgpPeer.json +10 -10
  181. models/mutation.site.updateIpsecIkeV2SiteTunnels.json +2 -2
  182. models/mutation.site.updateSecondaryAwsVSocket.json +643 -0
  183. models/mutation.site.updateSecondaryAzureVSocket.json +565 -0
  184. models/mutation.site.updateSiteBwLicense.json +12882 -0
  185. models/mutation.site.updateSiteGeneralDetails.json +724 -1
  186. models/mutation.sites.addBgpPeer.json +10 -10
  187. models/mutation.sites.addIpsecIkeV2SiteTunnels.json +2 -2
  188. models/mutation.sites.addSocketAddOnCard.json +2 -2
  189. models/mutation.sites.assignSiteBwLicense.json +12879 -0
  190. models/mutation.sites.removeBgpPeer.json +10 -10
  191. models/mutation.sites.removeIpsecIkeV2SiteTunnels.json +2 -2
  192. models/mutation.sites.removeSecondaryAwsVSocket.json +375 -0
  193. models/mutation.sites.removeSecondaryAzureVSocket.json +354 -0
  194. models/mutation.sites.removeSiteBwLicense.json +12822 -0
  195. models/mutation.sites.removeSocketAddOnCard.json +2 -2
  196. models/mutation.sites.replaceSiteBwLicense.json +12939 -0
  197. models/mutation.sites.startSiteUpgrade.json +36 -15
  198. models/mutation.sites.updateBgpPeer.json +10 -10
  199. models/mutation.sites.updateIpsecIkeV2SiteTunnels.json +2 -2
  200. models/mutation.sites.updateSecondaryAwsVSocket.json +643 -0
  201. models/mutation.sites.updateSecondaryAzureVSocket.json +565 -0
  202. models/mutation.sites.updateSiteBwLicense.json +12882 -0
  203. models/mutation.sites.updateSiteGeneralDetails.json +724 -1
  204. models/mutation.xdr.addStoryComment.json +1 -1
  205. models/mutation.xdr.analystFeedback.json +84 -84
  206. models/mutation.xdr.deleteStoryComment.json +1 -1
  207. models/query.accountManagement.json +97 -0
  208. models/query.accountMetrics.json +45 -45
  209. models/query.accountSnapshot.json +30 -30
  210. models/query.admin.json +6 -6
  211. models/query.admins.json +13 -13
  212. models/query.appStats.json +915 -867
  213. models/query.appStatsTimeSeries.json +692 -656
  214. models/query.auditFeed.json +6 -6
  215. models/query.catalogs.json +52 -52
  216. models/query.container.json +16 -16
  217. models/query.devices.json +20 -93
  218. models/query.entityLookup.json +2 -2
  219. models/query.events.json +288 -384
  220. models/query.eventsFeed.json +73 -97
  221. models/query.eventsTimeSeries.json +219 -291
  222. models/query.groups.group.members.json +3058 -0
  223. models/query.groups.groupList.json +6474 -0
  224. models/query.groups.whereUsed.json +697 -0
  225. models/query.hardware.json +27 -7
  226. models/query.hardwareManagement.json +8 -8
  227. models/query.licensing.json +3487 -1324
  228. models/query.policy.appTenantRestriction.policy.json +32 -32
  229. models/query.policy.dynamicIpAllocation.policy.json +18 -18
  230. models/query.policy.internetFirewall.policy.json +93 -93
  231. models/query.policy.remotePortFwd.policy.json +23 -23
  232. models/query.policy.socketLan.policy.json +88 -88
  233. models/query.policy.terminalServer.policy.json +13 -13
  234. models/query.policy.wanFirewall.policy.json +111 -111
  235. models/query.policy.wanNetwork.policy.json +97 -97
  236. models/query.popLocations.json +2878 -0
  237. models/query.sandbox.json +5 -5
  238. models/query.site.bgpPeer.json +4 -4
  239. models/query.site.bgpPeerList.json +10 -10
  240. models/query.site.secondaryAwsVSocket.json +340 -0
  241. models/query.site.secondaryAzureVSocket.json +319 -0
  242. models/query.site.siteBgpStatus.json +2 -2
  243. models/query.socketPortMetrics.json +2410 -0
  244. models/query.socketPortMetricsTimeSeries.json +2361 -0
  245. models/query.xdr.stories.json +104 -104
  246. models/query.xdr.story.json +93 -93
  247. schema/catolib.py +21 -12
  248. build/lib/catocli/Utils/clidriver.py +0 -268
  249. build/lib/catocli/Utils/profile_manager.py +0 -188
  250. build/lib/catocli/Utils/version_checker.py +0 -192
  251. build/lib/catocli/__init__.py +0 -2
  252. build/lib/catocli/__main__.py +0 -12
  253. build/lib/catocli/parsers/configure/__init__.py +0 -115
  254. build/lib/catocli/parsers/configure/configure.py +0 -307
  255. build/lib/catocli/parsers/custom/__init__.py +0 -57
  256. build/lib/catocli/parsers/custom/customLib.py +0 -561
  257. build/lib/catocli/parsers/custom/export_rules/__init__.py +0 -42
  258. build/lib/catocli/parsers/custom/export_rules/export_rules.py +0 -234
  259. build/lib/catocli/parsers/custom/export_sites/__init__.py +0 -21
  260. build/lib/catocli/parsers/custom/export_sites/export_sites.py +0 -372
  261. build/lib/catocli/parsers/custom/import_rules_to_tf/__init__.py +0 -58
  262. build/lib/catocli/parsers/custom/import_rules_to_tf/import_rules_to_tf.py +0 -451
  263. build/lib/catocli/parsers/custom/import_sites_to_tf/__init__.py +0 -45
  264. build/lib/catocli/parsers/custom/import_sites_to_tf/import_sites_to_tf.py +0 -891
  265. build/lib/catocli/parsers/mutation_accountManagement/__init__.py +0 -48
  266. build/lib/catocli/parsers/mutation_admin/__init__.py +0 -48
  267. build/lib/catocli/parsers/mutation_container/__init__.py +0 -138
  268. build/lib/catocli/parsers/mutation_hardware/__init__.py +0 -22
  269. build/lib/catocli/parsers/mutation_policy/__init__.py +0 -1305
  270. build/lib/catocli/parsers/mutation_sandbox/__init__.py +0 -35
  271. build/lib/catocli/parsers/mutation_site/__init__.py +0 -373
  272. build/lib/catocli/parsers/mutation_sites/__init__.py +0 -373
  273. build/lib/catocli/parsers/mutation_xdr/__init__.py +0 -48
  274. build/lib/catocli/parsers/parserApiClient.py +0 -513
  275. build/lib/catocli/parsers/query_accountBySubdomain/__init__.py +0 -16
  276. build/lib/catocli/parsers/query_accountManagement/__init__.py +0 -16
  277. build/lib/catocli/parsers/query_accountMetrics/__init__.py +0 -16
  278. build/lib/catocli/parsers/query_accountRoles/__init__.py +0 -16
  279. build/lib/catocli/parsers/query_accountSnapshot/__init__.py +0 -16
  280. build/lib/catocli/parsers/query_admin/__init__.py +0 -16
  281. build/lib/catocli/parsers/query_admins/__init__.py +0 -16
  282. build/lib/catocli/parsers/query_appStats/__init__.py +0 -16
  283. build/lib/catocli/parsers/query_appStatsTimeSeries/__init__.py +0 -16
  284. build/lib/catocli/parsers/query_auditFeed/__init__.py +0 -16
  285. build/lib/catocli/parsers/query_catalogs/__init__.py +0 -16
  286. build/lib/catocli/parsers/query_container/__init__.py +0 -16
  287. build/lib/catocli/parsers/query_devices/__init__.py +0 -16
  288. build/lib/catocli/parsers/query_entityLookup/__init__.py +0 -16
  289. build/lib/catocli/parsers/query_events/__init__.py +0 -16
  290. build/lib/catocli/parsers/query_eventsFeed/__init__.py +0 -16
  291. build/lib/catocli/parsers/query_eventsTimeSeries/__init__.py +0 -16
  292. build/lib/catocli/parsers/query_hardware/__init__.py +0 -16
  293. build/lib/catocli/parsers/query_hardwareManagement/__init__.py +0 -16
  294. build/lib/catocli/parsers/query_licensing/__init__.py +0 -16
  295. build/lib/catocli/parsers/query_policy/__init__.py +0 -161
  296. build/lib/catocli/parsers/query_sandbox/__init__.py +0 -16
  297. build/lib/catocli/parsers/query_site/__init__.py +0 -100
  298. build/lib/catocli/parsers/query_siteLocation/__init__.py +0 -13
  299. build/lib/catocli/parsers/query_subDomains/__init__.py +0 -16
  300. build/lib/catocli/parsers/query_xdr/__init__.py +0 -35
  301. build/lib/catocli/parsers/raw/__init__.py +0 -12
  302. build/lib/graphql_client/__init__.py +0 -11
  303. build/lib/graphql_client/api/__init__.py +0 -3
  304. build/lib/graphql_client/api/call_api.py +0 -84
  305. build/lib/graphql_client/api_client.py +0 -192
  306. build/lib/graphql_client/api_client_types.py +0 -409
  307. build/lib/graphql_client/configuration.py +0 -232
  308. build/lib/graphql_client/models/__init__.py +0 -13
  309. build/lib/graphql_client/models/no_schema.py +0 -71
  310. build/lib/schema/catolib.py +0 -1141
  311. build/lib/schema/importSchema.py +0 -60
  312. build/lib/schema/remove_policyid.py +0 -89
  313. build/lib/schema/remove_policyid_mutations.py +0 -89
  314. build/lib/scripts/catolib.py +0 -62
  315. build/lib/scripts/export_if_rules_to_json.py +0 -188
  316. build/lib/scripts/export_wf_rules_to_json.py +0 -111
  317. build/lib/scripts/import_wf_rules_to_tfstate.py +0 -331
  318. build/lib/vendor/certifi/__init__.py +0 -4
  319. build/lib/vendor/certifi/__main__.py +0 -12
  320. build/lib/vendor/certifi/core.py +0 -114
  321. build/lib/vendor/certifi/py.typed +0 -0
  322. build/lib/vendor/six.py +0 -998
  323. build/lib/vendor/urllib3/__init__.py +0 -211
  324. build/lib/vendor/urllib3/_base_connection.py +0 -172
  325. build/lib/vendor/urllib3/_collections.py +0 -483
  326. build/lib/vendor/urllib3/_request_methods.py +0 -278
  327. build/lib/vendor/urllib3/_version.py +0 -16
  328. build/lib/vendor/urllib3/connection.py +0 -1033
  329. build/lib/vendor/urllib3/connectionpool.py +0 -1182
  330. build/lib/vendor/urllib3/contrib/__init__.py +0 -0
  331. build/lib/vendor/urllib3/contrib/emscripten/__init__.py +0 -18
  332. build/lib/vendor/urllib3/contrib/emscripten/connection.py +0 -254
  333. build/lib/vendor/urllib3/contrib/emscripten/fetch.py +0 -418
  334. build/lib/vendor/urllib3/contrib/emscripten/request.py +0 -22
  335. build/lib/vendor/urllib3/contrib/emscripten/response.py +0 -285
  336. build/lib/vendor/urllib3/contrib/pyopenssl.py +0 -552
  337. build/lib/vendor/urllib3/contrib/socks.py +0 -228
  338. build/lib/vendor/urllib3/exceptions.py +0 -321
  339. build/lib/vendor/urllib3/fields.py +0 -341
  340. build/lib/vendor/urllib3/filepost.py +0 -89
  341. build/lib/vendor/urllib3/http2/__init__.py +0 -53
  342. build/lib/vendor/urllib3/http2/connection.py +0 -356
  343. build/lib/vendor/urllib3/http2/probe.py +0 -87
  344. build/lib/vendor/urllib3/poolmanager.py +0 -637
  345. build/lib/vendor/urllib3/py.typed +0 -2
  346. build/lib/vendor/urllib3/response.py +0 -1265
  347. build/lib/vendor/urllib3/util/__init__.py +0 -42
  348. build/lib/vendor/urllib3/util/connection.py +0 -137
  349. build/lib/vendor/urllib3/util/proxy.py +0 -43
  350. build/lib/vendor/urllib3/util/request.py +0 -256
  351. build/lib/vendor/urllib3/util/response.py +0 -101
  352. build/lib/vendor/urllib3/util/retry.py +0 -533
  353. build/lib/vendor/urllib3/util/ssl_.py +0 -513
  354. build/lib/vendor/urllib3/util/ssl_match_hostname.py +0 -159
  355. build/lib/vendor/urllib3/util/ssltransport.py +0 -276
  356. build/lib/vendor/urllib3/util/timeout.py +0 -275
  357. build/lib/vendor/urllib3/util/url.py +0 -471
  358. build/lib/vendor/urllib3/util/util.py +0 -42
  359. build/lib/vendor/urllib3/util/wait.py +0 -124
  360. {catocli-2.0.5.dist-info → catocli-2.1.0.dist-info}/entry_points.txt +0 -0
  361. {catocli-2.0.5.dist-info → catocli-2.1.0.dist-info/licenses}/LICENSE +0 -0
@@ -1,278 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import json as _json
4
- import typing
5
- from urllib.parse import urlencode
6
-
7
- from ._base_connection import _TYPE_BODY
8
- from ._collections import HTTPHeaderDict
9
- from .filepost import _TYPE_FIELDS, encode_multipart_formdata
10
- from .response import BaseHTTPResponse
11
-
12
- __all__ = ["RequestMethods"]
13
-
14
- _TYPE_ENCODE_URL_FIELDS = typing.Union[
15
- typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]],
16
- typing.Mapping[str, typing.Union[str, bytes]],
17
- ]
18
-
19
-
20
- class RequestMethods:
21
- """
22
- Convenience mixin for classes who implement a :meth:`urlopen` method, such
23
- as :class:`urllib3.HTTPConnectionPool` and
24
- :class:`urllib3.PoolManager`.
25
-
26
- Provides behavior for making common types of HTTP request methods and
27
- decides which type of request field encoding to use.
28
-
29
- Specifically,
30
-
31
- :meth:`.request_encode_url` is for sending requests whose fields are
32
- encoded in the URL (such as GET, HEAD, DELETE).
33
-
34
- :meth:`.request_encode_body` is for sending requests whose fields are
35
- encoded in the *body* of the request using multipart or www-form-urlencoded
36
- (such as for POST, PUT, PATCH).
37
-
38
- :meth:`.request` is for making any kind of request, it will look up the
39
- appropriate encoding format and use one of the above two methods to make
40
- the request.
41
-
42
- Initializer parameters:
43
-
44
- :param headers:
45
- Headers to include with all requests, unless other headers are given
46
- explicitly.
47
- """
48
-
49
- _encode_url_methods = {"DELETE", "GET", "HEAD", "OPTIONS"}
50
-
51
- def __init__(self, headers: typing.Mapping[str, str] | None = None) -> None:
52
- self.headers = headers or {}
53
-
54
- def urlopen(
55
- self,
56
- method: str,
57
- url: str,
58
- body: _TYPE_BODY | None = None,
59
- headers: typing.Mapping[str, str] | None = None,
60
- encode_multipart: bool = True,
61
- multipart_boundary: str | None = None,
62
- **kw: typing.Any,
63
- ) -> BaseHTTPResponse: # Abstract
64
- raise NotImplementedError(
65
- "Classes extending RequestMethods must implement "
66
- "their own ``urlopen`` method."
67
- )
68
-
69
- def request(
70
- self,
71
- method: str,
72
- url: str,
73
- body: _TYPE_BODY | None = None,
74
- fields: _TYPE_FIELDS | None = None,
75
- headers: typing.Mapping[str, str] | None = None,
76
- json: typing.Any | None = None,
77
- **urlopen_kw: typing.Any,
78
- ) -> BaseHTTPResponse:
79
- """
80
- Make a request using :meth:`urlopen` with the appropriate encoding of
81
- ``fields`` based on the ``method`` used.
82
-
83
- This is a convenience method that requires the least amount of manual
84
- effort. It can be used in most situations, while still having the
85
- option to drop down to more specific methods when necessary, such as
86
- :meth:`request_encode_url`, :meth:`request_encode_body`,
87
- or even the lowest level :meth:`urlopen`.
88
-
89
- :param method:
90
- HTTP request method (such as GET, POST, PUT, etc.)
91
-
92
- :param url:
93
- The URL to perform the request on.
94
-
95
- :param body:
96
- Data to send in the request body, either :class:`str`, :class:`bytes`,
97
- an iterable of :class:`str`/:class:`bytes`, or a file-like object.
98
-
99
- :param fields:
100
- Data to encode and send in the URL or request body, depending on ``method``.
101
-
102
- :param headers:
103
- Dictionary of custom headers to send, such as User-Agent,
104
- If-None-Match, etc. If None, pool headers are used. If provided,
105
- these headers completely replace any pool-specific headers.
106
-
107
- :param json:
108
- Data to encode and send as JSON with UTF-encoded in the request body.
109
- The ``"Content-Type"`` header will be set to ``"application/json"``
110
- unless specified otherwise.
111
- """
112
- method = method.upper()
113
-
114
- if json is not None and body is not None:
115
- raise TypeError(
116
- "request got values for both 'body' and 'json' parameters which are mutually exclusive"
117
- )
118
-
119
- if json is not None:
120
- if headers is None:
121
- headers = self.headers
122
-
123
- if not ("content-type" in map(str.lower, headers.keys())):
124
- headers = HTTPHeaderDict(headers)
125
- headers["Content-Type"] = "application/json"
126
-
127
- body = _json.dumps(json, separators=(",", ":"), ensure_ascii=False).encode(
128
- "utf-8"
129
- )
130
-
131
- if body is not None:
132
- urlopen_kw["body"] = body
133
-
134
- if method in self._encode_url_methods:
135
- return self.request_encode_url(
136
- method,
137
- url,
138
- fields=fields, # type: ignore[arg-type]
139
- headers=headers,
140
- **urlopen_kw,
141
- )
142
- else:
143
- return self.request_encode_body(
144
- method, url, fields=fields, headers=headers, **urlopen_kw
145
- )
146
-
147
- def request_encode_url(
148
- self,
149
- method: str,
150
- url: str,
151
- fields: _TYPE_ENCODE_URL_FIELDS | None = None,
152
- headers: typing.Mapping[str, str] | None = None,
153
- **urlopen_kw: str,
154
- ) -> BaseHTTPResponse:
155
- """
156
- Make a request using :meth:`urlopen` with the ``fields`` encoded in
157
- the url. This is useful for request methods like GET, HEAD, DELETE, etc.
158
-
159
- :param method:
160
- HTTP request method (such as GET, POST, PUT, etc.)
161
-
162
- :param url:
163
- The URL to perform the request on.
164
-
165
- :param fields:
166
- Data to encode and send in the URL.
167
-
168
- :param headers:
169
- Dictionary of custom headers to send, such as User-Agent,
170
- If-None-Match, etc. If None, pool headers are used. If provided,
171
- these headers completely replace any pool-specific headers.
172
- """
173
- if headers is None:
174
- headers = self.headers
175
-
176
- extra_kw: dict[str, typing.Any] = {"headers": headers}
177
- extra_kw.update(urlopen_kw)
178
-
179
- if fields:
180
- url += "?" + urlencode(fields)
181
-
182
- return self.urlopen(method, url, **extra_kw)
183
-
184
- def request_encode_body(
185
- self,
186
- method: str,
187
- url: str,
188
- fields: _TYPE_FIELDS | None = None,
189
- headers: typing.Mapping[str, str] | None = None,
190
- encode_multipart: bool = True,
191
- multipart_boundary: str | None = None,
192
- **urlopen_kw: str,
193
- ) -> BaseHTTPResponse:
194
- """
195
- Make a request using :meth:`urlopen` with the ``fields`` encoded in
196
- the body. This is useful for request methods like POST, PUT, PATCH, etc.
197
-
198
- When ``encode_multipart=True`` (default), then
199
- :func:`urllib3.encode_multipart_formdata` is used to encode
200
- the payload with the appropriate content type. Otherwise
201
- :func:`urllib.parse.urlencode` is used with the
202
- 'application/x-www-form-urlencoded' content type.
203
-
204
- Multipart encoding must be used when posting files, and it's reasonably
205
- safe to use it in other times too. However, it may break request
206
- signing, such as with OAuth.
207
-
208
- Supports an optional ``fields`` parameter of key/value strings AND
209
- key/filetuple. A filetuple is a (filename, data, MIME type) tuple where
210
- the MIME type is optional. For example::
211
-
212
- fields = {
213
- 'foo': 'bar',
214
- 'fakefile': ('foofile.txt', 'contents of foofile'),
215
- 'realfile': ('barfile.txt', open('realfile').read()),
216
- 'typedfile': ('bazfile.bin', open('bazfile').read(),
217
- 'image/jpeg'),
218
- 'nonamefile': 'contents of nonamefile field',
219
- }
220
-
221
- When uploading a file, providing a filename (the first parameter of the
222
- tuple) is optional but recommended to best mimic behavior of browsers.
223
-
224
- Note that if ``headers`` are supplied, the 'Content-Type' header will
225
- be overwritten because it depends on the dynamic random boundary string
226
- which is used to compose the body of the request. The random boundary
227
- string can be explicitly set with the ``multipart_boundary`` parameter.
228
-
229
- :param method:
230
- HTTP request method (such as GET, POST, PUT, etc.)
231
-
232
- :param url:
233
- The URL to perform the request on.
234
-
235
- :param fields:
236
- Data to encode and send in the request body.
237
-
238
- :param headers:
239
- Dictionary of custom headers to send, such as User-Agent,
240
- If-None-Match, etc. If None, pool headers are used. If provided,
241
- these headers completely replace any pool-specific headers.
242
-
243
- :param encode_multipart:
244
- If True, encode the ``fields`` using the multipart/form-data MIME
245
- format.
246
-
247
- :param multipart_boundary:
248
- If not specified, then a random boundary will be generated using
249
- :func:`urllib3.filepost.choose_boundary`.
250
- """
251
- if headers is None:
252
- headers = self.headers
253
-
254
- extra_kw: dict[str, typing.Any] = {"headers": HTTPHeaderDict(headers)}
255
- body: bytes | str
256
-
257
- if fields:
258
- if "body" in urlopen_kw:
259
- raise TypeError(
260
- "request got values for both 'fields' and 'body', can only specify one."
261
- )
262
-
263
- if encode_multipart:
264
- body, content_type = encode_multipart_formdata(
265
- fields, boundary=multipart_boundary
266
- )
267
- else:
268
- body, content_type = (
269
- urlencode(fields), # type: ignore[arg-type]
270
- "application/x-www-form-urlencoded",
271
- )
272
-
273
- extra_kw["body"] = body
274
- extra_kw["headers"].setdefault("Content-Type", content_type)
275
-
276
- extra_kw.update(urlopen_kw)
277
-
278
- return self.urlopen(method, url, **extra_kw)
@@ -1,16 +0,0 @@
1
- # file generated by setuptools_scm
2
- # don't change, don't track in version control
3
- TYPE_CHECKING = False
4
- if TYPE_CHECKING:
5
- from typing import Tuple, Union
6
- VERSION_TUPLE = Tuple[Union[int, str], ...]
7
- else:
8
- VERSION_TUPLE = object
9
-
10
- version: str
11
- __version__: str
12
- __version_tuple__: VERSION_TUPLE
13
- version_tuple: VERSION_TUPLE
14
-
15
- __version__ = version = '2.2.3'
16
- __version_tuple__ = version_tuple = (2, 2, 3)