netherframe.core 0.9.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (561) hide show
  1. netherframe_core-0.9.1/LICENSE +21 -0
  2. netherframe_core-0.9.1/PKG-INFO +115 -0
  3. netherframe_core-0.9.1/README.md +64 -0
  4. netherframe_core-0.9.1/data/purelib/netherframe_nf_alias.pth +1 -0
  5. netherframe_core-0.9.1/netherframe/core/__init__.py +140 -0
  6. netherframe_core-0.9.1/netherframe/core/autoscope.py +59 -0
  7. netherframe_core-0.9.1/netherframe/core/backends/__init__.py +51 -0
  8. netherframe_core-0.9.1/netherframe/core/backends/backend_bootstrap.py +132 -0
  9. netherframe_core-0.9.1/netherframe/core/backends/backend_chain.py +663 -0
  10. netherframe_core-0.9.1/netherframe/core/backends/backend_chain_models.py +67 -0
  11. netherframe_core-0.9.1/netherframe/core/backends/backend_chain_policy.py +137 -0
  12. netherframe_core-0.9.1/netherframe/core/backends/backend_config.py +198 -0
  13. netherframe_core-0.9.1/netherframe/core/backends/backend_literals.py +94 -0
  14. netherframe_core-0.9.1/netherframe/core/backends/backend_registry.py +411 -0
  15. netherframe_core-0.9.1/netherframe/core/backends/document_state_backend.py +211 -0
  16. netherframe_core-0.9.1/netherframe/core/backends/graph_authorization.py +102 -0
  17. netherframe_core-0.9.1/netherframe/core/backends/graph_baseline.py +78 -0
  18. netherframe_core-0.9.1/netherframe/core/backends/graph_checkpoint.py +227 -0
  19. netherframe_core-0.9.1/netherframe/core/backends/graph_completion.py +106 -0
  20. netherframe_core-0.9.1/netherframe/core/backends/graph_diagnostics.py +210 -0
  21. netherframe_core-0.9.1/netherframe/core/backends/graph_edges.py +244 -0
  22. netherframe_core-0.9.1/netherframe/core/backends/graph_errored_state.py +151 -0
  23. netherframe_core-0.9.1/netherframe/core/backends/graph_execution_rows.py +82 -0
  24. netherframe_core-0.9.1/netherframe/core/backends/graph_footprints.py +279 -0
  25. netherframe_core-0.9.1/netherframe/core/backends/graph_history.py +115 -0
  26. netherframe_core-0.9.1/netherframe/core/backends/graph_identity.py +315 -0
  27. netherframe_core-0.9.1/netherframe/core/backends/graph_inputs.py +250 -0
  28. netherframe_core-0.9.1/netherframe/core/backends/graph_kept_return.py +98 -0
  29. netherframe_core-0.9.1/netherframe/core/backends/graph_leases.py +185 -0
  30. netherframe_core-0.9.1/netherframe/core/backends/graph_merge.py +79 -0
  31. netherframe_core-0.9.1/netherframe/core/backends/graph_migration.py +181 -0
  32. netherframe_core-0.9.1/netherframe/core/backends/graph_moves.py +417 -0
  33. netherframe_core-0.9.1/netherframe/core/backends/graph_object_guard.py +334 -0
  34. netherframe_core-0.9.1/netherframe/core/backends/graph_ownership.py +116 -0
  35. netherframe_core-0.9.1/netherframe/core/backends/graph_plan_basis.py +243 -0
  36. netherframe_core-0.9.1/netherframe/core/backends/graph_plan_guard.py +174 -0
  37. netherframe_core-0.9.1/netherframe/core/backends/graph_planning.py +528 -0
  38. netherframe_core-0.9.1/netherframe/core/backends/graph_planning_context.py +94 -0
  39. netherframe_core-0.9.1/netherframe/core/backends/graph_planning_rounds.py +351 -0
  40. netherframe_core-0.9.1/netherframe/core/backends/graph_planning_selection.py +298 -0
  41. netherframe_core-0.9.1/netherframe/core/backends/graph_recovery.py +516 -0
  42. netherframe_core-0.9.1/netherframe/core/backends/graph_retention.py +51 -0
  43. netherframe_core-0.9.1/netherframe/core/backends/graph_settings.py +99 -0
  44. netherframe_core-0.9.1/netherframe/core/backends/graph_state.py +905 -0
  45. netherframe_core-0.9.1/netherframe/core/backends/graph_state_engine.py +1861 -0
  46. netherframe_core-0.9.1/netherframe/core/backends/local_backend.py +511 -0
  47. netherframe_core-0.9.1/netherframe/core/backends/lock_heartbeat.py +47 -0
  48. netherframe_core-0.9.1/netherframe/core/backends/state_backend.py +149 -0
  49. netherframe_core-0.9.1/netherframe/core/backends/state_engine.py +41 -0
  50. netherframe_core-0.9.1/netherframe/core/backends/state_engine_runtime.py +630 -0
  51. netherframe_core-0.9.1/netherframe/core/backends/state_lock.py +45 -0
  52. netherframe_core-0.9.1/netherframe/core/backends/state_models.py +504 -0
  53. netherframe_core-0.9.1/netherframe/core/config/__init__.py +35 -0
  54. netherframe_core-0.9.1/netherframe/core/config/config.py +24 -0
  55. netherframe_core-0.9.1/netherframe/core/config/config_discovery.py +150 -0
  56. netherframe_core-0.9.1/netherframe/core/config/config_normalization.py +315 -0
  57. netherframe_core-0.9.1/netherframe/core/config/config_parsing.py +44 -0
  58. netherframe_core-0.9.1/netherframe/core/config/config_values.py +79 -0
  59. netherframe_core-0.9.1/netherframe/core/config/hybrid_settings.py +81 -0
  60. netherframe_core-0.9.1/netherframe/core/config/ignore_changes.py +170 -0
  61. netherframe_core-0.9.1/netherframe/core/config/normalization_coercion.py +142 -0
  62. netherframe_core-0.9.1/netherframe/core/config/normalization_types.py +171 -0
  63. netherframe_core-0.9.1/netherframe/core/config/types.py +21 -0
  64. netherframe_core-0.9.1/netherframe/core/constructs/__init__.py +27 -0
  65. netherframe_core-0.9.1/netherframe/core/constructs/app_stack.py +1178 -0
  66. netherframe_core-0.9.1/netherframe/core/constructs/app_synthesis.py +203 -0
  67. netherframe_core-0.9.1/netherframe/core/constructs/attributes.py +156 -0
  68. netherframe_core-0.9.1/netherframe/core/constructs/backend_base.py +389 -0
  69. netherframe_core-0.9.1/netherframe/core/constructs/base_construct.py +318 -0
  70. netherframe_core-0.9.1/netherframe/core/constructs/cross_stack_refs.py +267 -0
  71. netherframe_core-0.9.1/netherframe/core/constructs/framework_settings.py +20 -0
  72. netherframe_core-0.9.1/netherframe/core/constructs/generated_value.py +78 -0
  73. netherframe_core-0.9.1/netherframe/core/constructs/infrastructure.py +148 -0
  74. netherframe_core-0.9.1/netherframe/core/constructs/infrastructure_policy.py +27 -0
  75. netherframe_core-0.9.1/netherframe/core/constructs/infrastructure_support.py +286 -0
  76. netherframe_core-0.9.1/netherframe/core/constructs/meta.py +431 -0
  77. netherframe_core-0.9.1/netherframe/core/constructs/provider_construct.py +290 -0
  78. netherframe_core-0.9.1/netherframe/core/constructs/resolution.py +76 -0
  79. netherframe_core-0.9.1/netherframe/core/constructs/resources.py +869 -0
  80. netherframe_core-0.9.1/netherframe/core/constructs/specialized_resources.py +349 -0
  81. netherframe_core-0.9.1/netherframe/core/constructs/stack_bound.py +37 -0
  82. netherframe_core-0.9.1/netherframe/core/constructs/stack_registry.py +96 -0
  83. netherframe_core-0.9.1/netherframe/core/constructs/stack_synthesis.py +321 -0
  84. netherframe_core-0.9.1/netherframe/core/constructs/utilities.py +7 -0
  85. netherframe_core-0.9.1/netherframe/core/context.py +81 -0
  86. netherframe_core-0.9.1/netherframe/core/drift/__init__.py +140 -0
  87. netherframe_core-0.9.1/netherframe/core/drift/analysis_core.py +41 -0
  88. netherframe_core-0.9.1/netherframe/core/drift/detector.py +343 -0
  89. netherframe_core-0.9.1/netherframe/core/drift/errors.py +29 -0
  90. netherframe_core-0.9.1/netherframe/core/drift/import_id.py +116 -0
  91. netherframe_core-0.9.1/netherframe/core/drift/legacy_adapter.py +154 -0
  92. netherframe_core-0.9.1/netherframe/core/drift/locate.py +99 -0
  93. netherframe_core-0.9.1/netherframe/core/drift/models.py +52 -0
  94. netherframe_core-0.9.1/netherframe/core/drift/provider_clients.py +70 -0
  95. netherframe_core-0.9.1/netherframe/core/drift/provider_utils.py +202 -0
  96. netherframe_core-0.9.1/netherframe/core/drift/resource_analysis.py +173 -0
  97. netherframe_core-0.9.1/netherframe/core/drift/resource_parser.py +207 -0
  98. netherframe_core-0.9.1/netherframe/core/drift/state_comparison.py +152 -0
  99. netherframe_core-0.9.1/netherframe/core/drift/transformer.py +265 -0
  100. netherframe_core-0.9.1/netherframe/core/exceptions.py +192 -0
  101. netherframe_core-0.9.1/netherframe/core/execution/__init__.py +25 -0
  102. netherframe_core-0.9.1/netherframe/core/execution/adoption.py +235 -0
  103. netherframe_core-0.9.1/netherframe/core/execution/approval.py +159 -0
  104. netherframe_core-0.9.1/netherframe/core/execution/deferred_scheduling.py +258 -0
  105. netherframe_core-0.9.1/netherframe/core/execution/graph_apply_preparation.py +158 -0
  106. netherframe_core-0.9.1/netherframe/core/execution/graph_deferrals.py +68 -0
  107. netherframe_core-0.9.1/netherframe/core/execution/graph_destroy_preparation.py +139 -0
  108. netherframe_core-0.9.1/netherframe/core/execution/graph_import_preparation.py +133 -0
  109. netherframe_core-0.9.1/netherframe/core/execution/graph_inputs.py +82 -0
  110. netherframe_core-0.9.1/netherframe/core/execution/graph_intent_manifest.py +236 -0
  111. netherframe_core-0.9.1/netherframe/core/execution/graph_move_preparation.py +102 -0
  112. netherframe_core-0.9.1/netherframe/core/execution/graph_noop.py +35 -0
  113. netherframe_core-0.9.1/netherframe/core/execution/graph_plan_artifact.py +471 -0
  114. netherframe_core-0.9.1/netherframe/core/execution/graph_plan_coverage.py +415 -0
  115. netherframe_core-0.9.1/netherframe/core/execution/graph_plan_review.py +195 -0
  116. netherframe_core-0.9.1/netherframe/core/execution/graph_planning_candidate.py +261 -0
  117. netherframe_core-0.9.1/netherframe/core/execution/graph_planning_frontend.py +158 -0
  118. netherframe_core-0.9.1/netherframe/core/execution/graph_planning_values.py +169 -0
  119. netherframe_core-0.9.1/netherframe/core/execution/graph_state_migration.py +184 -0
  120. netherframe_core-0.9.1/netherframe/core/execution/hybrid.py +309 -0
  121. netherframe_core-0.9.1/netherframe/core/execution/hybrid_adoption.py +450 -0
  122. netherframe_core-0.9.1/netherframe/core/execution/hybrid_apply.py +1264 -0
  123. netherframe_core-0.9.1/netherframe/core/execution/hybrid_data_sources.py +211 -0
  124. netherframe_core-0.9.1/netherframe/core/execution/hybrid_ephemeral.py +342 -0
  125. netherframe_core-0.9.1/netherframe/core/execution/hybrid_graph_state.py +827 -0
  126. netherframe_core-0.9.1/netherframe/core/execution/hybrid_plan.py +799 -0
  127. netherframe_core-0.9.1/netherframe/core/execution/hybrid_planning.py +1937 -0
  128. netherframe_core-0.9.1/netherframe/core/execution/hybrid_providers.py +1098 -0
  129. netherframe_core-0.9.1/netherframe/core/execution/hybrid_refresh.py +408 -0
  130. netherframe_core-0.9.1/netherframe/core/execution/hybrid_results.py +141 -0
  131. netherframe_core-0.9.1/netherframe/core/execution/hybrid_runtime_checks.py +274 -0
  132. netherframe_core-0.9.1/netherframe/core/execution/hybrid_state_ops.py +564 -0
  133. netherframe_core-0.9.1/netherframe/core/execution/mode.py +21 -0
  134. netherframe_core-0.9.1/netherframe/core/execution/plan_artifacts.py +31 -0
  135. netherframe_core-0.9.1/netherframe/core/execution/planning_scope.py +109 -0
  136. netherframe_core-0.9.1/netherframe/core/execution/provenance_report.py +731 -0
  137. netherframe_core-0.9.1/netherframe/core/functions/__init__.py +39 -0
  138. netherframe_core-0.9.1/netherframe/core/functions/catalog_support.py +74 -0
  139. netherframe_core-0.9.1/netherframe/core/functions/function_base.py +193 -0
  140. netherframe_core-0.9.1/netherframe/core/functions/functions.py +81 -0
  141. netherframe_core-0.9.1/netherframe/core/functions/legacy_registry.py +92 -0
  142. netherframe_core-0.9.1/netherframe/core/infrastructure/__init__.py +10 -0
  143. netherframe_core-0.9.1/netherframe/core/infrastructure/discovery.py +350 -0
  144. netherframe_core-0.9.1/netherframe/core/infrastructure/resource_introspection.py +244 -0
  145. netherframe_core-0.9.1/netherframe/core/infrastructure/validation.py +149 -0
  146. netherframe_core-0.9.1/netherframe/core/linting/__init__.py +27 -0
  147. netherframe_core-0.9.1/netherframe/core/linting/core.py +280 -0
  148. netherframe_core-0.9.1/netherframe/core/linting/graph.py +100 -0
  149. netherframe_core-0.9.1/netherframe/core/linting/plugins.py +38 -0
  150. netherframe_core-0.9.1/netherframe/core/logging.py +37 -0
  151. netherframe_core-0.9.1/netherframe/core/logging_controls.py +121 -0
  152. netherframe_core-0.9.1/netherframe/core/logging_formatting.py +78 -0
  153. netherframe_core-0.9.1/netherframe/core/logging_setup.py +202 -0
  154. netherframe_core-0.9.1/netherframe/core/logging_state.py +43 -0
  155. netherframe_core-0.9.1/netherframe/core/logging_wrapper.py +222 -0
  156. netherframe_core-0.9.1/netherframe/core/orchestration/__init__.py +38 -0
  157. netherframe_core-0.9.1/netherframe/core/orchestration/app_script_generation.py +596 -0
  158. netherframe_core-0.9.1/netherframe/core/orchestration/event_loop.py +146 -0
  159. netherframe_core-0.9.1/netherframe/core/orchestration/execution_models.py +188 -0
  160. netherframe_core-0.9.1/netherframe/core/orchestration/execution_slots.py +204 -0
  161. netherframe_core-0.9.1/netherframe/core/orchestration/execution_strategies.py +287 -0
  162. netherframe_core-0.9.1/netherframe/core/orchestration/graph_authorization.py +72 -0
  163. netherframe_core-0.9.1/netherframe/core/orchestration/graph_completion.py +246 -0
  164. netherframe_core-0.9.1/netherframe/core/orchestration/graph_creations.py +122 -0
  165. netherframe_core-0.9.1/netherframe/core/orchestration/graph_normalization.py +262 -0
  166. netherframe_core-0.9.1/netherframe/core/orchestration/phased_artifacts.py +764 -0
  167. netherframe_core-0.9.1/netherframe/core/orchestration/planned_changes.py +245 -0
  168. netherframe_core-0.9.1/netherframe/core/orchestration/progress_reporting.py +109 -0
  169. netherframe_core-0.9.1/netherframe/core/orchestration/resource_operations.py +1406 -0
  170. netherframe_core-0.9.1/netherframe/core/orchestration/stack_ordering.py +72 -0
  171. netherframe_core-0.9.1/netherframe/core/orchestration/state_shaping.py +1138 -0
  172. netherframe_core-0.9.1/netherframe/core/orchestration/unified_orchestrator.py +618 -0
  173. netherframe_core-0.9.1/netherframe/core/phases/__init__.py +35 -0
  174. netherframe_core-0.9.1/netherframe/core/phases/analyzer.py +121 -0
  175. netherframe_core-0.9.1/netherframe/core/phases/cycle_analysis.py +162 -0
  176. netherframe_core-0.9.1/netherframe/core/phases/cycle_breaking.py +32 -0
  177. netherframe_core-0.9.1/netherframe/core/phases/dependency_extraction.py +143 -0
  178. netherframe_core-0.9.1/netherframe/core/phases/dependency_graph.py +118 -0
  179. netherframe_core-0.9.1/netherframe/core/phases/graph_algorithms.py +402 -0
  180. netherframe_core-0.9.1/netherframe/core/phases/models.py +268 -0
  181. netherframe_core-0.9.1/netherframe/core/phases/omission.py +83 -0
  182. netherframe_core-0.9.1/netherframe/core/phases/parallel_groups.py +37 -0
  183. netherframe_core-0.9.1/netherframe/core/phases/planner.py +236 -0
  184. netherframe_core-0.9.1/netherframe/core/phases/serialization.py +56 -0
  185. netherframe_core-0.9.1/netherframe/core/phases/stack_dependency_plan.py +89 -0
  186. netherframe_core-0.9.1/netherframe/core/providers/__init__.py +22 -0
  187. netherframe_core-0.9.1/netherframe/core/providers/builtin_provider.py +367 -0
  188. netherframe_core-0.9.1/netherframe/core/providers/generators.py +248 -0
  189. netherframe_core-0.9.1/netherframe/core/providers/graph_identity.py +222 -0
  190. netherframe_core-0.9.1/netherframe/core/providers/graph_planning.py +173 -0
  191. netherframe_core-0.9.1/netherframe/core/providers/plan_reuse.py +106 -0
  192. netherframe_core-0.9.1/netherframe/core/providers/provider_address.py +248 -0
  193. netherframe_core-0.9.1/netherframe/core/providers/provider_binary_resolver.py +128 -0
  194. netherframe_core-0.9.1/netherframe/core/providers/provider_handshake.py +146 -0
  195. netherframe_core-0.9.1/netherframe/core/providers/provider_lifecycle.py +153 -0
  196. netherframe_core-0.9.1/netherframe/core/providers/provider_loader.py +478 -0
  197. netherframe_core-0.9.1/netherframe/core/providers/provider_models.py +89 -0
  198. netherframe_core-0.9.1/netherframe/core/providers/provider_operation_context.py +291 -0
  199. netherframe_core-0.9.1/netherframe/core/providers/provider_protocol.py +431 -0
  200. netherframe_core-0.9.1/netherframe/core/providers/provider_registry.py +334 -0
  201. netherframe_core-0.9.1/netherframe/core/providers/provider_resolution.py +298 -0
  202. netherframe_core-0.9.1/netherframe/core/providers/provider_resource_operations.py +609 -0
  203. netherframe_core-0.9.1/netherframe/core/providers/provider_rpc_support.py +91 -0
  204. netherframe_core-0.9.1/netherframe/core/providers/provider_schema.py +210 -0
  205. netherframe_core-0.9.1/netherframe/core/providers/provider_session.py +58 -0
  206. netherframe_core-0.9.1/netherframe/core/providers/provider_session_io.py +101 -0
  207. netherframe_core-0.9.1/netherframe/core/providers/provider_session_models.py +31 -0
  208. netherframe_core-0.9.1/netherframe/core/providers/provider_session_shutdown.py +67 -0
  209. netherframe_core-0.9.1/netherframe/core/providers/provider_session_startup.py +182 -0
  210. netherframe_core-0.9.1/netherframe/core/providers/provider_settings.py +32 -0
  211. netherframe_core-0.9.1/netherframe/core/providers/provider_supplemental_operations.py +492 -0
  212. netherframe_core-0.9.1/netherframe/core/providers/provider_value_shaper.py +75 -0
  213. netherframe_core-0.9.1/netherframe/core/providers/state_normalization.py +57 -0
  214. netherframe_core-0.9.1/netherframe/core/providers/state_refresh.py +105 -0
  215. netherframe_core-0.9.1/netherframe/core/providers/tls_generators.py +521 -0
  216. netherframe_core-0.9.1/netherframe/core/py.typed +0 -0
  217. netherframe_core-0.9.1/netherframe/core/runtime/__init__.py +39 -0
  218. netherframe_core-0.9.1/netherframe/core/runtime/hybrid_runtime.py +710 -0
  219. netherframe_core-0.9.1/netherframe/core/runtime/runtime.py +59 -0
  220. netherframe_core-0.9.1/netherframe/core/runtime/runtime_api.py +173 -0
  221. netherframe_core-0.9.1/netherframe/core/runtime/runtime_binding.py +46 -0
  222. netherframe_core-0.9.1/netherframe/core/runtime/runtime_command.py +64 -0
  223. netherframe_core-0.9.1/netherframe/core/runtime/terraform_runtime.py +262 -0
  224. netherframe_core-0.9.1/netherframe/core/runtime/terraform_runtime_binding.py +47 -0
  225. netherframe_core-0.9.1/netherframe/core/runtime/terraform_runtime_query.py +62 -0
  226. netherframe_core-0.9.1/netherframe/core/serialization/__init__.py +51 -0
  227. netherframe_core-0.9.1/netherframe/core/serialization/caching_v2.py +155 -0
  228. netherframe_core-0.9.1/netherframe/core/serialization/cty_msgpack.py +819 -0
  229. netherframe_core-0.9.1/netherframe/core/serialization/json_encoder.py +81 -0
  230. netherframe_core-0.9.1/netherframe/core/serialization/message_encoding.py +174 -0
  231. netherframe_core-0.9.1/netherframe/core/serialization/message_value_utils.py +44 -0
  232. netherframe_core-0.9.1/netherframe/core/serialization/orjson_compat.py +103 -0
  233. netherframe_core-0.9.1/netherframe/core/serialization/schema_cache.py +468 -0
  234. netherframe_core-0.9.1/netherframe/core/serialization/schema_utils.py +159 -0
  235. netherframe_core-0.9.1/netherframe/core/serialization/stack_config_builder.py +222 -0
  236. netherframe_core-0.9.1/netherframe/core/serialization/unknown_values.py +192 -0
  237. netherframe_core-0.9.1/netherframe/core/state_migration.py +15 -0
  238. netherframe_core-0.9.1/netherframe/core/state_migration_backend.py +223 -0
  239. netherframe_core-0.9.1/netherframe/core/state_migration_conversion.py +234 -0
  240. netherframe_core-0.9.1/netherframe/core/state_migration_inspection.py +147 -0
  241. netherframe_core-0.9.1/netherframe/core/state_migration_types.py +9 -0
  242. netherframe_core-0.9.1/netherframe/core/synthesis/__init__.py +21 -0
  243. netherframe_core-0.9.1/netherframe/core/synthesis/hcl_blocks.py +149 -0
  244. netherframe_core-0.9.1/netherframe/core/synthesis/hcl_formatting.py +148 -0
  245. netherframe_core-0.9.1/netherframe/core/synthesis/hcl_writer.py +408 -0
  246. netherframe_core-0.9.1/netherframe/core/synthesis/import_generator.py +172 -0
  247. netherframe_core-0.9.1/netherframe/core/synthesis/references.py +95 -0
  248. netherframe_core-0.9.1/netherframe/core/synthesis/stack_artifacts.py +143 -0
  249. netherframe_core-0.9.1/netherframe/core/synthesis/validation_reports.py +46 -0
  250. netherframe_core-0.9.1/netherframe/core/testing/__init__.py +1 -0
  251. netherframe_core-0.9.1/netherframe/core/testing/env.py +13 -0
  252. netherframe_core-0.9.1/netherframe/core/testing/fakecloud.py +622 -0
  253. netherframe_core-0.9.1/netherframe/core/testing/graph_memory.py +1476 -0
  254. netherframe_core-0.9.1/netherframe/core/testing/graph_scenarios.py +377 -0
  255. netherframe_core-0.9.1/netherframe/core/testing/log_capture.py +34 -0
  256. netherframe_core-0.9.1/netherframe/core/testing/patching.py +17 -0
  257. netherframe_core-0.9.1/netherframe/core/testing/provider_test_helpers.py +33 -0
  258. netherframe_core-0.9.1/netherframe/core/testing/pytest_fakecloud.py +59 -0
  259. netherframe_core-0.9.1/netherframe/core/testing/pytest_workspace.py +78 -0
  260. netherframe_core-0.9.1/netherframe/core/testing/schema_cache.py +44 -0
  261. netherframe_core-0.9.1/netherframe/core/testing/state_backend_contract.py +556 -0
  262. netherframe_core-0.9.1/netherframe/core/testing/terraform_cache.py +41 -0
  263. netherframe_core-0.9.1/netherframe/core/values/__init__.py +12 -0
  264. netherframe_core-0.9.1/netherframe/core/values/address.py +345 -0
  265. netherframe_core-0.9.1/netherframe/core/values/basic_resolver.py +133 -0
  266. netherframe_core-0.9.1/netherframe/core/values/compiled.py +318 -0
  267. netherframe_core-0.9.1/netherframe/core/values/ephemeral_values.py +37 -0
  268. netherframe_core-0.9.1/netherframe/core/values/expressions.py +1112 -0
  269. netherframe_core-0.9.1/netherframe/core/values/hcl_expressions.py +272 -0
  270. netherframe_core-0.9.1/netherframe/core/values/intent.py +141 -0
  271. netherframe_core-0.9.1/netherframe/core/values/observation_cache.py +90 -0
  272. netherframe_core-0.9.1/netherframe/core/values/provenance.py +545 -0
  273. netherframe_core-0.9.1/netherframe/core/values/read_scopes.py +73 -0
  274. netherframe_core-0.9.1/netherframe/core/values/resolver.py +37 -0
  275. netherframe_core-0.9.1/netherframe/core/values/runtime_impl.py +168 -0
  276. netherframe_core-0.9.1/netherframe/core/values/runtime_value.py +129 -0
  277. netherframe_core-0.9.1/netherframe/core/values/runtime_value_ops.py +454 -0
  278. netherframe_core-0.9.1/netherframe/core/values/runtime_value_wrapped.py +9 -0
  279. netherframe_core-0.9.1/netherframe/core/values/terraform_operations.py +851 -0
  280. netherframe_core-0.9.1/netherframe/core/values/terraform_syntax.py +396 -0
  281. netherframe_core-0.9.1/netherframe/core/values/tokens.py +95 -0
  282. netherframe_core-0.9.1/netherframe_nf_alias/__init__.py +82 -0
  283. netherframe_core-0.9.1/nf/core/__init__.py +4 -0
  284. netherframe_core-0.9.1/nf/core/autoscope.py +4 -0
  285. netherframe_core-0.9.1/nf/core/backends/__init__.py +4 -0
  286. netherframe_core-0.9.1/nf/core/backends/backend_bootstrap.py +4 -0
  287. netherframe_core-0.9.1/nf/core/backends/backend_chain.py +4 -0
  288. netherframe_core-0.9.1/nf/core/backends/backend_chain_models.py +4 -0
  289. netherframe_core-0.9.1/nf/core/backends/backend_chain_policy.py +4 -0
  290. netherframe_core-0.9.1/nf/core/backends/backend_config.py +4 -0
  291. netherframe_core-0.9.1/nf/core/backends/backend_literals.py +4 -0
  292. netherframe_core-0.9.1/nf/core/backends/backend_registry.py +4 -0
  293. netherframe_core-0.9.1/nf/core/backends/document_state_backend.py +4 -0
  294. netherframe_core-0.9.1/nf/core/backends/graph_authorization.py +4 -0
  295. netherframe_core-0.9.1/nf/core/backends/graph_baseline.py +4 -0
  296. netherframe_core-0.9.1/nf/core/backends/graph_checkpoint.py +4 -0
  297. netherframe_core-0.9.1/nf/core/backends/graph_completion.py +4 -0
  298. netherframe_core-0.9.1/nf/core/backends/graph_diagnostics.py +4 -0
  299. netherframe_core-0.9.1/nf/core/backends/graph_edges.py +4 -0
  300. netherframe_core-0.9.1/nf/core/backends/graph_errored_state.py +4 -0
  301. netherframe_core-0.9.1/nf/core/backends/graph_execution_rows.py +4 -0
  302. netherframe_core-0.9.1/nf/core/backends/graph_footprints.py +4 -0
  303. netherframe_core-0.9.1/nf/core/backends/graph_history.py +4 -0
  304. netherframe_core-0.9.1/nf/core/backends/graph_identity.py +4 -0
  305. netherframe_core-0.9.1/nf/core/backends/graph_inputs.py +4 -0
  306. netherframe_core-0.9.1/nf/core/backends/graph_kept_return.py +4 -0
  307. netherframe_core-0.9.1/nf/core/backends/graph_leases.py +4 -0
  308. netherframe_core-0.9.1/nf/core/backends/graph_merge.py +4 -0
  309. netherframe_core-0.9.1/nf/core/backends/graph_migration.py +4 -0
  310. netherframe_core-0.9.1/nf/core/backends/graph_moves.py +4 -0
  311. netherframe_core-0.9.1/nf/core/backends/graph_object_guard.py +4 -0
  312. netherframe_core-0.9.1/nf/core/backends/graph_ownership.py +4 -0
  313. netherframe_core-0.9.1/nf/core/backends/graph_plan_basis.py +4 -0
  314. netherframe_core-0.9.1/nf/core/backends/graph_plan_guard.py +4 -0
  315. netherframe_core-0.9.1/nf/core/backends/graph_planning.py +4 -0
  316. netherframe_core-0.9.1/nf/core/backends/graph_planning_context.py +4 -0
  317. netherframe_core-0.9.1/nf/core/backends/graph_planning_rounds.py +4 -0
  318. netherframe_core-0.9.1/nf/core/backends/graph_planning_selection.py +4 -0
  319. netherframe_core-0.9.1/nf/core/backends/graph_recovery.py +4 -0
  320. netherframe_core-0.9.1/nf/core/backends/graph_retention.py +4 -0
  321. netherframe_core-0.9.1/nf/core/backends/graph_settings.py +4 -0
  322. netherframe_core-0.9.1/nf/core/backends/graph_state.py +4 -0
  323. netherframe_core-0.9.1/nf/core/backends/graph_state_engine.py +4 -0
  324. netherframe_core-0.9.1/nf/core/backends/local_backend.py +4 -0
  325. netherframe_core-0.9.1/nf/core/backends/lock_heartbeat.py +4 -0
  326. netherframe_core-0.9.1/nf/core/backends/state_backend.py +4 -0
  327. netherframe_core-0.9.1/nf/core/backends/state_engine.py +4 -0
  328. netherframe_core-0.9.1/nf/core/backends/state_engine_runtime.py +4 -0
  329. netherframe_core-0.9.1/nf/core/backends/state_lock.py +4 -0
  330. netherframe_core-0.9.1/nf/core/backends/state_models.py +4 -0
  331. netherframe_core-0.9.1/nf/core/config/__init__.py +4 -0
  332. netherframe_core-0.9.1/nf/core/config/config.py +4 -0
  333. netherframe_core-0.9.1/nf/core/config/config_discovery.py +4 -0
  334. netherframe_core-0.9.1/nf/core/config/config_normalization.py +4 -0
  335. netherframe_core-0.9.1/nf/core/config/config_parsing.py +4 -0
  336. netherframe_core-0.9.1/nf/core/config/config_values.py +4 -0
  337. netherframe_core-0.9.1/nf/core/config/hybrid_settings.py +4 -0
  338. netherframe_core-0.9.1/nf/core/config/ignore_changes.py +4 -0
  339. netherframe_core-0.9.1/nf/core/config/normalization_coercion.py +4 -0
  340. netherframe_core-0.9.1/nf/core/config/normalization_types.py +4 -0
  341. netherframe_core-0.9.1/nf/core/config/types.py +4 -0
  342. netherframe_core-0.9.1/nf/core/constructs/__init__.py +4 -0
  343. netherframe_core-0.9.1/nf/core/constructs/app_stack.py +4 -0
  344. netherframe_core-0.9.1/nf/core/constructs/app_synthesis.py +4 -0
  345. netherframe_core-0.9.1/nf/core/constructs/attributes.py +4 -0
  346. netherframe_core-0.9.1/nf/core/constructs/backend_base.py +4 -0
  347. netherframe_core-0.9.1/nf/core/constructs/base_construct.py +4 -0
  348. netherframe_core-0.9.1/nf/core/constructs/cross_stack_refs.py +4 -0
  349. netherframe_core-0.9.1/nf/core/constructs/framework_settings.py +4 -0
  350. netherframe_core-0.9.1/nf/core/constructs/generated_value.py +4 -0
  351. netherframe_core-0.9.1/nf/core/constructs/infrastructure.py +4 -0
  352. netherframe_core-0.9.1/nf/core/constructs/infrastructure_policy.py +4 -0
  353. netherframe_core-0.9.1/nf/core/constructs/infrastructure_support.py +4 -0
  354. netherframe_core-0.9.1/nf/core/constructs/meta.py +4 -0
  355. netherframe_core-0.9.1/nf/core/constructs/provider_construct.py +4 -0
  356. netherframe_core-0.9.1/nf/core/constructs/resolution.py +4 -0
  357. netherframe_core-0.9.1/nf/core/constructs/resources.py +4 -0
  358. netherframe_core-0.9.1/nf/core/constructs/specialized_resources.py +4 -0
  359. netherframe_core-0.9.1/nf/core/constructs/stack_bound.py +4 -0
  360. netherframe_core-0.9.1/nf/core/constructs/stack_registry.py +4 -0
  361. netherframe_core-0.9.1/nf/core/constructs/stack_synthesis.py +4 -0
  362. netherframe_core-0.9.1/nf/core/constructs/utilities.py +4 -0
  363. netherframe_core-0.9.1/nf/core/context.py +4 -0
  364. netherframe_core-0.9.1/nf/core/drift/__init__.py +4 -0
  365. netherframe_core-0.9.1/nf/core/drift/analysis_core.py +4 -0
  366. netherframe_core-0.9.1/nf/core/drift/detector.py +4 -0
  367. netherframe_core-0.9.1/nf/core/drift/errors.py +4 -0
  368. netherframe_core-0.9.1/nf/core/drift/import_id.py +4 -0
  369. netherframe_core-0.9.1/nf/core/drift/legacy_adapter.py +4 -0
  370. netherframe_core-0.9.1/nf/core/drift/locate.py +4 -0
  371. netherframe_core-0.9.1/nf/core/drift/models.py +4 -0
  372. netherframe_core-0.9.1/nf/core/drift/provider_clients.py +4 -0
  373. netherframe_core-0.9.1/nf/core/drift/provider_utils.py +4 -0
  374. netherframe_core-0.9.1/nf/core/drift/resource_analysis.py +4 -0
  375. netherframe_core-0.9.1/nf/core/drift/resource_parser.py +4 -0
  376. netherframe_core-0.9.1/nf/core/drift/state_comparison.py +4 -0
  377. netherframe_core-0.9.1/nf/core/drift/transformer.py +4 -0
  378. netherframe_core-0.9.1/nf/core/exceptions.py +4 -0
  379. netherframe_core-0.9.1/nf/core/execution/__init__.py +4 -0
  380. netherframe_core-0.9.1/nf/core/execution/adoption.py +4 -0
  381. netherframe_core-0.9.1/nf/core/execution/approval.py +4 -0
  382. netherframe_core-0.9.1/nf/core/execution/deferred_scheduling.py +4 -0
  383. netherframe_core-0.9.1/nf/core/execution/graph_apply_preparation.py +4 -0
  384. netherframe_core-0.9.1/nf/core/execution/graph_deferrals.py +4 -0
  385. netherframe_core-0.9.1/nf/core/execution/graph_destroy_preparation.py +4 -0
  386. netherframe_core-0.9.1/nf/core/execution/graph_import_preparation.py +4 -0
  387. netherframe_core-0.9.1/nf/core/execution/graph_inputs.py +4 -0
  388. netherframe_core-0.9.1/nf/core/execution/graph_intent_manifest.py +4 -0
  389. netherframe_core-0.9.1/nf/core/execution/graph_move_preparation.py +4 -0
  390. netherframe_core-0.9.1/nf/core/execution/graph_noop.py +4 -0
  391. netherframe_core-0.9.1/nf/core/execution/graph_plan_artifact.py +4 -0
  392. netherframe_core-0.9.1/nf/core/execution/graph_plan_coverage.py +4 -0
  393. netherframe_core-0.9.1/nf/core/execution/graph_plan_review.py +4 -0
  394. netherframe_core-0.9.1/nf/core/execution/graph_planning_candidate.py +4 -0
  395. netherframe_core-0.9.1/nf/core/execution/graph_planning_frontend.py +4 -0
  396. netherframe_core-0.9.1/nf/core/execution/graph_planning_values.py +4 -0
  397. netherframe_core-0.9.1/nf/core/execution/graph_state_migration.py +4 -0
  398. netherframe_core-0.9.1/nf/core/execution/hybrid.py +4 -0
  399. netherframe_core-0.9.1/nf/core/execution/hybrid_adoption.py +4 -0
  400. netherframe_core-0.9.1/nf/core/execution/hybrid_apply.py +4 -0
  401. netherframe_core-0.9.1/nf/core/execution/hybrid_data_sources.py +4 -0
  402. netherframe_core-0.9.1/nf/core/execution/hybrid_ephemeral.py +4 -0
  403. netherframe_core-0.9.1/nf/core/execution/hybrid_graph_state.py +4 -0
  404. netherframe_core-0.9.1/nf/core/execution/hybrid_plan.py +4 -0
  405. netherframe_core-0.9.1/nf/core/execution/hybrid_planning.py +4 -0
  406. netherframe_core-0.9.1/nf/core/execution/hybrid_providers.py +4 -0
  407. netherframe_core-0.9.1/nf/core/execution/hybrid_refresh.py +4 -0
  408. netherframe_core-0.9.1/nf/core/execution/hybrid_results.py +4 -0
  409. netherframe_core-0.9.1/nf/core/execution/hybrid_runtime_checks.py +4 -0
  410. netherframe_core-0.9.1/nf/core/execution/hybrid_state_ops.py +4 -0
  411. netherframe_core-0.9.1/nf/core/execution/mode.py +4 -0
  412. netherframe_core-0.9.1/nf/core/execution/plan_artifacts.py +4 -0
  413. netherframe_core-0.9.1/nf/core/execution/planning_scope.py +4 -0
  414. netherframe_core-0.9.1/nf/core/execution/provenance_report.py +4 -0
  415. netherframe_core-0.9.1/nf/core/functions/__init__.py +4 -0
  416. netherframe_core-0.9.1/nf/core/functions/catalog_support.py +4 -0
  417. netherframe_core-0.9.1/nf/core/functions/function_base.py +4 -0
  418. netherframe_core-0.9.1/nf/core/functions/functions.py +4 -0
  419. netherframe_core-0.9.1/nf/core/functions/legacy_registry.py +4 -0
  420. netherframe_core-0.9.1/nf/core/infrastructure/__init__.py +4 -0
  421. netherframe_core-0.9.1/nf/core/infrastructure/discovery.py +4 -0
  422. netherframe_core-0.9.1/nf/core/infrastructure/resource_introspection.py +4 -0
  423. netherframe_core-0.9.1/nf/core/infrastructure/validation.py +4 -0
  424. netherframe_core-0.9.1/nf/core/linting/__init__.py +4 -0
  425. netherframe_core-0.9.1/nf/core/linting/core.py +4 -0
  426. netherframe_core-0.9.1/nf/core/linting/graph.py +4 -0
  427. netherframe_core-0.9.1/nf/core/linting/plugins.py +4 -0
  428. netherframe_core-0.9.1/nf/core/logging.py +4 -0
  429. netherframe_core-0.9.1/nf/core/logging_controls.py +4 -0
  430. netherframe_core-0.9.1/nf/core/logging_formatting.py +4 -0
  431. netherframe_core-0.9.1/nf/core/logging_setup.py +4 -0
  432. netherframe_core-0.9.1/nf/core/logging_state.py +4 -0
  433. netherframe_core-0.9.1/nf/core/logging_wrapper.py +4 -0
  434. netherframe_core-0.9.1/nf/core/orchestration/__init__.py +4 -0
  435. netherframe_core-0.9.1/nf/core/orchestration/app_script_generation.py +4 -0
  436. netherframe_core-0.9.1/nf/core/orchestration/event_loop.py +4 -0
  437. netherframe_core-0.9.1/nf/core/orchestration/execution_models.py +4 -0
  438. netherframe_core-0.9.1/nf/core/orchestration/execution_slots.py +4 -0
  439. netherframe_core-0.9.1/nf/core/orchestration/execution_strategies.py +4 -0
  440. netherframe_core-0.9.1/nf/core/orchestration/graph_authorization.py +4 -0
  441. netherframe_core-0.9.1/nf/core/orchestration/graph_completion.py +4 -0
  442. netherframe_core-0.9.1/nf/core/orchestration/graph_creations.py +4 -0
  443. netherframe_core-0.9.1/nf/core/orchestration/graph_normalization.py +4 -0
  444. netherframe_core-0.9.1/nf/core/orchestration/phased_artifacts.py +4 -0
  445. netherframe_core-0.9.1/nf/core/orchestration/planned_changes.py +4 -0
  446. netherframe_core-0.9.1/nf/core/orchestration/progress_reporting.py +4 -0
  447. netherframe_core-0.9.1/nf/core/orchestration/resource_operations.py +4 -0
  448. netherframe_core-0.9.1/nf/core/orchestration/stack_ordering.py +4 -0
  449. netherframe_core-0.9.1/nf/core/orchestration/state_shaping.py +4 -0
  450. netherframe_core-0.9.1/nf/core/orchestration/unified_orchestrator.py +4 -0
  451. netherframe_core-0.9.1/nf/core/phases/__init__.py +4 -0
  452. netherframe_core-0.9.1/nf/core/phases/analyzer.py +4 -0
  453. netherframe_core-0.9.1/nf/core/phases/cycle_analysis.py +4 -0
  454. netherframe_core-0.9.1/nf/core/phases/cycle_breaking.py +4 -0
  455. netherframe_core-0.9.1/nf/core/phases/dependency_extraction.py +4 -0
  456. netherframe_core-0.9.1/nf/core/phases/dependency_graph.py +4 -0
  457. netherframe_core-0.9.1/nf/core/phases/graph_algorithms.py +4 -0
  458. netherframe_core-0.9.1/nf/core/phases/models.py +4 -0
  459. netherframe_core-0.9.1/nf/core/phases/omission.py +4 -0
  460. netherframe_core-0.9.1/nf/core/phases/parallel_groups.py +4 -0
  461. netherframe_core-0.9.1/nf/core/phases/planner.py +4 -0
  462. netherframe_core-0.9.1/nf/core/phases/serialization.py +4 -0
  463. netherframe_core-0.9.1/nf/core/phases/stack_dependency_plan.py +4 -0
  464. netherframe_core-0.9.1/nf/core/providers/__init__.py +4 -0
  465. netherframe_core-0.9.1/nf/core/providers/builtin_provider.py +4 -0
  466. netherframe_core-0.9.1/nf/core/providers/generators.py +4 -0
  467. netherframe_core-0.9.1/nf/core/providers/graph_identity.py +4 -0
  468. netherframe_core-0.9.1/nf/core/providers/graph_planning.py +4 -0
  469. netherframe_core-0.9.1/nf/core/providers/plan_reuse.py +4 -0
  470. netherframe_core-0.9.1/nf/core/providers/provider_address.py +4 -0
  471. netherframe_core-0.9.1/nf/core/providers/provider_binary_resolver.py +4 -0
  472. netherframe_core-0.9.1/nf/core/providers/provider_handshake.py +4 -0
  473. netherframe_core-0.9.1/nf/core/providers/provider_lifecycle.py +4 -0
  474. netherframe_core-0.9.1/nf/core/providers/provider_loader.py +4 -0
  475. netherframe_core-0.9.1/nf/core/providers/provider_models.py +4 -0
  476. netherframe_core-0.9.1/nf/core/providers/provider_operation_context.py +4 -0
  477. netherframe_core-0.9.1/nf/core/providers/provider_protocol.py +4 -0
  478. netherframe_core-0.9.1/nf/core/providers/provider_registry.py +4 -0
  479. netherframe_core-0.9.1/nf/core/providers/provider_resolution.py +4 -0
  480. netherframe_core-0.9.1/nf/core/providers/provider_resource_operations.py +4 -0
  481. netherframe_core-0.9.1/nf/core/providers/provider_rpc_support.py +4 -0
  482. netherframe_core-0.9.1/nf/core/providers/provider_schema.py +4 -0
  483. netherframe_core-0.9.1/nf/core/providers/provider_session.py +4 -0
  484. netherframe_core-0.9.1/nf/core/providers/provider_session_io.py +4 -0
  485. netherframe_core-0.9.1/nf/core/providers/provider_session_models.py +4 -0
  486. netherframe_core-0.9.1/nf/core/providers/provider_session_shutdown.py +4 -0
  487. netherframe_core-0.9.1/nf/core/providers/provider_session_startup.py +4 -0
  488. netherframe_core-0.9.1/nf/core/providers/provider_settings.py +4 -0
  489. netherframe_core-0.9.1/nf/core/providers/provider_supplemental_operations.py +4 -0
  490. netherframe_core-0.9.1/nf/core/providers/provider_value_shaper.py +4 -0
  491. netherframe_core-0.9.1/nf/core/providers/state_normalization.py +4 -0
  492. netherframe_core-0.9.1/nf/core/providers/state_refresh.py +4 -0
  493. netherframe_core-0.9.1/nf/core/providers/tls_generators.py +4 -0
  494. netherframe_core-0.9.1/nf/core/py.typed +0 -0
  495. netherframe_core-0.9.1/nf/core/runtime/__init__.py +4 -0
  496. netherframe_core-0.9.1/nf/core/runtime/hybrid_runtime.py +4 -0
  497. netherframe_core-0.9.1/nf/core/runtime/runtime.py +4 -0
  498. netherframe_core-0.9.1/nf/core/runtime/runtime_api.py +4 -0
  499. netherframe_core-0.9.1/nf/core/runtime/runtime_binding.py +4 -0
  500. netherframe_core-0.9.1/nf/core/runtime/runtime_command.py +4 -0
  501. netherframe_core-0.9.1/nf/core/runtime/terraform_runtime.py +4 -0
  502. netherframe_core-0.9.1/nf/core/runtime/terraform_runtime_binding.py +4 -0
  503. netherframe_core-0.9.1/nf/core/runtime/terraform_runtime_query.py +4 -0
  504. netherframe_core-0.9.1/nf/core/serialization/__init__.py +4 -0
  505. netherframe_core-0.9.1/nf/core/serialization/caching_v2.py +4 -0
  506. netherframe_core-0.9.1/nf/core/serialization/cty_msgpack.py +4 -0
  507. netherframe_core-0.9.1/nf/core/serialization/json_encoder.py +4 -0
  508. netherframe_core-0.9.1/nf/core/serialization/message_encoding.py +4 -0
  509. netherframe_core-0.9.1/nf/core/serialization/message_value_utils.py +4 -0
  510. netherframe_core-0.9.1/nf/core/serialization/orjson_compat.py +4 -0
  511. netherframe_core-0.9.1/nf/core/serialization/schema_cache.py +4 -0
  512. netherframe_core-0.9.1/nf/core/serialization/schema_utils.py +4 -0
  513. netherframe_core-0.9.1/nf/core/serialization/stack_config_builder.py +4 -0
  514. netherframe_core-0.9.1/nf/core/serialization/unknown_values.py +4 -0
  515. netherframe_core-0.9.1/nf/core/state_migration.py +4 -0
  516. netherframe_core-0.9.1/nf/core/state_migration_backend.py +4 -0
  517. netherframe_core-0.9.1/nf/core/state_migration_conversion.py +4 -0
  518. netherframe_core-0.9.1/nf/core/state_migration_inspection.py +4 -0
  519. netherframe_core-0.9.1/nf/core/state_migration_types.py +4 -0
  520. netherframe_core-0.9.1/nf/core/synthesis/__init__.py +4 -0
  521. netherframe_core-0.9.1/nf/core/synthesis/hcl_blocks.py +4 -0
  522. netherframe_core-0.9.1/nf/core/synthesis/hcl_formatting.py +4 -0
  523. netherframe_core-0.9.1/nf/core/synthesis/hcl_writer.py +4 -0
  524. netherframe_core-0.9.1/nf/core/synthesis/import_generator.py +4 -0
  525. netherframe_core-0.9.1/nf/core/synthesis/references.py +4 -0
  526. netherframe_core-0.9.1/nf/core/synthesis/stack_artifacts.py +4 -0
  527. netherframe_core-0.9.1/nf/core/synthesis/validation_reports.py +4 -0
  528. netherframe_core-0.9.1/nf/core/testing/__init__.py +4 -0
  529. netherframe_core-0.9.1/nf/core/testing/env.py +4 -0
  530. netherframe_core-0.9.1/nf/core/testing/fakecloud.py +4 -0
  531. netherframe_core-0.9.1/nf/core/testing/graph_memory.py +4 -0
  532. netherframe_core-0.9.1/nf/core/testing/graph_scenarios.py +4 -0
  533. netherframe_core-0.9.1/nf/core/testing/log_capture.py +4 -0
  534. netherframe_core-0.9.1/nf/core/testing/patching.py +4 -0
  535. netherframe_core-0.9.1/nf/core/testing/provider_test_helpers.py +4 -0
  536. netherframe_core-0.9.1/nf/core/testing/pytest_fakecloud.py +4 -0
  537. netherframe_core-0.9.1/nf/core/testing/pytest_workspace.py +4 -0
  538. netherframe_core-0.9.1/nf/core/testing/schema_cache.py +4 -0
  539. netherframe_core-0.9.1/nf/core/testing/state_backend_contract.py +4 -0
  540. netherframe_core-0.9.1/nf/core/testing/terraform_cache.py +4 -0
  541. netherframe_core-0.9.1/nf/core/values/__init__.py +4 -0
  542. netherframe_core-0.9.1/nf/core/values/address.py +4 -0
  543. netherframe_core-0.9.1/nf/core/values/basic_resolver.py +4 -0
  544. netherframe_core-0.9.1/nf/core/values/compiled.py +4 -0
  545. netherframe_core-0.9.1/nf/core/values/ephemeral_values.py +4 -0
  546. netherframe_core-0.9.1/nf/core/values/expressions.py +4 -0
  547. netherframe_core-0.9.1/nf/core/values/hcl_expressions.py +4 -0
  548. netherframe_core-0.9.1/nf/core/values/intent.py +4 -0
  549. netherframe_core-0.9.1/nf/core/values/observation_cache.py +4 -0
  550. netherframe_core-0.9.1/nf/core/values/provenance.py +4 -0
  551. netherframe_core-0.9.1/nf/core/values/read_scopes.py +4 -0
  552. netherframe_core-0.9.1/nf/core/values/resolver.py +4 -0
  553. netherframe_core-0.9.1/nf/core/values/runtime_impl.py +4 -0
  554. netherframe_core-0.9.1/nf/core/values/runtime_value.py +4 -0
  555. netherframe_core-0.9.1/nf/core/values/runtime_value_ops.py +4 -0
  556. netherframe_core-0.9.1/nf/core/values/runtime_value_wrapped.py +4 -0
  557. netherframe_core-0.9.1/nf/core/values/terraform_operations.py +4 -0
  558. netherframe_core-0.9.1/nf/core/values/terraform_syntax.py +4 -0
  559. netherframe_core-0.9.1/nf/core/values/tokens.py +4 -0
  560. netherframe_core-0.9.1/pyproject.toml +132 -0
  561. netherframe_core-0.9.1/pyproject.toml.orig +135 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Netherframe
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, 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,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,115 @@
1
+ Metadata-Version: 2.4
2
+ Name: netherframe.core
3
+ Version: 0.9.1
4
+ Summary: Netherframe - Infrastructure as Code framework using Python
5
+ Author: Sourabh Cheedella
6
+ Author-email: Sourabh Cheedella <cheedella.sourabh@gmail.com>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3.14
12
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
13
+ Classifier: Topic :: System :: Systems Administration
14
+ Requires-Dist: anyio>=4.16.0
15
+ Requires-Dist: sniffio>=1.3.1
16
+ Requires-Dist: orjson>=3.13.0
17
+ Requires-Dist: packaging>=26.3
18
+ Requires-Dist: pyyaml>=6.0.3
19
+ Requires-Dist: netherframe-protocol-tfplugin>=0.3.0
20
+ Requires-Dist: netherframe-codec-autoid>=0.3.0
21
+ Requires-Dist: grpcio>=1.85.1
22
+ Requires-Dist: protobuf>=7.36.2
23
+ Requires-Dist: msgpack>=1.2.4
24
+ Requires-Dist: libcst>=1.9.0
25
+ Requires-Dist: lazy-loader>=0.6
26
+ Requires-Dist: loguru>=0.8.0
27
+ Requires-Dist: cryptography>=50.0.2
28
+ Requires-Dist: netherframe-ext-aws>=0.2.0 ; extra == 'aws'
29
+ Requires-Dist: requests>=2.34.2 ; extra == 'dev'
30
+ Requires-Dist: pytest-mock>=3.17.0 ; extra == 'dev'
31
+ Requires-Dist: psutil>=7.2.2 ; extra == 'dev'
32
+ Requires-Dist: fakecloud>=0.52.0 ; extra == 'dev'
33
+ Requires-Dist: httpx>=0.28.1 ; extra == 'dev'
34
+ Requires-Dist: boto3>=1.44.4 ; extra == 'dev'
35
+ Requires-Dist: pytest>=9.2.0 ; extra == 'dev'
36
+ Requires-Dist: pytest-cov>=7.1.0 ; extra == 'dev'
37
+ Requires-Dist: hypothesis>=6.170.15 ; extra == 'dev'
38
+ Requires-Dist: uvloop>=0.23.0 ; extra == 'performance'
39
+ Requires-Dist: netherframe-core[dev]>=0.9.0 ; extra == 'test'
40
+ Requires-Dist: netherframe-core[dev]>=0.9.0 ; extra == 'test-performance'
41
+ Requires-Dist: netherframe-core[performance]>=0.9.0 ; extra == 'test-performance'
42
+ Requires-Python: >=3.14
43
+ Project-URL: Homepage, https://netherframe.arsenal.sh
44
+ Project-URL: Repository, https://github.com/arsenal-sh/netherframe
45
+ Provides-Extra: aws
46
+ Provides-Extra: dev
47
+ Provides-Extra: performance
48
+ Provides-Extra: test
49
+ Provides-Extra: test-performance
50
+ Description-Content-Type: text/markdown
51
+
52
+ # netherframe.core
53
+
54
+ Python infrastructure as code using Terraform providers. Core supplies the
55
+ authoring model, synthesis, direct provider execution, runtime values and state
56
+ interfaces. It requires Python **3.14+** and is part of a **pre-1.0** framework.
57
+
58
+ ## Install
59
+
60
+ ```bash
61
+ python -m pip install netherframe.core
62
+ ```
63
+
64
+ For command-line workflows, install `netherframe.cli`, which brings core and
65
+ generation support.
66
+
67
+ ## Author an app
68
+
69
+ ```python
70
+ # coding: nf_autoid
71
+
72
+ from nf.core import App, BindContext, Stack
73
+
74
+ with App() as example, Stack() as main, BindContext:
75
+ ... # Define resources in the main stack.
76
+ ```
77
+
78
+ Add typed provider bindings to define resources. Use hybrid execution to run provider
79
+ binaries directly and let Netherframe manage state. For an existing Terraform/OpenTofu
80
+ pipeline, use synthesis to export configuration. Install the provider binaries and
81
+ backend integrations your app needs, and configure credentials for the provider.
82
+
83
+ The distribution name is `netherframe.core`. `nf.core` is the permanent short
84
+ import alias of `netherframe.core`, including submodules. Both imports share the
85
+ same module objects and ship typing markers.
86
+
87
+ ## Main APIs
88
+
89
+ - Authoring: `App`, `Stack`, `Construct`, `Resource`, `DataSource`, `Provider`,
90
+ `Output` and `Variable`.
91
+ - Values: `RuntimeValue`, resolvers and value types under `nf.core.values`.
92
+ - Runtime: hybrid functions and runtime checks under `nf.core.runtime`.
93
+ - Provider protocol, orchestration, synthesis, drift and backend interfaces.
94
+ - Explicit auto-ID source-codec markers `Bind` and `BindContext`.
95
+ - Offline lint dispatch under `nf.core.linting`; policy packs are optional.
96
+
97
+ Core remains usable without AWS extensions or the AWS lint pack. Install the
98
+ integrations your application needs. Pre-1.0 minor releases may change APIs and
99
+ artifact formats; inspect a fresh plan after upgrading rather than assuming an
100
+ old saved plan remains compatible.
101
+
102
+ ## Documentation and support
103
+
104
+ - [Installation and source checkout](https://github.com/arsenal-sh/netherframe/blob/main/docs/getting-started/installation.md)
105
+ - [Tutorials](https://github.com/arsenal-sh/netherframe/blob/main/docs/tutorials/README.md)
106
+ - [Compatibility](https://github.com/arsenal-sh/netherframe/blob/main/docs/operations/compatibility.md)
107
+ - [Release notes](https://github.com/arsenal-sh/netherframe/blob/main/docs/operations/release-notes.md)
108
+ - [Support](https://github.com/arsenal-sh/netherframe/blob/main/SUPPORT.md)
109
+
110
+ The planned homepage is https://netherframe.arsenal.sh. Until the repository and
111
+ site are publicly available, use the documentation in a source checkout. Report
112
+ suspected vulnerabilities privately to **cheedella.sourabh@gmail.com**.
113
+
114
+ Netherframe-owned code is MIT licensed; see the bundled `LICENSE`. Dependencies
115
+ retain their own licenses.
@@ -0,0 +1,64 @@
1
+ # netherframe.core
2
+
3
+ Python infrastructure as code using Terraform providers. Core supplies the
4
+ authoring model, synthesis, direct provider execution, runtime values and state
5
+ interfaces. It requires Python **3.14+** and is part of a **pre-1.0** framework.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ python -m pip install netherframe.core
11
+ ```
12
+
13
+ For command-line workflows, install `netherframe.cli`, which brings core and
14
+ generation support.
15
+
16
+ ## Author an app
17
+
18
+ ```python
19
+ # coding: nf_autoid
20
+
21
+ from nf.core import App, BindContext, Stack
22
+
23
+ with App() as example, Stack() as main, BindContext:
24
+ ... # Define resources in the main stack.
25
+ ```
26
+
27
+ Add typed provider bindings to define resources. Use hybrid execution to run provider
28
+ binaries directly and let Netherframe manage state. For an existing Terraform/OpenTofu
29
+ pipeline, use synthesis to export configuration. Install the provider binaries and
30
+ backend integrations your app needs, and configure credentials for the provider.
31
+
32
+ The distribution name is `netherframe.core`. `nf.core` is the permanent short
33
+ import alias of `netherframe.core`, including submodules. Both imports share the
34
+ same module objects and ship typing markers.
35
+
36
+ ## Main APIs
37
+
38
+ - Authoring: `App`, `Stack`, `Construct`, `Resource`, `DataSource`, `Provider`,
39
+ `Output` and `Variable`.
40
+ - Values: `RuntimeValue`, resolvers and value types under `nf.core.values`.
41
+ - Runtime: hybrid functions and runtime checks under `nf.core.runtime`.
42
+ - Provider protocol, orchestration, synthesis, drift and backend interfaces.
43
+ - Explicit auto-ID source-codec markers `Bind` and `BindContext`.
44
+ - Offline lint dispatch under `nf.core.linting`; policy packs are optional.
45
+
46
+ Core remains usable without AWS extensions or the AWS lint pack. Install the
47
+ integrations your application needs. Pre-1.0 minor releases may change APIs and
48
+ artifact formats; inspect a fresh plan after upgrading rather than assuming an
49
+ old saved plan remains compatible.
50
+
51
+ ## Documentation and support
52
+
53
+ - [Installation and source checkout](https://github.com/arsenal-sh/netherframe/blob/main/docs/getting-started/installation.md)
54
+ - [Tutorials](https://github.com/arsenal-sh/netherframe/blob/main/docs/tutorials/README.md)
55
+ - [Compatibility](https://github.com/arsenal-sh/netherframe/blob/main/docs/operations/compatibility.md)
56
+ - [Release notes](https://github.com/arsenal-sh/netherframe/blob/main/docs/operations/release-notes.md)
57
+ - [Support](https://github.com/arsenal-sh/netherframe/blob/main/SUPPORT.md)
58
+
59
+ The planned homepage is https://netherframe.arsenal.sh. Until the repository and
60
+ site are publicly available, use the documentation in a source checkout. Report
61
+ suspected vulnerabilities privately to **cheedella.sourabh@gmail.com**.
62
+
63
+ Netherframe-owned code is MIT licensed; see the bundled `LICENSE`. Dependencies
64
+ retain their own licenses.
@@ -0,0 +1 @@
1
+ import netherframe_nf_alias
@@ -0,0 +1,140 @@
1
+ """Netherframe Core package facade."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import TYPE_CHECKING, Any, TypeVar
6
+
7
+ # Special type for preprocessor control
8
+ T = TypeVar("T")
9
+
10
+ if TYPE_CHECKING:
11
+ from contextlib import AbstractContextManager
12
+ from netherframe.core.autoscope import autoscope
13
+ from netherframe.core.backends.backend_chain import (
14
+ BackendBootstrapAction,
15
+ BackendBootstrapResult,
16
+ BackendChain,
17
+ BackendDecision,
18
+ BackendSelection,
19
+ ConditionalBackend,
20
+ )
21
+ from netherframe.core.constructs.app_stack import App, Stack
22
+ from netherframe.core.constructs.backend_base import LocalBackend
23
+ from netherframe.core.constructs.base_construct import BaseConstruct as Construct
24
+ from netherframe.core.constructs.framework_settings import BackendSettings, ProviderSettings
25
+ from netherframe.core.constructs.generated_value import GeneratedValue
26
+ from netherframe.core.constructs.infrastructure import Output, Variable
27
+ from netherframe.core.constructs.meta import Condition, DataLifecycleRules, LifecycleRules
28
+ from netherframe.core.constructs.resources import DataSource, Provider, Resource
29
+ from netherframe.core.functions.functions import Fn
30
+ from netherframe.core.values.runtime_value import RuntimeValue
31
+
32
+ # `name: Bind = Construct(...)` declares `name` with no particular type (a bare generic alias
33
+ # is `Bind[Any]`), so checkers accept it; `name: Bind[Vpc] = Vpc(...)` keeps the type.
34
+ type Bind[BoundT] = BoundT
35
+
36
+ BindContext: AbstractContextManager[None]
37
+ else:
38
+ # At runtime, use metaclasses that return the original type
39
+ class BindMeta(type):
40
+ """Metaclass for the Bind type marker."""
41
+
42
+ def __getitem__(cls, type_hint: type[T]) -> type[T]:
43
+ """Return the original type when indexed.
44
+
45
+ This makes Bind[SomeType] return SomeType at runtime,
46
+ acting as a transparent marker for the preprocessor.
47
+ """
48
+ return type_hint
49
+
50
+ class Bind(metaclass=BindMeta):
51
+ """Runtime marker class for explicit variable binding.
52
+
53
+ This class serves as a marker for the preprocessor to understand
54
+ when variable names should be injected into construct instantiations.
55
+ At runtime, Bind[T] returns T directly, making it transparent.
56
+
57
+ Example usage:
58
+ # Type checker sees: Resource (with full autocomplete)
59
+ # Preprocessor sees: Bind annotation (triggers wrapping)
60
+ # Runtime gets: Resource (transparent)
61
+ my_resource: Bind = Resource(nf_type="aws_s3_bucket")
62
+ my_vpc: Bind[Vpc] = Vpc(cidr_block="10.0.0.0/16")
63
+ """
64
+
65
+ class _BindContext:
66
+ """No-op context manager used by the preprocessor as a binding marker."""
67
+
68
+ def __enter__(self) -> None:
69
+ return None
70
+
71
+ def __exit__(self, *args: object) -> None:
72
+ return None
73
+
74
+ def __call__(self) -> _BindContext:
75
+ return self
76
+
77
+ BindContext = _BindContext()
78
+
79
+ from netherframe.core.autoscope import autoscope
80
+ from netherframe.core.backends.backend_chain import (
81
+ BackendBootstrapAction,
82
+ BackendBootstrapResult,
83
+ BackendChain,
84
+ BackendDecision,
85
+ BackendSelection,
86
+ ConditionalBackend,
87
+ )
88
+ from netherframe.core.constructs.app_stack import App, Stack
89
+ from netherframe.core.constructs.backend_base import LocalBackend
90
+ from netherframe.core.constructs.base_construct import BaseConstruct as Construct
91
+ from netherframe.core.constructs.framework_settings import BackendSettings, ProviderSettings
92
+ from netherframe.core.constructs.generated_value import GeneratedValue
93
+ from netherframe.core.constructs.infrastructure import Output, Variable
94
+ from netherframe.core.constructs.meta import Condition, DataLifecycleRules, LifecycleRules
95
+ from netherframe.core.constructs.resources import DataSource, Provider, Resource
96
+ from netherframe.core.values.runtime_value import RuntimeValue
97
+
98
+
99
+ __all__ = [
100
+ # Core constructs
101
+ "App",
102
+ "Stack",
103
+ "Resource",
104
+ "DataSource",
105
+ "Provider",
106
+ "ProviderSettings",
107
+ "GeneratedValue",
108
+ "Output",
109
+ "Variable",
110
+ "Construct",
111
+ # Meta-arguments
112
+ "LifecycleRules",
113
+ "DataLifecycleRules",
114
+ "Condition",
115
+ "Fn",
116
+ "RuntimeValue",
117
+ "autoscope",
118
+ # Backends
119
+ "BackendChain",
120
+ "BackendBootstrapAction",
121
+ "BackendBootstrapResult",
122
+ "BackendDecision",
123
+ "BackendSelection",
124
+ "ConditionalBackend",
125
+ "LocalBackend",
126
+ "BackendSettings",
127
+ # Preprocessor control
128
+ "Bind",
129
+ "BindContext",
130
+ ]
131
+
132
+
133
+ def __getattr__(name: str) -> Any:
134
+ # Fn comes from the installed legacy function catalog; resolve it on first use
135
+ # so importing netherframe.core does not require a catalog package.
136
+ if name == "Fn":
137
+ from netherframe.core.functions.functions import Fn
138
+
139
+ return Fn
140
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
@@ -0,0 +1,59 @@
1
+ """Autoscope decorator for automatic scope detection."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import functools
6
+ from typing import Any, Protocol, cast
7
+
8
+
9
+ class _InitAssignable(Protocol):
10
+ __init__: Any
11
+
12
+
13
+ def autoscope[T](cls: type[T]) -> type[T]:
14
+ """Decorator that automatically detects and injects scope for construct classes.
15
+
16
+ This decorator wraps the __init__ method of a class to automatically detect
17
+ the current scope from the context stack when nf_scope is not provided.
18
+
19
+ The ``__init__`` of an ``App`` or ``Stack`` subclass also makes the construct the current
20
+ scope once it is set up (``super().__init__`` has run) until ``__init__`` returns, as
21
+ ``with self:`` would: constructs created in its body default to ``nf_scope=self``.
22
+
23
+ Args:
24
+ cls: The class to decorate
25
+
26
+ Returns:
27
+ The decorated class
28
+
29
+ """
30
+ original_init = cls.__init__
31
+
32
+ def inject_scope(kwargs: dict[str, Any]) -> None:
33
+ # If nf_scope is not provided, try to get from context
34
+ if "nf_scope" not in kwargs:
35
+ # Import here to avoid circular imports
36
+ from netherframe.core.constructs.base_construct import BaseConstruct
37
+
38
+ # Try to get current scope from context
39
+ current_scope = BaseConstruct._current_scope()
40
+ if current_scope:
41
+ kwargs["nf_scope"] = current_scope
42
+
43
+ @functools.wraps(original_init)
44
+ def wrapped_init(self: Any, *args: Any, **kwargs: Any) -> None:
45
+ inject_scope(kwargs)
46
+ original_init(self, *args, **kwargs)
47
+
48
+ @functools.wraps(original_init)
49
+ def wrapped_scope_init(self: Any, *args: Any, **kwargs: Any) -> None:
50
+ from netherframe.core.constructs.base_construct import BaseConstruct
51
+
52
+ inject_scope(kwargs)
53
+ BaseConstruct._run_scoping_init(self, original_init, args, kwargs)
54
+
55
+ # Organizational constructs hold the constructs created in their body; resources hold none
56
+ scopes_children = bool(getattr(cls, "_is_app", False) or getattr(cls, "_is_stack", False))
57
+ init_target = cast("_InitAssignable", cls)
58
+ init_target.__init__ = wrapped_scope_init if scopes_children else wrapped_init
59
+ return cls
@@ -0,0 +1,51 @@
1
+ """Backends package facade."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from .backend_bootstrap import (
6
+ BackendBootstrapManager,
7
+ BackendBootstrapper,
8
+ BackendResources,
9
+ )
10
+ from .backend_chain import BackendChain, ConditionalBackend, build_backend_chain_from_config
11
+ from .backend_config import BackendAutoDetector, BackendConfig, BackendConfigManager
12
+ from .backend_registry import BackendRegistry, backend_construct, state_backend
13
+ from .state_engine import (
14
+ BackendType,
15
+ LocalBackendConfig,
16
+ LocalStateBackend,
17
+ PostgreSQLBackendConfig,
18
+ ResourceState,
19
+ S3BackendConfig,
20
+ State,
21
+ StateBackend,
22
+ StateChange,
23
+ StateEngine,
24
+ StateVersion,
25
+ )
26
+
27
+ __all__ = [
28
+ "BackendAutoDetector",
29
+ "BackendBootstrapManager",
30
+ "BackendBootstrapper",
31
+ "BackendChain",
32
+ "BackendConfig",
33
+ "BackendConfigManager",
34
+ "BackendRegistry",
35
+ "BackendResources",
36
+ "BackendType",
37
+ "ConditionalBackend",
38
+ "LocalBackendConfig",
39
+ "LocalStateBackend",
40
+ "PostgreSQLBackendConfig",
41
+ "ResourceState",
42
+ "S3BackendConfig",
43
+ "State",
44
+ "StateBackend",
45
+ "StateChange",
46
+ "StateEngine",
47
+ "StateVersion",
48
+ "backend_construct",
49
+ "build_backend_chain_from_config",
50
+ "state_backend",
51
+ ]
@@ -0,0 +1,132 @@
1
+ """Backend bootstrapping functionality - provider-agnostic core abstractions."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from abc import ABC, abstractmethod
6
+ from dataclasses import asdict, dataclass
7
+ from typing import Any, ClassVar
8
+
9
+ from netherframe.core.exceptions import ConfigurationError
10
+ from netherframe.core.logging import get_logger
11
+
12
+ logger = get_logger(__name__)
13
+
14
+
15
+ @dataclass
16
+ class BackendResources:
17
+ """Information about resources created for backend storage.
18
+
19
+ This is a generic container that can hold any backend-specific resource information.
20
+ Providers should extend this or use it directly with their specific fields.
21
+ """
22
+
23
+ def to_dict(self) -> dict[str, Any]:
24
+ """Convert to dictionary, excluding None values."""
25
+ return {k: v for k, v in asdict(self).items() if v is not None}
26
+
27
+
28
+ class BackendBootstrapper(ABC):
29
+ """Abstract base class for backend bootstrappers.
30
+
31
+ Provider-specific packages should implement this interface to provide
32
+ backend resource bootstrapping functionality.
33
+ """
34
+
35
+ @abstractmethod
36
+ def bootstrap(self) -> BackendResources:
37
+ """Bootstrap all backend resources.
38
+
39
+ Returns:
40
+ BackendResources with information about created resources
41
+
42
+ """
43
+
44
+ @abstractmethod
45
+ def validate(self) -> bool:
46
+ """Validate that all required backend resources exist.
47
+
48
+ Returns:
49
+ True if all resources exist, False otherwise
50
+
51
+ """
52
+
53
+
54
+ class BackendBootstrapManager:
55
+ """Manager for backend bootstrappers.
56
+
57
+ This allows provider packages to register their bootstrappers.
58
+ """
59
+
60
+ _bootstrappers: ClassVar[dict[str, type[BackendBootstrapper]]] = {}
61
+
62
+ @classmethod
63
+ def register_bootstrapper(
64
+ cls,
65
+ backend_type: str,
66
+ bootstrapper_class: type[BackendBootstrapper],
67
+ ) -> None:
68
+ """Register a bootstrapper for a backend type.
69
+
70
+ This should be called by provider packages to register their bootstrappers.
71
+ For example, aws-backends would register S3BackendBootstrapper for "s3".
72
+
73
+ Args:
74
+ backend_type: The backend type (e.g., "s3", "gcs", "azurerm")
75
+ bootstrapper_class: The bootstrapper class to register
76
+
77
+ """
78
+ cls._bootstrappers[backend_type] = bootstrapper_class
79
+ logger.debug("Registered bootstrapper for backend type: %s", backend_type)
80
+
81
+ @classmethod
82
+ def get_bootstrapper(cls, backend_type: str, **kwargs: Any) -> BackendBootstrapper:
83
+ """Get a bootstrapper instance for a backend type.
84
+
85
+ Args:
86
+ backend_type: The backend type
87
+ **kwargs: Arguments to pass to the bootstrapper constructor
88
+
89
+ Returns:
90
+ Bootstrapper instance
91
+
92
+ Raises:
93
+ ConfigurationError: If no bootstrapper is registered for the backend type
94
+
95
+ """
96
+ if backend_type not in cls._bootstrappers:
97
+ raise ConfigurationError(
98
+ f"No bootstrapper registered for backend type: {backend_type}. Available types: {list(cls._bootstrappers.keys())}",
99
+ )
100
+
101
+ bootstrapper_class = cls._bootstrappers[backend_type]
102
+ return bootstrapper_class(**kwargs)
103
+
104
+ @classmethod
105
+ def bootstrap_backend(cls, backend_type: str, **kwargs: Any) -> BackendResources:
106
+ """Bootstrap a backend and return resource information.
107
+
108
+ Convenience method that gets the bootstrapper and calls bootstrap().
109
+
110
+ Args:
111
+ backend_type: The backend type
112
+ **kwargs: Arguments to pass to the bootstrapper
113
+
114
+ Returns:
115
+ BackendResources with information about created resources
116
+
117
+ """
118
+ bootstrapper = cls.get_bootstrapper(backend_type, **kwargs)
119
+ return bootstrapper.bootstrap()
120
+
121
+ @classmethod
122
+ def is_bootstrapper_available(cls, backend_type: str) -> bool:
123
+ """Check if a bootstrapper is available for a backend type.
124
+
125
+ Args:
126
+ backend_type: The backend type to check
127
+
128
+ Returns:
129
+ True if a bootstrapper is registered, False otherwise
130
+
131
+ """
132
+ return backend_type in cls._bootstrappers