iris-pgwire 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. iris_pgwire-1.0.0/.gitignore +80 -0
  2. iris_pgwire-1.0.0/CHANGELOG.md +80 -0
  3. iris_pgwire-1.0.0/LICENSE +21 -0
  4. iris_pgwire-1.0.0/PKG-INFO +755 -0
  5. iris_pgwire-1.0.0/README.md +675 -0
  6. iris_pgwire-1.0.0/docs/DUAL_PATH_ARCHITECTURE.md +344 -0
  7. iris_pgwire-1.0.0/docs/HNSW_FINDINGS_2025_10_02.md +315 -0
  8. iris_pgwire-1.0.0/docs/TRANSLATION_API.md +722 -0
  9. iris_pgwire-1.0.0/docs/VECTOR_PARAMETER_BINDING.md +531 -0
  10. iris_pgwire-1.0.0/examples/BI_TOOLS_SETUP.md +464 -0
  11. iris_pgwire-1.0.0/examples/async_sqlalchemy_demo.py +449 -0
  12. iris_pgwire-1.0.0/examples/bi_tools_demo.py +536 -0
  13. iris_pgwire-1.0.0/examples/client_demonstrations.py +470 -0
  14. iris_pgwire-1.0.0/examples/client_demos.py +433 -0
  15. iris_pgwire-1.0.0/examples/translation_api_demo.py +448 -0
  16. iris_pgwire-1.0.0/pyproject.toml +314 -0
  17. iris_pgwire-1.0.0/src/iris_pgwire/__init__.py +38 -0
  18. iris_pgwire-1.0.0/src/iris_pgwire/auth/__init__.py +93 -0
  19. iris_pgwire-1.0.0/src/iris_pgwire/auth/auth_selector.py +254 -0
  20. iris_pgwire-1.0.0/src/iris_pgwire/auth/gssapi_auth.py +502 -0
  21. iris_pgwire-1.0.0/src/iris_pgwire/auth/oauth_bridge.py +495 -0
  22. iris_pgwire-1.0.0/src/iris_pgwire/auth/wallet_credentials.py +417 -0
  23. iris_pgwire-1.0.0/src/iris_pgwire/auth.py +814 -0
  24. iris_pgwire-1.0.0/src/iris_pgwire/backend_selector.py +230 -0
  25. iris_pgwire-1.0.0/src/iris_pgwire/bulk_executor.py +351 -0
  26. iris_pgwire-1.0.0/src/iris_pgwire/catalog/__init__.py +68 -0
  27. iris_pgwire-1.0.0/src/iris_pgwire/catalog/catalog_functions.py +580 -0
  28. iris_pgwire-1.0.0/src/iris_pgwire/catalog/catalog_router.py +314 -0
  29. iris_pgwire-1.0.0/src/iris_pgwire/catalog/oid_generator.py +198 -0
  30. iris_pgwire-1.0.0/src/iris_pgwire/catalog/pg_attrdef.py +258 -0
  31. iris_pgwire-1.0.0/src/iris_pgwire/catalog/pg_attribute.py +323 -0
  32. iris_pgwire-1.0.0/src/iris_pgwire/catalog/pg_class.py +345 -0
  33. iris_pgwire-1.0.0/src/iris_pgwire/catalog/pg_constraint.py +302 -0
  34. iris_pgwire-1.0.0/src/iris_pgwire/catalog/pg_index.py +345 -0
  35. iris_pgwire-1.0.0/src/iris_pgwire/catalog/pg_namespace.py +128 -0
  36. iris_pgwire-1.0.0/src/iris_pgwire/column_validator.py +220 -0
  37. iris_pgwire-1.0.0/src/iris_pgwire/config_schema.py +222 -0
  38. iris_pgwire-1.0.0/src/iris_pgwire/constitutional.py +546 -0
  39. iris_pgwire-1.0.0/src/iris_pgwire/copy_handler.py +423 -0
  40. iris_pgwire-1.0.0/src/iris_pgwire/csv_processor.py +248 -0
  41. iris_pgwire-1.0.0/src/iris_pgwire/dbapi_connection_pool.py +418 -0
  42. iris_pgwire-1.0.0/src/iris_pgwire/dbapi_executor.py +286 -0
  43. iris_pgwire-1.0.0/src/iris_pgwire/debug_tracer.py +352 -0
  44. iris_pgwire-1.0.0/src/iris_pgwire/health_checker.py +215 -0
  45. iris_pgwire-1.0.0/src/iris_pgwire/integratedml.py +408 -0
  46. iris_pgwire-1.0.0/src/iris_pgwire/iris_constructs.py +849 -0
  47. iris_pgwire-1.0.0/src/iris_pgwire/iris_executor.py +4668 -0
  48. iris_pgwire-1.0.0/src/iris_pgwire/iris_log_handler.py +114 -0
  49. iris_pgwire-1.0.0/src/iris_pgwire/iris_user_management.py +629 -0
  50. iris_pgwire-1.0.0/src/iris_pgwire/models/__init__.py +20 -0
  51. iris_pgwire-1.0.0/src/iris_pgwire/models/backend_config.py +222 -0
  52. iris_pgwire-1.0.0/src/iris_pgwire/models/connection_pool_state.py +170 -0
  53. iris_pgwire-1.0.0/src/iris_pgwire/models/dbapi_connection.py +219 -0
  54. iris_pgwire-1.0.0/src/iris_pgwire/models/ipm_metadata.py +246 -0
  55. iris_pgwire-1.0.0/src/iris_pgwire/models/vector_query_request.py +161 -0
  56. iris_pgwire-1.0.0/src/iris_pgwire/observability.py +113 -0
  57. iris_pgwire-1.0.0/src/iris_pgwire/performance_monitor.py +362 -0
  58. iris_pgwire-1.0.0/src/iris_pgwire/protocol.py +4508 -0
  59. iris_pgwire-1.0.0/src/iris_pgwire/quality/__init__.py +41 -0
  60. iris_pgwire-1.0.0/src/iris_pgwire/quality/__main__.py +138 -0
  61. iris_pgwire-1.0.0/src/iris_pgwire/quality/code_quality_validator.py +296 -0
  62. iris_pgwire-1.0.0/src/iris_pgwire/quality/documentation_validator.py +543 -0
  63. iris_pgwire-1.0.0/src/iris_pgwire/quality/package_metadata_validator.py +255 -0
  64. iris_pgwire-1.0.0/src/iris_pgwire/quality/security_validator.py +433 -0
  65. iris_pgwire-1.0.0/src/iris_pgwire/quality/validator.py +395 -0
  66. iris_pgwire-1.0.0/src/iris_pgwire/schema_mapper.py +203 -0
  67. iris_pgwire-1.0.0/src/iris_pgwire/server.py +297 -0
  68. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/__init__.py +53 -0
  69. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/alias_extractor.py +224 -0
  70. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/api.py +530 -0
  71. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/cache.py +500 -0
  72. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/confidence_analyzer.py +761 -0
  73. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/config.py +590 -0
  74. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/copy_parser.py +249 -0
  75. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/date_translator.py +100 -0
  76. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/debug.py +631 -0
  77. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/error_handler.py +561 -0
  78. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/identifier_normalizer.py +397 -0
  79. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/logging_config.py +404 -0
  80. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/mappings/__init__.py +100 -0
  81. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/mappings/constructs.py +453 -0
  82. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/mappings/datatypes.py +745 -0
  83. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/mappings/document_filters.py +590 -0
  84. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/mappings/functions.py +562 -0
  85. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/metrics.py +762 -0
  86. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/models.py +599 -0
  87. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/normalizer.py +140 -0
  88. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/parser.py +664 -0
  89. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/performance_monitor.py +583 -0
  90. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/transaction_translator.py +262 -0
  91. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/translator.py +777 -0
  92. iris_pgwire-1.0.0/src/iris_pgwire/sql_translator/validator.py +726 -0
  93. iris_pgwire-1.0.0/src/iris_pgwire/type_mapping.py +395 -0
  94. iris_pgwire-1.0.0/src/iris_pgwire/vector_metrics.py +221 -0
  95. iris_pgwire-1.0.0/src/iris_pgwire/vector_optimizer.py +1114 -0
@@ -0,0 +1,80 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Unit test / coverage reports
35
+ htmlcov/
36
+ .tox/
37
+ .nox/
38
+ .coverage
39
+ .coverage.*
40
+ coverage.xml
41
+ *.cover
42
+ *.py,cover
43
+ .hypothesis/
44
+ .pytest_cache/
45
+ test_failures.jsonl
46
+
47
+ # Environments
48
+ .env
49
+ .venv
50
+ env/
51
+ venv/
52
+ ENV/
53
+ env.bak/
54
+ venv.bak/
55
+
56
+ # IDEs
57
+ .vscode/
58
+ .idea/
59
+ *.swp
60
+ *.swo
61
+ *~
62
+
63
+ # OS
64
+ .DS_Store
65
+ Thumbs.db
66
+
67
+ # Project specific
68
+ *.log
69
+ .mypy_cache/
70
+ .ruff_cache/
71
+ .dmypy.json
72
+ dmypy.json
73
+
74
+ # IRIS license keys (sensitive)
75
+ iris.key
76
+ *.key
77
+ docs/articles/developer-community-article.md
78
+ # Internal presentations
79
+ docs/presentations/
80
+ docs/articles/
@@ -0,0 +1,80 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+ - **P6 COPY Protocol** (Feature 023): PostgreSQL COPY FROM STDIN and COPY TO STDOUT for bulk data operations
12
+ - Bulk data import/export with CSV processing and streaming
13
+ - 1000-row batching for memory efficiency (<100MB for 1M rows)
14
+ - Transaction integration with automatic rollback on errors
15
+ - Query-based export support (`COPY (SELECT ...) TO STDOUT`)
16
+ - Performance: 600+ rows/second sustained throughput
17
+ - **Package Quality Validation System** (Feature 025): Automated PyPI readiness validation
18
+ - Comprehensive validators for metadata, code quality, security, and documentation
19
+ - CLI tool: `python -m iris_pgwire.quality` with JSON/Markdown output
20
+ - Integration with pyroma, black, ruff, mypy, bandit, pip-audit, interrogate
21
+ - 95.4% docstring coverage (exceeds 80% target)
22
+ - PEP 621 dynamic versioning support
23
+ - **PostgreSQL Parameter Placeholders** (Feature 018): Support for `$1, $2` parameter syntax with type inference
24
+ - Automatic type inference from CAST expressions (`$1::INTEGER`)
25
+ - Translation to IRIS `?` placeholders with proper type mapping
26
+ - asyncpg client compatibility improvements
27
+ - **PostgreSQL Transaction Verbs** (Feature 022): BEGIN/COMMIT/ROLLBACK translation
28
+ - Translation of PostgreSQL `BEGIN` to IRIS `START TRANSACTION`
29
+ - Full transaction state management
30
+ - Constitutional compliance: <0.1ms translation overhead
31
+
32
+ ### Fixed
33
+ - Dynamic versioning recognition in package metadata validation
34
+ - Python bytecode cleanup (95+ artifacts removed from git)
35
+ - Black code formatting (20 files reformatted to compliance)
36
+ - asyncpg parameter type OID inference from CAST expressions
37
+ - PostgreSQL compatibility documentation improvements
38
+
39
+ ### Security
40
+ - Upgraded authlib to 1.6.5 (fixes 3 HIGH severity CVEs)
41
+ - Upgraded cryptography to 46.0.3 (fixes 1 HIGH severity CVE)
42
+
43
+ ### Performance
44
+ - IRIS executemany() optimization for 4-10× performance improvement in bulk operations
45
+ - COPY protocol optimized for 600+ rows/second sustained throughput
46
+ - Memory-efficient streaming for large result sets
47
+
48
+ ## [0.1.0] - 2025-01-05
49
+
50
+ ### Added
51
+ - PostgreSQL wire protocol server for InterSystems IRIS
52
+ - Dual backend execution paths (DBAPI and Embedded Python)
53
+ - Support for vectors up to 188,962 dimensions (1.44 MB)
54
+ - pgvector compatibility layer with operator translation
55
+ - Async SQLAlchemy support (86% complete, production-ready)
56
+ - FastAPI integration with async database sessions
57
+ - Zero-configuration BI tools integration (Apache Superset, Metabase, Grafana)
58
+ - SQL Translation REST API with <5ms SLA
59
+ - Connection pooling with 50+20 async connections
60
+ - HNSW vector index support (5× speedup at 100K+ scale)
61
+ - Binary parameter encoding for large vectors (40% more compact)
62
+ - Constitutional compliance framework with 5ms SLA tracking
63
+ - Comprehensive documentation and examples
64
+
65
+ ### Performance
66
+ - ~4ms protocol translation overhead (preserves IRIS native performance)
67
+ - Simple query latency: 3.99ms avg, 4.29ms P95
68
+ - Vector similarity (1024D): 6.94ms avg, 8.05ms P95
69
+ - 100% success rate across all dimensions and execution paths
70
+
71
+ ### Documentation
72
+ - Complete BI tools setup guide
73
+ - Async SQLAlchemy quick reference
74
+ - Vector parameter binding documentation
75
+ - Dual-path architecture guide
76
+ - HNSW performance investigation findings
77
+ - Translation API reference
78
+
79
+ [Unreleased]: https://github.com/intersystems-community/iris-pgwire/compare/v0.1.0...HEAD
80
+ [0.1.0]: https://github.com/intersystems-community/iris-pgwire/releases/tag/v0.1.0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 IRIS PGWire Team
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.