supertable 2.5.0__tar.gz → 2.5.4__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.
- supertable-2.5.4/MANIFEST.in +8 -0
- {supertable-2.5.0/supertable.egg-info → supertable-2.5.4}/PKG-INFO +23 -16
- {supertable-2.5.0 → supertable-2.5.4}/README.md +1 -1
- {supertable-2.5.0 → supertable-2.5.4}/pyproject.toml +36 -9
- {supertable-2.5.0 → supertable-2.5.4}/requirements.txt +6 -4
- supertable-2.5.4/setup.py +6 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/__init__.py +17 -2
- {supertable-2.5.0 → supertable-2.5.4}/supertable/audit/__init__.py +62 -5
- supertable-2.5.4/supertable/audit/admin.py +442 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/audit/chain.py +107 -14
- {supertable-2.5.0 → supertable-2.5.4}/supertable/audit/consumers.py +42 -9
- supertable-2.5.4/supertable/audit/crypto.py +500 -0
- supertable-2.5.4/supertable/audit/diagnostics.py +14 -0
- supertable-2.5.4/supertable/audit/durable_journal.py +1716 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/audit/events.py +54 -7
- {supertable-2.5.0 → supertable-2.5.4}/supertable/audit/export.py +27 -5
- supertable-2.5.4/supertable/audit/logger.py +1331 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/audit/middleware.py +71 -37
- {supertable-2.5.0 → supertable-2.5.4}/supertable/audit/privileged.py +37 -21
- {supertable-2.5.0 → supertable-2.5.4}/supertable/audit/privileged_outbox.py +258 -111
- {supertable-2.5.0 → supertable-2.5.4}/supertable/audit/privileged_worker.py +329 -113
- supertable-2.5.4/supertable/audit/reader.py +805 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/audit/retention.py +113 -33
- supertable-2.5.4/supertable/audit/writer_parquet.py +1566 -0
- supertable-2.5.4/supertable/audit/writer_redis.py +582 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/config/defaults.py +2 -2
- {supertable-2.5.0 → supertable-2.5.4}/supertable/config/homedir.py +65 -17
- {supertable-2.5.0 → supertable-2.5.4}/supertable/config/settings.py +46 -8
- {supertable-2.5.0 → supertable-2.5.4}/supertable/data_classes.py +82 -6
- supertable-2.5.4/supertable/data_reader.py +3597 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/data_writer.py +465 -82
- supertable-2.5.4/supertable/demo/README.md +161 -0
- supertable-2.5.4/supertable/demo/medcenter/annotations.json +596 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/medcenter/core.py +2 -5
- supertable-2.5.4/supertable/demo/medcenter/demo_queries.md +231 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/medcenter/export_accounting.py +19 -2
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/medcenter/quality.py +1 -1
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/medcenter/run.py +27 -4
- supertable-2.5.4/supertable/demo/medcenter/validation.py +23 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s01_03_create_users.py +5 -2
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/webshop/core.py +3 -3
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/webshop/stream_demo.py +26 -6
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/webshop/topup.py +5 -3
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/adaptive_router.py +23 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/data_estimator.py +897 -70
- supertable-2.5.4/supertable/engine/duckdb_engine.py +2532 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/engine_common.py +831 -189
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/engine_config.py +6 -6
- supertable-2.5.4/supertable/engine/executor.py +2988 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/file_cache.py +63 -56
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/island_resources.py +131 -1
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/island_spill.py +48 -21
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/islanddb.py +244 -35
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/query_observations.py +151 -59
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/range_cache.py +33 -29
- supertable-2.5.4/supertable/engine/remote_paths.py +24 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/spark_thrift.py +706 -110
- supertable-2.5.4/supertable/engine/stable_http_relay.py +2294 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/locking/file_lock.py +41 -9
- {supertable-2.5.0 → supertable-2.5.4}/supertable/locking/redis_lock.py +20 -4
- {supertable-2.5.0 → supertable-2.5.4}/supertable/logging.py +62 -15
- {supertable-2.5.0 → supertable-2.5.4}/supertable/meta_reader.py +228 -93
- supertable-2.5.4/supertable/mirroring/failure_safety.py +58 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/mirroring/mirror_delta.py +85 -26
- {supertable-2.5.0 → supertable-2.5.4}/supertable/mirroring/mirror_formats.py +111 -33
- {supertable-2.5.0 → supertable-2.5.4}/supertable/mirroring/mirror_iceberg.py +70 -43
- {supertable-2.5.0 → supertable-2.5.4}/supertable/mirroring/mirror_parquet.py +19 -19
- {supertable-2.5.0 → supertable-2.5.4}/supertable/monitoring/partitions.py +53 -37
- {supertable-2.5.0 → supertable-2.5.4}/supertable/monitoring_writer.py +170 -72
- supertable-2.5.4/supertable/odata_continuation.py +528 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/plan_extender.py +38 -15
- {supertable-2.5.0 → supertable-2.5.4}/supertable/processing.py +1339 -278
- {supertable-2.5.0 → supertable-2.5.4}/supertable/quality/checker.py +22 -21
- {supertable-2.5.0 → supertable-2.5.4}/supertable/quality/config.py +225 -67
- {supertable-2.5.0 → supertable-2.5.4}/supertable/quality/cron.py +10 -8
- {supertable-2.5.0 → supertable-2.5.4}/supertable/quality/execution.py +27 -5
- {supertable-2.5.0 → supertable-2.5.4}/supertable/quality/history.py +23 -8
- {supertable-2.5.0 → supertable-2.5.4}/supertable/quality/scheduler.py +567 -130
- {supertable-2.5.0 → supertable-2.5.4}/supertable/quality/serialization.py +21 -3
- {supertable-2.5.0 → supertable-2.5.4}/supertable/query_plan_manager.py +15 -3
- {supertable-2.5.0 → supertable-2.5.4}/supertable/rbac/access_control.py +145 -28
- {supertable-2.5.0 → supertable-2.5.4}/supertable/rbac/filter_builder.py +36 -14
- {supertable-2.5.0 → supertable-2.5.4}/supertable/rbac/role_manager.py +6 -5
- {supertable-2.5.0 → supertable-2.5.4}/supertable/rbac/row_column_security.py +11 -9
- {supertable-2.5.0 → supertable-2.5.4}/supertable/rbac/user_manager.py +20 -6
- {supertable-2.5.0 → supertable-2.5.4}/supertable/recovery/redis_rebuild.py +202 -68
- {supertable-2.5.0 → supertable-2.5.4}/supertable/redis_catalog.py +5608 -578
- {supertable-2.5.0 → supertable-2.5.4}/supertable/redis_connector.py +29 -12
- {supertable-2.5.0 → supertable-2.5.4}/supertable/redis_infra.py +61 -11
- {supertable-2.5.0 → supertable-2.5.4}/supertable/redis_keys.py +17 -10
- supertable-2.5.4/supertable/row_identity.py +261 -0
- supertable-2.5.4/supertable/simple_table.py +2508 -0
- supertable-2.5.4/supertable/staging_area.py +1856 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/storage/azure_storage.py +97 -49
- {supertable-2.5.0 → supertable-2.5.4}/supertable/storage/gcp_storage.py +65 -47
- {supertable-2.5.0 → supertable-2.5.4}/supertable/storage/local_storage.py +465 -60
- {supertable-2.5.0 → supertable-2.5.4}/supertable/storage/minio_storage.py +55 -32
- {supertable-2.5.0 → supertable-2.5.4}/supertable/storage/s3_storage.py +49 -33
- {supertable-2.5.0 → supertable-2.5.4}/supertable/storage/storage_factory.py +1 -1
- {supertable-2.5.0 → supertable-2.5.4}/supertable/storage/storage_interface.py +89 -20
- {supertable-2.5.0 → supertable-2.5.4}/supertable/super_pipe.py +161 -24
- supertable-2.5.4/supertable/super_table.py +4179 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/tombstone_manifest_v2.py +26 -12
- supertable-2.5.4/supertable/utils/diagnostic_redaction.py +214 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/utils/snapshot.py +30 -14
- {supertable-2.5.0 → supertable-2.5.4}/supertable/utils/spark_security.py +2 -2
- {supertable-2.5.0 → supertable-2.5.4}/supertable/utils/sql_parser.py +22 -32
- {supertable-2.5.0 → supertable-2.5.4/supertable.egg-info}/PKG-INFO +23 -16
- supertable-2.5.4/supertable.egg-info/SOURCES.txt +176 -0
- supertable-2.5.4/supertable.egg-info/requires.txt +43 -0
- supertable-2.5.0/setup.py +0 -73
- supertable-2.5.0/supertable/audit/admin.py +0 -206
- supertable-2.5.0/supertable/audit/crypto.py +0 -92
- supertable-2.5.0/supertable/audit/logger.py +0 -492
- supertable-2.5.0/supertable/audit/reader.py +0 -437
- supertable-2.5.0/supertable/audit/tests/test_chain.py +0 -234
- supertable-2.5.0/supertable/audit/tests/test_crypto.py +0 -132
- supertable-2.5.0/supertable/audit/tests/test_emit.py +0 -261
- supertable-2.5.0/supertable/audit/tests/test_events.py +0 -304
- supertable-2.5.0/supertable/audit/tests/test_privileged.py +0 -385
- supertable-2.5.0/supertable/audit/tests/test_privileged_outbox.py +0 -1822
- supertable-2.5.0/supertable/audit/tests/test_privileged_worker.py +0 -934
- supertable-2.5.0/supertable/audit/tests/test_retention.py +0 -312
- supertable-2.5.0/supertable/audit/writer_parquet.py +0 -347
- supertable-2.5.0/supertable/audit/writer_redis.py +0 -266
- supertable-2.5.0/supertable/benchmarks/benchmark_random_write_trace.py +0 -1207
- supertable-2.5.0/supertable/benchmarks/benchmark_tombstone_compaction.py +0 -1575
- supertable-2.5.0/supertable/benchmarks/benchmark_write_path.py +0 -113
- supertable-2.5.0/supertable/benchmarks/benchmark_write_probe.py +0 -497
- supertable-2.5.0/supertable/benchmarks/write_campaign.py +0 -1049
- supertable-2.5.0/supertable/config/tests/test_defaults.py +0 -154
- supertable-2.5.0/supertable/config/tests/test_homedir.py +0 -254
- supertable-2.5.0/supertable/config/tests/test_settings.py +0 -580
- supertable-2.5.0/supertable/data_reader.py +0 -1834
- supertable-2.5.0/supertable/engine/benchmarks/__init__.py +0 -10
- supertable-2.5.0/supertable/engine/benchmarks/__main__.py +0 -7
- supertable-2.5.0/supertable/engine/benchmarks/_worker.py +0 -18
- supertable-2.5.0/supertable/engine/benchmarks/bounded_spill_gate.py +0 -1102
- supertable-2.5.0/supertable/engine/benchmarks/container_runner.py +0 -1242
- supertable-2.5.0/supertable/engine/benchmarks/container_worker.py +0 -114
- supertable-2.5.0/supertable/engine/benchmarks/corpus.py +0 -1083
- supertable-2.5.0/supertable/engine/benchmarks/islanddb.py +0 -479
- supertable-2.5.0/supertable/engine/benchmarks/real_spill_gate.py +0 -927
- supertable-2.5.0/supertable/engine/benchmarks/real_spill_worker.py +0 -615
- supertable-2.5.0/supertable/engine/benchmarks/runner.py +0 -1616
- supertable-2.5.0/supertable/engine/benchmarks/spill_gate.py +0 -1082
- supertable-2.5.0/supertable/engine/benchmarks/tests/__init__.py +0 -1
- supertable-2.5.0/supertable/engine/benchmarks/tests/test_bounded_spill_gate.py +0 -419
- supertable-2.5.0/supertable/engine/benchmarks/tests/test_container_runner.py +0 -403
- supertable-2.5.0/supertable/engine/benchmarks/tests/test_islanddb_benchmark.py +0 -855
- supertable-2.5.0/supertable/engine/benchmarks/tests/test_real_spill_gate.py +0 -339
- supertable-2.5.0/supertable/engine/benchmarks/tests/test_spill_gate.py +0 -299
- supertable-2.5.0/supertable/engine/duckdb_engine.py +0 -964
- supertable-2.5.0/supertable/engine/executor.py +0 -1196
- supertable-2.5.0/supertable/engine/tests/__init__.py +0 -0
- supertable-2.5.0/supertable/engine/tests/conftest.py +0 -127
- supertable-2.5.0/supertable/engine/tests/test_adaptive_router.py +0 -374
- supertable-2.5.0/supertable/engine/tests/test_duckdb_query_sandbox.py +0 -779
- supertable-2.5.0/supertable/engine/tests/test_engine.py +0 -3246
- supertable-2.5.0/supertable/engine/tests/test_engine_config.py +0 -161
- supertable-2.5.0/supertable/engine/tests/test_engine_routing.py +0 -491
- supertable-2.5.0/supertable/engine/tests/test_engine_spill.py +0 -183
- supertable-2.5.0/supertable/engine/tests/test_executor_safety_regressions.py +0 -904
- supertable-2.5.0/supertable/engine/tests/test_file_cache.py +0 -756
- supertable-2.5.0/supertable/engine/tests/test_island_resources.py +0 -708
- supertable-2.5.0/supertable/engine/tests/test_island_spill_primitives.py +0 -1187
- supertable-2.5.0/supertable/engine/tests/test_island_spill_redteam.py +0 -140
- supertable-2.5.0/supertable/engine/tests/test_islanddb.py +0 -3623
- supertable-2.5.0/supertable/engine/tests/test_query_observations.py +0 -514
- supertable-2.5.0/supertable/engine/tests/test_range_cache.py +0 -877
- supertable-2.5.0/supertable/engine/tests/test_spark_security.py +0 -673
- supertable-2.5.0/supertable/engine/tests/test_tombstone_source_rowid_integrity.py +0 -95
- supertable-2.5.0/supertable/engine/tests/test_tombstone_v3_reader.py +0 -181
- supertable-2.5.0/supertable/locking/benchmarks/__init__.py +0 -0
- supertable-2.5.0/supertable/locking/benchmarks/benchmark_locking.py +0 -168
- supertable-2.5.0/supertable/locking/benchmarks/measure_lock_speed.py +0 -208
- supertable-2.5.0/supertable/locking/benchmarks/measure_lock_time.py +0 -165
- supertable-2.5.0/supertable/locking/tests/__init__.py +0 -0
- supertable-2.5.0/supertable/locking/tests/test_file_lock.py +0 -516
- supertable-2.5.0/supertable/locking/tests/test_redis_lock.py +0 -733
- supertable-2.5.0/supertable/mirroring/__init__.py +0 -0
- supertable-2.5.0/supertable/rbac/__init__.py +0 -0
- supertable-2.5.0/supertable/rbac/tests/test_filter_builder.py +0 -386
- supertable-2.5.0/supertable/rbac/tests/test_rbac.py +0 -4030
- supertable-2.5.0/supertable/rbac/tests/test_rbac_exclusions_adversarial.py +0 -1584
- supertable-2.5.0/supertable/rbac/tests/test_rbac_per_table.py +0 -817
- supertable-2.5.0/supertable/rbac/tests/test_rbac_privileged_audit.py +0 -1825
- supertable-2.5.0/supertable/rbac/tests/test_rbac_privileged_audit_real_redis.py +0 -151
- supertable-2.5.0/supertable/simple_table.py +0 -809
- supertable-2.5.0/supertable/staging_area.py +0 -708
- supertable-2.5.0/supertable/storage/tests/test_local_storage_durability_cache.py +0 -159
- supertable-2.5.0/supertable/storage/tests/test_storage.py +0 -3257
- supertable-2.5.0/supertable/storage/tests/test_storage_streaming.py +0 -551
- supertable-2.5.0/supertable/super_table.py +0 -418
- supertable-2.5.0/supertable/tests/__init__.py +0 -0
- supertable-2.5.0/supertable/tests/test_align_to_schema_fix.py +0 -475
- supertable-2.5.0/supertable/tests/test_benchmark_random_write_trace.py +0 -131
- supertable-2.5.0/supertable/tests/test_benchmark_tombstone_compaction.py +0 -200
- supertable-2.5.0/supertable/tests/test_compaction_selection.py +0 -343
- supertable-2.5.0/supertable/tests/test_create_if_missing.py +0 -273
- supertable-2.5.0/supertable/tests/test_data_estimator_join_pruning.py +0 -302
- supertable-2.5.0/supertable/tests/test_data_estimator_join_safety.py +0 -363
- supertable-2.5.0/supertable/tests/test_data_estimator_projection.py +0 -341
- supertable-2.5.0/supertable/tests/test_data_reader.py +0 -2508
- supertable-2.5.0/supertable/tests/test_data_reader_preflight.py +0 -286
- supertable-2.5.0/supertable/tests/test_data_reader_pruning_gate.py +0 -170
- supertable-2.5.0/supertable/tests/test_data_writer.py +0 -2202
- supertable-2.5.0/supertable/tests/test_data_writer_compact.py +0 -1453
- supertable-2.5.0/supertable/tests/test_data_writer_comprehensive.py +0 -2053
- supertable-2.5.0/supertable/tests/test_deletion_intent_fencing.py +0 -610
- supertable-2.5.0/supertable/tests/test_demo_cli_app_home.py +0 -78
- supertable-2.5.0/supertable/tests/test_demo_medcenter_generator.py +0 -330
- supertable-2.5.0/supertable/tests/test_errors.py +0 -81
- supertable-2.5.0/supertable/tests/test_fused_tombstone_compaction_contract.py +0 -1097
- supertable-2.5.0/supertable/tests/test_initial_compact_begin.py +0 -568
- supertable-2.5.0/supertable/tests/test_join_pruner_work_queue.py +0 -521
- supertable-2.5.0/supertable/tests/test_join_pruning.py +0 -511
- supertable-2.5.0/supertable/tests/test_join_pruning_directionality_oracle.py +0 -334
- supertable-2.5.0/supertable/tests/test_join_pruning_parenthesized_outer.py +0 -123
- supertable-2.5.0/supertable/tests/test_join_pruning_soundness.py +0 -568
- supertable-2.5.0/supertable/tests/test_join_pruning_type_safety.py +0 -232
- supertable-2.5.0/supertable/tests/test_meta_reader.py +0 -1516
- supertable-2.5.0/supertable/tests/test_metadata_partitioning.py +0 -221
- supertable-2.5.0/supertable/tests/test_mirror_tombstone_safety.py +0 -346
- supertable-2.5.0/supertable/tests/test_monitoring_delivery.py +0 -117
- supertable-2.5.0/supertable/tests/test_monitoring_partitions.py +0 -1009
- supertable-2.5.0/supertable/tests/test_monitoring_sink_guard.py +0 -241
- supertable-2.5.0/supertable/tests/test_monitoring_spool.py +0 -433
- supertable-2.5.0/supertable/tests/test_native_parquet_codec.py +0 -572
- supertable-2.5.0/supertable/tests/test_newer_than.py +0 -345
- supertable-2.5.0/supertable/tests/test_parquet_statistics.py +0 -203
- supertable-2.5.0/supertable/tests/test_processing.py +0 -880
- supertable-2.5.0/supertable/tests/test_processing_compact_resources.py +0 -875
- supertable-2.5.0/supertable/tests/test_processing_stats.py +0 -465
- supertable-2.5.0/supertable/tests/test_processing_stats_safety_boundaries.py +0 -395
- supertable-2.5.0/supertable/tests/test_quality_checker.py +0 -593
- supertable-2.5.0/supertable/tests/test_quality_config.py +0 -892
- supertable-2.5.0/supertable/tests/test_quality_evaluators.py +0 -537
- supertable-2.5.0/supertable/tests/test_quality_execution.py +0 -243
- supertable-2.5.0/supertable/tests/test_quality_scheduler_correctness.py +0 -2582
- supertable-2.5.0/supertable/tests/test_quality_scheduler_durability.py +0 -1919
- supertable-2.5.0/supertable/tests/test_quality_serialization.py +0 -349
- supertable-2.5.0/supertable/tests/test_query_sql.py +0 -267
- supertable-2.5.0/supertable/tests/test_rbac_write_storage_regressions.py +0 -1133
- supertable-2.5.0/supertable/tests/test_read_error_redaction.py +0 -31
- supertable-2.5.0/supertable/tests/test_read_pruning_differential.py +0 -457
- supertable-2.5.0/supertable/tests/test_read_pruning_integration.py +0 -373
- supertable-2.5.0/supertable/tests/test_redis_catalog_atomic_updates.py +0 -1381
- supertable-2.5.0/supertable/tests/test_redis_catalog_tombstone_v3.py +0 -481
- supertable-2.5.0/supertable/tests/test_redis_connector_acl.py +0 -289
- supertable-2.5.0/supertable/tests/test_redis_infra_hardening.py +0 -183
- supertable-2.5.0/supertable/tests/test_redis_key_prefix.py +0 -554
- supertable-2.5.0/supertable/tests/test_redis_recovery.py +0 -1126
- supertable-2.5.0/supertable/tests/test_release_audit_query_auth_regressions.py +0 -767
- supertable-2.5.0/supertable/tests/test_release_audit_storage_mirroring.py +0 -985
- supertable-2.5.0/supertable/tests/test_resolve_overwrite_writes.py +0 -901
- supertable-2.5.0/supertable/tests/test_resource_object_seals.py +0 -216
- supertable-2.5.0/supertable/tests/test_row_group_selection.py +0 -588
- supertable-2.5.0/supertable/tests/test_select_pruning_conservative_lanes.py +0 -448
- supertable-2.5.0/supertable/tests/test_simple_table.py +0 -1119
- supertable-2.5.0/supertable/tests/test_snapshot_artifact_references.py +0 -349
- supertable-2.5.0/supertable/tests/test_snapshot_commit_fencing.py +0 -3495
- supertable-2.5.0/supertable/tests/test_spark_file_resolution.py +0 -187
- supertable-2.5.0/supertable/tests/test_stats_cache.py +0 -334
- supertable-2.5.0/supertable/tests/test_stats_pruning.py +0 -561
- supertable-2.5.0/supertable/tests/test_stats_resource_seals.py +0 -340
- supertable-2.5.0/supertable/tests/test_stats_schema_snapshot.py +0 -126
- supertable-2.5.0/supertable/tests/test_super_table.py +0 -412
- supertable-2.5.0/supertable/tests/test_supertable_all.py +0 -1988
- supertable-2.5.0/supertable/tests/test_system_query.py +0 -216
- supertable-2.5.0/supertable/tests/test_tombstone_cache.py +0 -314
- supertable-2.5.0/supertable/tests/test_tombstone_manifest_v2.py +0 -429
- supertable-2.5.0/supertable/tests/test_tombstone_manifest_v2_reader.py +0 -1550
- supertable-2.5.0/supertable/tests/test_tombstone_snapshot_pinning.py +0 -1035
- supertable-2.5.0/supertable/tests/test_tombstone_v2_writer.py +0 -675
- supertable-2.5.0/supertable/tests/test_tombstone_v3_writer.py +0 -445
- supertable-2.5.0/supertable/tests/test_tombstone_write_safety.py +0 -996
- supertable-2.5.0/supertable/tests/test_write_campaign.py +0 -331
- supertable-2.5.0/supertable/tests/test_write_probe_gate.py +0 -424
- supertable-2.5.0/supertable/tests/test_writer_artifact_cache_identity.py +0 -246
- supertable-2.5.0/supertable/utils/tests/test_hourly_partition.py +0 -63
- supertable-2.5.0/supertable/utils/tests/test_sql_parser_columns.py +0 -4527
- supertable-2.5.0/supertable.egg-info/SOURCES.txt +0 -323
- supertable-2.5.0/supertable.egg-info/requires.txt +0 -32
- supertable-2.5.0/tests/test_mypy_release_gate.py +0 -146
- {supertable-2.5.0 → supertable-2.5.4}/LICENSE +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/setup.cfg +0 -0
- {supertable-2.5.0/supertable/audit/tests → supertable-2.5.4/supertable/config}/__init__.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/__init__.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/medcenter/__init__.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/medcenter/defaults.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/medcenter/finance_sources.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/medcenter/generate.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/medcenter/helpers.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/medcenter/load.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/medcenter/transform.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/__init__.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/__main__.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/check_filter_builder.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/controller.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/data_writer_helpers.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/defaults.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/dummy_data.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/read_parquet_header.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s01_01_01_create_super_table.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s01_01_02_enable_mirroring_formats.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s01_02_create_roles.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s02_01_write_dummy_data.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s02_02_write_single_data.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s02_03_01_write_staging.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s02_03_02_create_pipe.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s02_04_01_write_monitoring_simple.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s02_04_02_write_monitoring_parallel.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s02_05_write_tombstone.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s03_01_read_data_error.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s03_02_01_read_super_data_ok.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s03_02_02_read_table_data_ok.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s03_03_read_meta.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s03_04_read_staging.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s03_06_01_read_roles.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s03_06_02_read_user.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s03_07_01_estimate_read.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s03_07_02_estimate_files.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s03_08_read_snapshot_history.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s04_01_03_delete_pipe.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s05_01_delete_table.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/quickstart/s05_02_delete_super_table.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/webshop/__init__.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/webshop/defaults.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/webshop/generate.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/demo/webshop/load.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/__init__.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/engine_enum.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/join_pruner.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/engine/plan_stats.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/errors.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/locking/__init__.py +0 -0
- {supertable-2.5.0/supertable/config → supertable-2.5.4/supertable/mirroring}/__init__.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/monitoring/__init__.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/quality/__init__.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/quality/anomaly.py +0 -0
- {supertable-2.5.0/supertable/config/tests → supertable-2.5.4/supertable/rbac}/__init__.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/rbac/permissions.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/recovery/__init__.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/storage/__init__.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/system_query.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/utils/__init__.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/utils/helper.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/utils/profiler.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable/utils/timer.py +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable.egg-info/dependency_links.txt +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable.egg-info/entry_points.txt +0 -0
- {supertable-2.5.0 → supertable-2.5.4}/supertable.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
include LICENSE
|
|
2
|
+
include README.md
|
|
3
|
+
include requirements.txt
|
|
4
|
+
|
|
5
|
+
# The published source archive is an installable runtime artifact. Repository
|
|
6
|
+
# release-gate tests depend on workflow and baseline files that are deliberately
|
|
7
|
+
# not shipped, so do not include a misleading, incomplete top-level test tree.
|
|
8
|
+
prune tests
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: supertable
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.4
|
|
4
4
|
Summary: SuperTable — versioned data lake library for SQL analytics on Parquet + Redis.
|
|
5
|
-
Author: Levente Kupas
|
|
6
5
|
Author-email: Levente Kupas <lkupas@kladnasoft.com>
|
|
7
|
-
License: FSL-1.1-ALv2
|
|
6
|
+
License-Expression: LicenseRef-FSL-1.1-ALv2
|
|
8
7
|
Project-URL: Homepage, https://github.com/kladnasoft/supertable
|
|
9
8
|
Classifier: Programming Language :: Python :: 3
|
|
10
9
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
11
|
-
Classifier: License :: Other/Proprietary License
|
|
12
10
|
Classifier: Operating System :: POSIX
|
|
13
11
|
Requires-Python: >=3.10
|
|
14
12
|
Description-Content-Type: text/markdown
|
|
15
13
|
License-File: LICENSE
|
|
16
14
|
Requires-Dist: numpy<3.0,>=1.26
|
|
17
15
|
Requires-Dist: pandas<2.3,>=2.1
|
|
18
|
-
Requires-Dist: pyarrow<
|
|
16
|
+
Requires-Dist: pyarrow<24,>=23.0.1
|
|
19
17
|
Requires-Dist: pytz>=2023.3
|
|
20
18
|
Requires-Dist: tzdata>=2023.3
|
|
21
19
|
Requires-Dist: apscheduler<4.0,>=3.11.3
|
|
@@ -23,31 +21,40 @@ Requires-Dist: duckdb<2.0,>=1.5.1
|
|
|
23
21
|
Requires-Dist: polars<2.0,>=1.36.1
|
|
24
22
|
Requires-Dist: sqlglot<27,>=26.33
|
|
25
23
|
Requires-Dist: colorlog<7.0,>=6.9
|
|
26
|
-
Requires-Dist: tqdm<5.0,>=4.66
|
|
27
|
-
Requires-Dist: python-dotenv<2.0,>=1.
|
|
28
|
-
Requires-Dist:
|
|
24
|
+
Requires-Dist: tqdm<5.0,>=4.66.3
|
|
25
|
+
Requires-Dist: python-dotenv<2.0,>=1.2.2
|
|
26
|
+
Requires-Dist: starlette<2.0,>=1.3.1
|
|
27
|
+
Requires-Dist: httpx<1.0,>=0.27.1
|
|
28
|
+
Requires-Dist: cryptography<51,>=50.0.0
|
|
29
29
|
Requires-Dist: redis<6.0,>=5.0
|
|
30
30
|
Provides-Extra: s3
|
|
31
|
-
Requires-Dist: boto3<2.0,>=1.
|
|
31
|
+
Requires-Dist: boto3<2.0,>=1.35.2; extra == "s3"
|
|
32
32
|
Provides-Extra: minio
|
|
33
33
|
Requires-Dist: minio<8.0,>=7.2; extra == "minio"
|
|
34
34
|
Provides-Extra: azure
|
|
35
|
-
Requires-Dist: azure-storage-blob
|
|
35
|
+
Requires-Dist: azure-storage-blob<13.0,>=12.26.0; extra == "azure"
|
|
36
|
+
Requires-Dist: azure-identity<2.0,>=1.17; extra == "azure"
|
|
36
37
|
Provides-Extra: gcp
|
|
37
|
-
Requires-Dist: google-cloud-storage
|
|
38
|
+
Requires-Dist: google-cloud-storage<4.0,>=3.1.0; extra == "gcp"
|
|
38
39
|
Provides-Extra: all-cloud
|
|
39
|
-
Requires-Dist:
|
|
40
|
+
Requires-Dist: boto3<2.0,>=1.35.2; extra == "all-cloud"
|
|
41
|
+
Requires-Dist: minio<8.0,>=7.2; extra == "all-cloud"
|
|
42
|
+
Requires-Dist: azure-storage-blob<13.0,>=12.26.0; extra == "all-cloud"
|
|
43
|
+
Requires-Dist: azure-identity<2.0,>=1.17; extra == "all-cloud"
|
|
44
|
+
Requires-Dist: google-cloud-storage<4.0,>=3.1.0; extra == "all-cloud"
|
|
40
45
|
Provides-Extra: all
|
|
41
|
-
Requires-Dist:
|
|
42
|
-
|
|
46
|
+
Requires-Dist: boto3<2.0,>=1.35.2; extra == "all"
|
|
47
|
+
Requires-Dist: minio<8.0,>=7.2; extra == "all"
|
|
48
|
+
Requires-Dist: azure-storage-blob<13.0,>=12.26.0; extra == "all"
|
|
49
|
+
Requires-Dist: azure-identity<2.0,>=1.17; extra == "all"
|
|
50
|
+
Requires-Dist: google-cloud-storage<4.0,>=3.1.0; extra == "all"
|
|
43
51
|
Dynamic: license-file
|
|
44
|
-
Dynamic: requires-python
|
|
45
52
|
|
|
46
53
|
# SuperTable
|
|
47
54
|
|
|
48
55
|

|
|
49
56
|

|
|
50
|
-

|
|
51
58
|
|
|
52
59
|
**SuperTable — versioned data lake library for SQL analytics.**
|
|
53
60
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|

|
|
5
|
-

|
|
6
6
|
|
|
7
7
|
**SuperTable — versioned data lake library for SQL analytics.**
|
|
8
8
|
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools>=
|
|
2
|
+
requires = ["setuptools>=83.0.0"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "supertable"
|
|
7
|
-
version = "2.5.
|
|
7
|
+
version = "2.5.4"
|
|
8
8
|
description = "SuperTable — versioned data lake library for SQL analytics on Parquet + Redis."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
|
-
license =
|
|
11
|
+
license = "LicenseRef-FSL-1.1-ALv2"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
12
13
|
authors = [{ name = "Levente Kupas", email = "lkupas@kladnasoft.com" }]
|
|
13
14
|
classifiers = [
|
|
14
15
|
"Programming Language :: Python :: 3",
|
|
15
16
|
"Programming Language :: Python :: 3 :: Only",
|
|
16
|
-
"License :: Other/Proprietary License",
|
|
17
17
|
"Operating System :: POSIX"
|
|
18
18
|
]
|
|
19
19
|
|
|
@@ -25,14 +25,31 @@ dependencies = { file = ["requirements.txt"] }
|
|
|
25
25
|
|
|
26
26
|
[project.optional-dependencies]
|
|
27
27
|
# Storage backends (pick what you deploy on)
|
|
28
|
-
|
|
28
|
+
# botocore 1.35.2 is the first release whose PutObject model exposes
|
|
29
|
+
# IfNoneMatch, required by immutable conditional publication.
|
|
30
|
+
s3 = ["boto3>=1.35.2,<2.0"]
|
|
29
31
|
minio = ["minio>=7.2,<8.0"]
|
|
30
|
-
azure = [
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
azure = [
|
|
33
|
+
"azure-storage-blob>=12.26.0,<13.0",
|
|
34
|
+
"azure-identity>=1.17,<2.0",
|
|
35
|
+
]
|
|
36
|
+
gcp = ["google-cloud-storage>=3.1.0,<4.0"]
|
|
37
|
+
all-cloud = [
|
|
38
|
+
"boto3>=1.35.2,<2.0",
|
|
39
|
+
"minio>=7.2,<8.0",
|
|
40
|
+
"azure-storage-blob>=12.26.0,<13.0",
|
|
41
|
+
"azure-identity>=1.17,<2.0",
|
|
42
|
+
"google-cloud-storage>=3.1.0,<4.0",
|
|
43
|
+
]
|
|
33
44
|
|
|
34
45
|
# Everything
|
|
35
|
-
all = [
|
|
46
|
+
all = [
|
|
47
|
+
"boto3>=1.35.2,<2.0",
|
|
48
|
+
"minio>=7.2,<8.0",
|
|
49
|
+
"azure-storage-blob>=12.26.0,<13.0",
|
|
50
|
+
"azure-identity>=1.17,<2.0",
|
|
51
|
+
"google-cloud-storage>=3.1.0,<4.0",
|
|
52
|
+
]
|
|
36
53
|
|
|
37
54
|
[project.urls]
|
|
38
55
|
Homepage = "https://github.com/kladnasoft/supertable"
|
|
@@ -54,8 +71,18 @@ supertable-demo-medcenter-run = "supertable.demo.medcenter.run:main"
|
|
|
54
71
|
[tool.setuptools]
|
|
55
72
|
include-package-data = true
|
|
56
73
|
|
|
74
|
+
[tool.setuptools.package-data]
|
|
75
|
+
"supertable.demo" = ["README.md"]
|
|
76
|
+
"supertable.demo.medcenter" = ["annotations.json", "demo_queries.md"]
|
|
77
|
+
|
|
57
78
|
[tool.setuptools.packages.find]
|
|
58
79
|
include = ["supertable", "supertable.*"]
|
|
80
|
+
exclude = [
|
|
81
|
+
"supertable.tests", "supertable.tests.*",
|
|
82
|
+
"supertable.*.tests", "supertable.*.tests.*",
|
|
83
|
+
"supertable.benchmarks", "supertable.benchmarks.*",
|
|
84
|
+
"supertable.*.benchmarks", "supertable.*.benchmarks.*",
|
|
85
|
+
]
|
|
59
86
|
|
|
60
87
|
[tool.pytest.ini_options]
|
|
61
88
|
asyncio_default_fixture_loop_scope = "function"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# -------- Core data stack --------
|
|
2
2
|
numpy>=1.26,<3.0
|
|
3
3
|
pandas>=2.1,<2.3
|
|
4
|
-
pyarrow>=
|
|
4
|
+
pyarrow>=23.0.1,<24
|
|
5
5
|
pytz>=2023.3
|
|
6
6
|
tzdata>=2023.3
|
|
7
7
|
apscheduler>=3.11.3,<4.0
|
|
@@ -11,9 +11,11 @@ duckdb>=1.5.1,<2.0
|
|
|
11
11
|
polars>=1.36.1,<2.0
|
|
12
12
|
sqlglot>=26.33,<27
|
|
13
13
|
colorlog>=6.9,<7.0
|
|
14
|
-
tqdm>=4.66,<5.0
|
|
15
|
-
python-dotenv>=1.
|
|
16
|
-
|
|
14
|
+
tqdm>=4.66.3,<5.0
|
|
15
|
+
python-dotenv>=1.2.2,<2.0
|
|
16
|
+
starlette>=1.3.1,<2.0
|
|
17
|
+
httpx>=0.27.1,<1.0
|
|
18
|
+
cryptography>=50.0.0,<51
|
|
17
19
|
|
|
18
20
|
# -------- Catalog / locking --------
|
|
19
21
|
redis>=5.0,<6.0
|
|
@@ -25,7 +25,7 @@ See the ``supertable.demo`` package for runnable end-to-end demos and the
|
|
|
25
25
|
project documentation for the full API surface.
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
|
-
__version__ = "2.5.
|
|
28
|
+
__version__ = "2.5.4"
|
|
29
29
|
|
|
30
30
|
from importlib import import_module
|
|
31
31
|
from typing import TYPE_CHECKING, Any
|
|
@@ -46,6 +46,13 @@ _LAZY_EXPORTS = {
|
|
|
46
46
|
"SimpleTable": ("supertable.simple_table", "SimpleTable"),
|
|
47
47
|
"DataWriter": ("supertable.data_writer", "DataWriter"),
|
|
48
48
|
"DataReader": ("supertable.data_reader", "DataReader"),
|
|
49
|
+
"query_sql_stream": ("supertable.data_reader", "query_sql_stream"),
|
|
50
|
+
"query_odata_sql_stream": (
|
|
51
|
+
"supertable.data_reader", "query_odata_sql_stream",
|
|
52
|
+
),
|
|
53
|
+
"query_sql_policy_fingerprint": (
|
|
54
|
+
"supertable.data_reader", "query_sql_policy_fingerprint",
|
|
55
|
+
),
|
|
49
56
|
"MetaReader": ("supertable.meta_reader", "MetaReader"),
|
|
50
57
|
"list_supers": ("supertable.meta_reader", "list_supers"),
|
|
51
58
|
"list_tables": ("supertable.meta_reader", "list_tables"),
|
|
@@ -75,7 +82,12 @@ def __dir__() -> list[str]:
|
|
|
75
82
|
|
|
76
83
|
|
|
77
84
|
if TYPE_CHECKING:
|
|
78
|
-
from supertable.data_reader import
|
|
85
|
+
from supertable.data_reader import (
|
|
86
|
+
DataReader,
|
|
87
|
+
query_odata_sql_stream,
|
|
88
|
+
query_sql_policy_fingerprint,
|
|
89
|
+
query_sql_stream,
|
|
90
|
+
)
|
|
79
91
|
from supertable.data_writer import DataWriter
|
|
80
92
|
from supertable.errors import (
|
|
81
93
|
SuperTableNotFoundError,
|
|
@@ -97,6 +109,9 @@ __all__ = [
|
|
|
97
109
|
"SimpleTable",
|
|
98
110
|
"DataWriter",
|
|
99
111
|
"DataReader",
|
|
112
|
+
"query_sql_stream",
|
|
113
|
+
"query_odata_sql_stream",
|
|
114
|
+
"query_sql_policy_fingerprint",
|
|
100
115
|
"engine",
|
|
101
116
|
"MetaReader",
|
|
102
117
|
"list_supers",
|
|
@@ -39,9 +39,11 @@ Compliance: DORA (Regulation 2022/2554), SOC 2 Type II.
|
|
|
39
39
|
"""
|
|
40
40
|
from __future__ import annotations
|
|
41
41
|
|
|
42
|
+
import json
|
|
42
43
|
import logging
|
|
43
44
|
from typing import Any, Optional
|
|
44
45
|
|
|
46
|
+
from supertable.audit.diagnostics import safe_audit_error_type
|
|
45
47
|
from supertable.audit.events import (
|
|
46
48
|
AuditEvent,
|
|
47
49
|
EventCategory,
|
|
@@ -52,9 +54,16 @@ from supertable.audit.events import (
|
|
|
52
54
|
make_detail,
|
|
53
55
|
)
|
|
54
56
|
from supertable.audit.logger import (
|
|
57
|
+
AuditLogger,
|
|
58
|
+
NullAuditLogger,
|
|
59
|
+
_PROTECTED_EVENT_CAPABILITY,
|
|
55
60
|
get_audit_logger,
|
|
56
61
|
shutdown_all,
|
|
57
62
|
)
|
|
63
|
+
from supertable.audit.crypto import (
|
|
64
|
+
AuditEncryptionError,
|
|
65
|
+
protect_sensitive_detail,
|
|
66
|
+
)
|
|
58
67
|
from supertable.audit.privileged import (
|
|
59
68
|
PrivilegedActionContext,
|
|
60
69
|
PrivilegedAuditRecord,
|
|
@@ -82,6 +91,7 @@ __all__ = [
|
|
|
82
91
|
"ActorType",
|
|
83
92
|
"Actions",
|
|
84
93
|
"make_detail",
|
|
94
|
+
"AuditEncryptionError",
|
|
85
95
|
"PrivilegedActionContext",
|
|
86
96
|
"PrivilegedAuditRecord",
|
|
87
97
|
"PrivilegedAuditOutbox",
|
|
@@ -139,7 +149,7 @@ def emit(
|
|
|
139
149
|
actor_user_agent: str = "",
|
|
140
150
|
resource_type: str = "",
|
|
141
151
|
resource_id: str = "",
|
|
142
|
-
detail: str | dict | None = None,
|
|
152
|
+
detail: str | dict | list | tuple | None = None,
|
|
143
153
|
outcome: str = Outcome.SUCCESS,
|
|
144
154
|
reason: str = "",
|
|
145
155
|
severity: str = Severity.INFO,
|
|
@@ -159,10 +169,40 @@ def emit(
|
|
|
159
169
|
if not organization:
|
|
160
170
|
return
|
|
161
171
|
|
|
172
|
+
# Resolve event admission before touching detail. Disabled auditing and a
|
|
173
|
+
# disabled query lane must have zero payload-protection work and cannot be
|
|
174
|
+
# made to fail by encryption policy that is irrelevant to the suppressed
|
|
175
|
+
# event.
|
|
176
|
+
try:
|
|
177
|
+
audit_logger = get_audit_logger(organization, action=action)
|
|
178
|
+
except AuditEncryptionError:
|
|
179
|
+
raise
|
|
180
|
+
except Exception as exc:
|
|
181
|
+
logger.error(
|
|
182
|
+
"[audit] logger resolution failed: %s",
|
|
183
|
+
safe_audit_error_type(exc),
|
|
184
|
+
)
|
|
185
|
+
return
|
|
186
|
+
if isinstance(audit_logger, NullAuditLogger):
|
|
187
|
+
return
|
|
188
|
+
|
|
189
|
+
# Protect reversible SQL/query text before the event can enter any queue,
|
|
190
|
+
# log, webhook, Redis stream, or Parquet object. Configured encryption
|
|
191
|
+
# errors intentionally propagate so callers cannot continue under a false
|
|
192
|
+
# assumption that sensitive audit fields were protected.
|
|
193
|
+
detail = protect_sensitive_detail(detail, action=action)
|
|
194
|
+
|
|
162
195
|
# Serialize detail dict if needed
|
|
163
196
|
detail_str = ""
|
|
164
197
|
if isinstance(detail, dict):
|
|
165
198
|
detail_str = make_detail(**detail)
|
|
199
|
+
elif isinstance(detail, list):
|
|
200
|
+
detail_str = json.dumps(
|
|
201
|
+
detail,
|
|
202
|
+
separators=(",", ":"),
|
|
203
|
+
ensure_ascii=False,
|
|
204
|
+
allow_nan=False,
|
|
205
|
+
)
|
|
166
206
|
elif isinstance(detail, str):
|
|
167
207
|
detail_str = detail
|
|
168
208
|
elif detail is not None:
|
|
@@ -193,10 +233,27 @@ def emit(
|
|
|
193
233
|
)
|
|
194
234
|
|
|
195
235
|
try:
|
|
196
|
-
audit_logger
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
236
|
+
if isinstance(audit_logger, AuditLogger):
|
|
237
|
+
audit_logger._enqueue_protected(
|
|
238
|
+
event,
|
|
239
|
+
capability=_PROTECTED_EVENT_CAPABILITY,
|
|
240
|
+
)
|
|
241
|
+
else:
|
|
242
|
+
# Test doubles and compatibility adapters receive only the already
|
|
243
|
+
# protected immutable event; production loggers use the capability
|
|
244
|
+
# path above to avoid a second pass that would confuse trusted
|
|
245
|
+
# generated output names with caller-supplied masquerades.
|
|
246
|
+
audit_logger.emit(event)
|
|
247
|
+
except AuditEncryptionError:
|
|
248
|
+
raise
|
|
249
|
+
except Exception as exc:
|
|
250
|
+
# Audit backends can surface connection strings or record contents in
|
|
251
|
+
# exception messages. Keep diagnostics useful without copying those
|
|
252
|
+
# messages into the application log.
|
|
253
|
+
logger.error(
|
|
254
|
+
"[audit] emit failed: %s",
|
|
255
|
+
safe_audit_error_type(exc),
|
|
256
|
+
)
|
|
200
257
|
|
|
201
258
|
|
|
202
259
|
# ---------------------------------------------------------------------------
|