tigrbl 0.3.30.dev1__tar.gz → 0.4.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 (113) hide show
  1. tigrbl-0.4.0/PKG-INFO +406 -0
  2. tigrbl-0.4.0/README.md +349 -0
  3. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/pyproject.toml +32 -8
  4. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/__init__.py +58 -0
  5. tigrbl-0.4.0/tigrbl/canonical_json.py +7 -0
  6. tigrbl-0.4.0/tigrbl/session/__init__.py +8 -0
  7. tigrbl-0.4.0/tigrbl/session/base.py +7 -0
  8. tigrbl-0.4.0/tigrbl/session/spec.py +7 -0
  9. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/diagnostics/__init__.py +10 -0
  10. tigrbl-0.4.0/tigrbl/system/diagnostics/healthz.py +285 -0
  11. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/types/__init__.py +0 -16
  12. tigrbl-0.3.30.dev1/PKG-INFO +0 -68
  13. tigrbl-0.3.30.dev1/README.md +0 -23
  14. tigrbl-0.3.30.dev1/tigrbl/system/diagnostics/healthz.py +0 -69
  15. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/LICENSE +0 -0
  16. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/__main__.py +0 -0
  17. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/cli.py +0 -0
  18. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/config/__init__.py +0 -0
  19. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/config/constants.py +0 -0
  20. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/config/defaults.py +0 -0
  21. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/ddl/__init__.py +0 -0
  22. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/decorators/__init__.py +0 -0
  23. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/decorators/allow_anon.py +0 -0
  24. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/decorators/engine.py +0 -0
  25. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/decorators/hook.py +0 -0
  26. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/decorators/middlewares.py +0 -0
  27. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/decorators/op.py +0 -0
  28. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/decorators/response.py +0 -0
  29. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/decorators/rest.py +0 -0
  30. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/decorators/schema.py +0 -0
  31. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/decorators/session.py +0 -0
  32. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/engine/__init__.py +0 -0
  33. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/engine/bind.py +0 -0
  34. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/engine/builders.py +0 -0
  35. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/engine/capabilities.py +0 -0
  36. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/engine/collect.py +0 -0
  37. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/engine/plugins.py +0 -0
  38. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/engine/registry.py +0 -0
  39. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/engine/resolver.py +0 -0
  40. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/factories/__init__.py +0 -0
  41. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/factories/app.py +0 -0
  42. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/factories/column.py +0 -0
  43. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/factories/engine.py +0 -0
  44. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/factories/hook.py +0 -0
  45. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/factories/op.py +0 -0
  46. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/factories/responses.py +0 -0
  47. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/factories/router.py +0 -0
  48. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/factories/schema.py +0 -0
  49. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/factories/table.py +0 -0
  50. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/hook/exceptions.py +0 -0
  51. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/hook/types.py +0 -0
  52. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/middlewares/__init__.py +0 -0
  53. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/middlewares/compose.py +0 -0
  54. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/op/__init__.py +0 -0
  55. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/op/canonical.py +0 -0
  56. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/op/collect.py +0 -0
  57. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/op/types.py +0 -0
  58. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/orm/__init__.py +0 -0
  59. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/requests.py +0 -0
  60. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/rest/__init__.py +0 -0
  61. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/schema/__init__.py +0 -0
  62. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/schema/builder/__init__.py +0 -0
  63. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/schema/builder/build_schema.py +0 -0
  64. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/schema/builder/cache.py +0 -0
  65. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/schema/builder/extras.py +0 -0
  66. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/schema/builder/helpers.py +0 -0
  67. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/schema/builder/list_params.py +0 -0
  68. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/schema/builder/strip_parent_fields.py +0 -0
  69. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/schema/utils.py +0 -0
  70. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/security/__init__.py +0 -0
  71. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/security/dependencies.py +0 -0
  72. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/shortcuts/__init__.py +0 -0
  73. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/shortcuts/app.py +0 -0
  74. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/shortcuts/column.py +0 -0
  75. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/shortcuts/engine.py +0 -0
  76. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/shortcuts/hook.py +0 -0
  77. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/shortcuts/op.py +0 -0
  78. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/shortcuts/responses.py +0 -0
  79. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/shortcuts/rest.py +0 -0
  80. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/shortcuts/router.py +0 -0
  81. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/shortcuts/schema.py +0 -0
  82. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/shortcuts/table.py +0 -0
  83. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/specs.py +0 -0
  84. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/__init__.py +0 -0
  85. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/diagnostics/hookz.py +0 -0
  86. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/diagnostics/kernelz.py +0 -0
  87. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/diagnostics/methodz.py +0 -0
  88. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/diagnostics/router.py +0 -0
  89. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/diagnostics/utils.py +0 -0
  90. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/docs/__init__.py +0 -0
  91. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/docs/lens.py +0 -0
  92. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/docs/openapi/__init__.py +0 -0
  93. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/docs/openapi/helpers.py +0 -0
  94. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/docs/openapi/metadata.py +0 -0
  95. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/docs/openapi/mount.py +0 -0
  96. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/docs/openapi/schema.py +0 -0
  97. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/docs/openrpc.py +0 -0
  98. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/docs/swagger.py +0 -0
  99. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/favicon/__init__.py +0 -0
  100. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/favicon/assets/favicon.svg +0 -0
  101. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/system/uvicorn.py +0 -0
  102. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/transport/__init__.py +0 -0
  103. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/transport/jsonrpc/__init__.py +0 -0
  104. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/transport/jsonrpc/helpers.py +0 -0
  105. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/transport/jsonrpc/models.py +0 -0
  106. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/transport/rest/__init__.py +0 -0
  107. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/transport/rest/aggregator.py +0 -0
  108. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/utils/__init__.py +0 -0
  109. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/utils/schema.py +0 -0
  110. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/vendor/__init__.py +0 -0
  111. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/vendor/jinja.py +0 -0
  112. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/vendor/pydantic.py +0 -0
  113. {tigrbl-0.3.30.dev1 → tigrbl-0.4.0}/tigrbl/vendor/sqlalchemy.py +0 -0
tigrbl-0.4.0/PKG-INFO ADDED
@@ -0,0 +1,406 @@
1
+ Metadata-Version: 2.4
2
+ Name: tigrbl
3
+ Version: 0.4.0
4
+ Summary: Schema-first ASGI framework for REST and JSON-RPC APIs built from SQLAlchemy models with typed validation, lifecycle hooks, and engine plugins.
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ Keywords: tigrbl,asgi,api,json-rpc,rest,sqlalchemy,pydantic,api-framework
8
+ Author: Jacob Stewart
9
+ Author-email: jacob@swarmauri.com
10
+ Requires-Python: >=3.10,<3.14
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Information Technology
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Internet :: WWW/HTTP
23
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Provides-Extra: postgres
26
+ Provides-Extra: servers
27
+ Provides-Extra: templates
28
+ Provides-Extra: tests
29
+ Requires-Dist: aiosqlite (>=0.19.0)
30
+ Requires-Dist: asyncpg (>=0.30.0) ; extra == "postgres"
31
+ Requires-Dist: greenlet (>=3.2.3)
32
+ Requires-Dist: gunicorn (>=21.2.0) ; extra == "servers"
33
+ Requires-Dist: httpx (>=0.27.0)
34
+ Requires-Dist: hypercorn (>=0.16.0) ; extra == "servers"
35
+ Requires-Dist: jinja2 (>=3.1.4) ; extra == "templates"
36
+ Requires-Dist: psycopg2-binary (>=2.9.9) ; extra == "postgres"
37
+ Requires-Dist: pydantic (>=2.0.0)
38
+ Requires-Dist: sqlalchemy (>=2.0)
39
+ Requires-Dist: tigrbl-atoms
40
+ Requires-Dist: tigrbl-base
41
+ Requires-Dist: tigrbl-canon
42
+ Requires-Dist: tigrbl-concrete
43
+ Requires-Dist: tigrbl-core
44
+ Requires-Dist: tigrbl-kernel
45
+ Requires-Dist: tigrbl-ops-oltp
46
+ Requires-Dist: tigrbl-orm
47
+ Requires-Dist: tigrbl-runtime
48
+ Requires-Dist: tigrbl-tests ; extra == "tests"
49
+ Requires-Dist: uvicorn
50
+ Project-URL: Discord, https://discord.gg/K4YTAPapjR
51
+ Project-URL: Homepage, https://github.com/tigrbl/tigrbl
52
+ Project-URL: Issues, https://github.com/tigrbl/tigrbl/issues
53
+ Project-URL: Organization, https://github.com/tigrbl
54
+ Project-URL: Repository, https://github.com/tigrbl/tigrbl
55
+ Description-Content-Type: text/markdown
56
+
57
+ ![Tigrbl Logo](https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/tigrbl_full_logo.png)
58
+
59
+ <p align="center">
60
+ <a href="https://pypi.org/project/tigrbl/">
61
+ <img src="https://img.shields.io/pypi/dm/tigrbl" alt="PyPI downloads for tigrbl"/></a>
62
+ <a href="https://hits.sh/github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl/">
63
+ <img src="https://hits.sh/github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl.svg" alt="Repository views for tigrbl"/></a>
64
+ <a href="https://pypi.org/project/tigrbl/">
65
+ <img src="https://img.shields.io/pypi/pyversions/tigrbl" alt="Supported Python versions for tigrbl"/></a>
66
+ <a href="https://pypi.org/project/tigrbl/">
67
+ <img src="https://img.shields.io/pypi/l/tigrbl" alt="PyPI license metadata for tigrbl"/></a>
68
+ <a href="https://pypi.org/project/tigrbl/">
69
+ <img src="https://img.shields.io/pypi/v/tigrbl?label=tigrbl&color=green" alt="PyPI version for tigrbl"/></a>
70
+ </p>
71
+
72
+ ---
73
+
74
+ # Tigrbl
75
+
76
+ **Start building a Tigrbl API: [install `tigrbl` from PyPI](https://pypi.org/project/tigrbl/) and open the [facade package source](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl).**
77
+
78
+ Tigrbl is the public facade package for building schema-first REST and JSON-RPC APIs from SQLAlchemy models with typed specs, canonical operation resolution, phase-aware hooks, dependency injection, security dependencies, runtime engines, and governed release evidence.
79
+
80
+ `tigrbl` is part of the Tigrbl package graph. It documents package-resident classes, concepts, extension points, and execution responsibilities while cross-linking to the facade, core specs, canonical mapping, runtime phases, concrete objects, operation packages, engine plugins, and Rust crates that complete the system.
81
+
82
+ ## Public operation model
83
+
84
+ - `tigrbl` is the productized facade. It re-exports the author-facing objects that developers use first: `TigrblApp`, `TigrblRouter`, `TableBase`, `Base`, `Column`, `op_ctx`, `hook_ctx`, `schema_ctx`, `engine_ctx`, `allow_anon`, `created_at`, `updated_at`, REST helpers, JSON-RPC helpers, security helpers, and system docs builders.
85
+ - The package is intentionally a facade over split packages. Public APIs stay importable from `tigrbl.*`, while resident concepts are implemented in packages such as `tigrbl_core`, `tigrbl_canon`, `tigrbl_runtime`, `tigrbl_concrete`, `tigrbl_ops_oltp`, and engine plugins.
86
+ - Use the facade when you want one install and one import surface for API authoring, route mounting, docs emission, engine binding, and request execution.
87
+
88
+ ## High-level feature and productization list
89
+
90
+ - Schema-first API construction from SQLAlchemy models, typed specs, Pydantic schemas, and canonical operation definitions.
91
+ - REST and JSON-RPC parity: the same operation specification can be exposed through REST routes and JSON-RPC methods, with OpenAPI and OpenRPC documentation surfaces carried by the concrete/system packages.
92
+ - Canonical operations: CRUD, bulk, analytical, realtime, stream, transfer, and datagram operation families are normalized through spec and canon packages before runtime execution.
93
+ - Phase lifecycle: request handling moves through explicit binding, parse, validation, authorization, pre-handler, handler, post-handler, transaction, response, and post-commit phases owned by the runtime/atom layers.
94
+ - Hook and dependency surfaces: model hooks, router hooks, REST deps, security dependencies (`secdeps`), anonymous-operation allowances, and engine context are first-class authoring inputs.
95
+ - Engine ecosystem: SQLite, PostgreSQL, in-memory, Redis, DuckDB, pandas, DataFrame, CSV, XLSX, PySpark, Snowflake, BigQuery, ClickHouse, cache, queue, pub/sub, Bloom, dedupe, key-value, LRU, and rate-limit packages are split as installable engine plugins.
96
+ - Native object model: concrete apps, routers, route wrappers, requests, responses, middleware, security schemes, docs builders, and engine providers are implemented as first-class package objects rather than hidden framework state.
97
+ - Benchmark positioning: Tigrbl is designed for schema-driven API generation and operation parity rather than hand-written route microframework ergonomics. Use `tigrbl_tests` for benchmark and parity surfaces when comparing Tigrbl and FastAPI style implementations.
98
+
99
+ ## Tigrbl versus FastAPI benchmark context
100
+
101
+ - FastAPI is a hand-authored ASGI application framework. Tigrbl is a schema-first ASGI framework that derives public operations, docs, security metadata, and REST/JSON-RPC surfaces from model and operation specs.
102
+ - Benchmark comparisons should separate route dispatch overhead from generated-operation value: Tigrbl emphasizes fewer handwritten routes, consistent CRUD/bulk behavior, and documentation parity across transports.
103
+ - Place benchmark fixtures, reproducible examples, and FastAPI comparison scripts in `tigrbl_tests`, then link published benchmark evidence from the facade README when release evidence exists.
104
+
105
+ ## Design-practice map
106
+
107
+ Tigrbl API design works best when each concern has a single package residence:
108
+
109
+ - Public API authoring belongs in the `tigrbl` facade: import `TigrblApp`, `TigrblRouter`, `TableBase`, decorators, security helpers, and schema/operation helpers from one place.
110
+ - Durable operation meaning belongs in [`tigrbl_core`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_core): `OpSpec`, binding specs, hook specs, engine specs, request/response specs, `secdeps`, and schema contracts.
111
+ - Canonical operation discovery belongs in [`tigrbl_canon`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_canon): model/router/app collection, MRO merge, REST path planning, RPC method planning, and engine resolution.
112
+ - Runtime execution belongs in [`tigrbl_runtime`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_runtime): phase lifecycle, transaction handling, protocol atoms, response encoding, callback fences, and Rust bridge surfaces.
113
+ - Concrete ASGI objects belong in [`tigrbl_concrete`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_concrete): apps, routers, routes, requests, responses, middleware, dependencies, security objects, docs builders, and diagnostics.
114
+ - Backend-specific session, transaction, persistence, and database guard behavior belongs in the split `tigrbl_engine_*` packages.
115
+
116
+ Use the facade for productized application code. Use the split package READMEs when you need the resident semantics of a class, decorator, phase, operation family, engine, or guard.
117
+
118
+ ## Terminology
119
+
120
+ | Term | Package residence | Meaning |
121
+ |------|-------------------|---------|
122
+ | Facade | `tigrbl` | Public authoring surface that keeps the split package graph importable from one package. |
123
+ | Table / model | `tigrbl`, `tigrbl_orm`, `tigrbl_core` | SQLAlchemy-backed resource definition and its portable table specification. |
124
+ | Operation | `tigrbl_core`, `tigrbl_canon`, `tigrbl_ops_*` | Verb-driven action such as `create`, `read`, `merge`, `query`, `stream`, or a custom operation. |
125
+ | Canon op | `tigrbl_canon` | Deterministic operation projection after decorators, inheritance, router/app inputs, bindings, hooks, and defaults are merged. |
126
+ | Binding | `tigrbl_core`, `tigrbl_canon` | REST, JSON-RPC, stream, SSE, WebSocket, or WebTransport exposure for an operation. |
127
+ | Hook | `tigrbl_core`, `tigrbl_concrete`, `tigrbl_runtime` | Callback attached to a phase such as `PRE_HANDLER`, `POST_HANDLER`, or `POST_COMMIT`. |
128
+ | Phase | `tigrbl_runtime`, `tigrbl_atoms` | Ordered runtime step where request parsing, validation, authorization, handlers, transactions, hooks, and response work occur. |
129
+ | Dependency | `tigrbl_concrete` | Callable injected into concrete routing or runtime execution. |
130
+ | Security dependency / `secdeps` | `tigrbl_core`, `tigrbl_concrete` | Operation-level security dependencies that also project OpenAPI security metadata. |
131
+ | Engine | `tigrbl_engine_*`, `tigrbl_concrete`, `tigrbl_runtime` | Backend session and transaction provider selected by application, router, model, or operation context. |
132
+ | Spec | `tigrbl_core`, `tigrbl_spec`, `tigrbl_rs_spec` | Portable description of apps, tables, operations, bindings, hooks, engines, requests, and responses. |
133
+
134
+ ## Canonical operation design
135
+
136
+ Default OLTP operations are intentionally boring. They should map predictably to REST routes, JSON-RPC methods, input shapes, output shapes, and transaction behavior.
137
+
138
+ | Verb | REST route | JSON-RPC method | Scope | Request body | Result |
139
+ |------|------------|-----------------|-------|--------------|--------|
140
+ | `create` | `POST /{resource}` | `Model.create` | collection | object | object |
141
+ | `read` | `GET /{resource}/{id}` | `Model.read` | member | identifier | object |
142
+ | `update` | `PATCH /{resource}/{id}` | `Model.update` | member | partial object | object |
143
+ | `replace` | `PUT /{resource}/{id}` | `Model.replace` | member | full object | object |
144
+ | `merge` | `PATCH /{resource}/{id}` | `Model.merge` | member | merge object | object |
145
+ | `delete` | `DELETE /{resource}/{id}` | `Model.delete` | member | identifier | object |
146
+ | `list` | `GET /{resource}` | `Model.list` | collection | query object | array |
147
+ | `clear` | `DELETE /{resource}` | `Model.clear` | collection | filter object | object |
148
+ | `bulk_create` | `POST /{resource}` | `Model.bulk_create` | collection | array | array |
149
+ | `bulk_update` | `PATCH /{resource}` | `Model.bulk_update` | collection | array | array |
150
+ | `bulk_replace` | `PUT /{resource}` | `Model.bulk_replace` | collection | array | array |
151
+ | `bulk_merge` | `PATCH /{resource}` | `Model.bulk_merge` | collection | array | array |
152
+ | `bulk_delete` | `DELETE /{resource}` | `Model.bulk_delete` | collection | filter object | object |
153
+
154
+ Design guidance:
155
+
156
+ - Prefer default CRUD verbs for resource lifecycle work; add custom operations only when the operation is domain-specific.
157
+ - Treat REST and JSON-RPC as projections of the same operation, not separate implementations.
158
+ - Keep `update`, `replace`, and `merge` semantically distinct: `update` patches supplied fields, `replace` represents PUT-style replacement, and `merge` is for merge/upsert style behavior where the operation contract allows it.
159
+ - Avoid conflicting REST claims. `bulk_create` and `create` both want collection `POST`; `bulk_delete` and `clear` both want collection `DELETE`. Keep JSON-RPC methods available for operation parity when one REST route must win.
160
+ - Put transactional CRUD behavior in `tigrbl_ops_oltp`, analytical behavior in `tigrbl_ops_olap`, realtime behavior in `tigrbl_ops_realtime`, and backend persistence rules in the engine package.
161
+
162
+ ## REST and JSON-RPC parity
163
+
164
+ The same table and operation definitions can produce REST and JSON-RPC surfaces. The authoring rule is: define the operation once, then let canon/runtime/concrete packages project it.
165
+
166
+ ```python
167
+ from tigrbl import TigrblApp
168
+ from tigrbl.factories.engine import mem
169
+ from tigrbl.orm.mixins import GUIDPk
170
+ from tigrbl.orm.tables import TableBase
171
+ from tigrbl.types import Column, String
172
+
173
+
174
+ class Widget(TableBase, GUIDPk):
175
+ __tablename__ = "readme_widgets"
176
+
177
+ name = Column(String, nullable=False)
178
+
179
+
180
+ app = TigrblApp(engine=mem(async_=False), mount_system=False)
181
+ app.include_table(Widget)
182
+ app.initialize()
183
+ app.mount_jsonrpc(prefix="/rpc")
184
+ ```
185
+
186
+ This pattern gives you a REST collection/member surface and a JSON-RPC method namespace from the same table operation set. Use [`tigrbl_canon`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_canon) to reason about why an operation is exposed, [`tigrbl_concrete`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_concrete) to inspect route and docs objects, and [`tigrbl_runtime`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_runtime) to inspect execution.
187
+
188
+ ## Custom operations
189
+
190
+ Use `op_ctx` when a table, router, or app needs a domain-specific operation that is still visible to canon mapping, REST routing, JSON-RPC dispatch, docs generation, and runtime execution.
191
+
192
+ ```python
193
+ from tigrbl import TigrblApp, op_ctx
194
+ from tigrbl.orm.tables import TableBase
195
+ from tigrbl.types import Column, Integer
196
+
197
+
198
+ class Health(TableBase):
199
+ __tablename__ = "readme_health"
200
+
201
+ id = Column(Integer, primary_key=True)
202
+
203
+ @op_ctx(alias="ping", target="custom", http_methods=("GET",))
204
+ def ping(cls, ctx):
205
+ return {"status": "ok", "owner": cls.__name__}
206
+
207
+
208
+ app = TigrblApp(mount_system=False)
209
+ app.include_table(Health)
210
+ ```
211
+
212
+ Design guidance:
213
+
214
+ - Give custom operations stable aliases; those aliases become documentation, routing, and RPC vocabulary.
215
+ - Use `target="custom"` for domain behavior that is not one of the canonical CRUD targets.
216
+ - Keep operation bodies small. Move persistence semantics into operation packages and engine-specific behavior into engine packages.
217
+
218
+ ## Phase lifecycle and hooks
219
+
220
+ Tigrbl operations execute through named phases. Hooks should enforce policy, normalize inputs, add audit behavior, trigger side effects, or enrich context without hiding the core operation contract.
221
+
222
+ | Phase | Design purpose |
223
+ |-------|----------------|
224
+ | `PRE_TX_BEGIN` | Validate request context before transaction work begins. |
225
+ | `START_TX` | Open or attach a transaction/session. |
226
+ | `PRE_HANDLER` | Authorize, normalize, validate, and prepare handler inputs. |
227
+ | `HANDLER` | Execute the operation handler. |
228
+ | `POST_HANDLER` | Shape handler output while still inside transaction scope. |
229
+ | `PRE_COMMIT` | Run final checks before commit. |
230
+ | `END_TX` | Commit/rollback and close transaction scope. |
231
+ | `POST_COMMIT` | Run committed side effects before the response is finalized. |
232
+ | `POST_RESPONSE` | Run after-response work. |
233
+ | `ON_<PHASE>_ERROR` | Handle phase-specific failures. |
234
+ | `ON_ERROR` | General fallback error handling. |
235
+ | `ON_ROLLBACK` | Cleanup after rollback. |
236
+
237
+ ```python
238
+ from tigrbl import hook_ctx
239
+ from tigrbl.orm.mixins import GUIDPk
240
+ from tigrbl.orm.tables import TableBase
241
+ from tigrbl.types import Column, String
242
+
243
+
244
+ class AuditedWidget(TableBase, GUIDPk):
245
+ __tablename__ = "readme_audited_widgets"
246
+
247
+ name = Column(String, nullable=False)
248
+
249
+ @hook_ctx(ops="create", phase="PRE_HANDLER")
250
+ def normalize_create(cls, ctx):
251
+ payload = ctx.get("payload") or {}
252
+ if "name" in payload:
253
+ payload["name"] = payload["name"].strip()
254
+ ctx["payload"] = payload
255
+ ```
256
+
257
+ Design guidance:
258
+
259
+ - Attach hooks where the behavior belongs: model hooks for model policy, router hooks for route-group policy, app hooks for application-wide policy.
260
+ - Prefer `PRE_HANDLER` for request normalization and authorization preparation.
261
+ - Prefer `POST_COMMIT` for committed side effects; avoid doing durable side effects before the transaction decision is known.
262
+ - Document non-obvious hooks in the package where the hook class or concept resides.
263
+
264
+ ## Security dependencies and dependencies
265
+
266
+ Security dependencies should be declared as operation metadata when they are part of the public operation contract. This keeps runtime authorization and OpenAPI security metadata aligned.
267
+
268
+ ```python
269
+ from tigrbl import HTTPBasic
270
+ from tigrbl._spec import OpSpec
271
+ from tigrbl.orm.mixins import GUIDPk
272
+ from tigrbl.orm.tables import TableBase
273
+ from tigrbl.security import Security
274
+ from tigrbl.types import Column, String
275
+
276
+
277
+ def basic_operator(
278
+ credential=Security(HTTPBasic(scheme_name="BasicAuth", realm="operators")),
279
+ ):
280
+ return credential
281
+
282
+
283
+ class SecureWidget(TableBase, GUIDPk):
284
+ __tablename__ = "readme_secure_widgets"
285
+
286
+ name = Column(String, nullable=False)
287
+ __tigrbl_ops__ = (
288
+ OpSpec(alias="read", target="read", secdeps=(basic_operator,)),
289
+ )
290
+ ```
291
+
292
+ Design guidance:
293
+
294
+ - Use `secdeps` when security is part of the operation contract and should appear in docs.
295
+ - Use concrete dependencies for route/runtime plumbing that is not itself a security scheme.
296
+ - Keep security scheme objects in `tigrbl_concrete`/`tigrbl.security`; keep operation metadata in `tigrbl_core`.
297
+
298
+ ## Engine selection and database guards
299
+
300
+ Engine selection should be explicit and close to the scope it affects.
301
+
302
+ ```python
303
+ from tigrbl import TigrblApp, engine_ctx
304
+ from tigrbl.factories.engine import mem
305
+ from tigrbl.orm.mixins import GUIDPk
306
+ from tigrbl.orm.tables import TableBase
307
+ from tigrbl.types import Column, String
308
+
309
+
310
+ @engine_ctx(kind="sqlite", mode="memory")
311
+ class LocalWidget(TableBase, GUIDPk):
312
+ __tablename__ = "readme_local_widgets"
313
+
314
+ name = Column(String, nullable=False)
315
+
316
+
317
+ app = TigrblApp(engine=mem(async_=False), mount_system=False)
318
+ app.include_table(LocalWidget)
319
+ ```
320
+
321
+ Design guidance:
322
+
323
+ - Put engine defaults at app/router scope when most tables share a backend.
324
+ - Put `engine_ctx` at model or operation scope when the backend choice is part of that resource or operation contract.
325
+ - Document database guard behavior in the engine README: connection lifecycle, transaction lifecycle, persistence boundary, local/remote credential expectations, durability assumptions, and cleanup behavior.
326
+
327
+ ## Benchmark and parity execution
328
+
329
+ The facade README should explain benchmark intent; the executable benchmark harness lives in `tigrbl_tests`.
330
+
331
+ ```bash
332
+ python pkgs/core/tigrbl_tests/benchmarks/run_hot_path_perf_suite.py --help
333
+ python -m pytest pkgs/core/tigrbl_tests/tests/perf/test_tigrbl_vs_fastapi_create_benchmark.py -q
334
+ ```
335
+
336
+ Benchmark guidance:
337
+
338
+ - Compare generated-operation value, route parity, documentation parity, and runtime behavior separately from raw route dispatch.
339
+ - Keep published benchmark artifacts under `pkgs/core/tigrbl_tests/tests/perf/` or another governed evidence path, then link the evidence from this facade README.
340
+ - When reporting Tigrbl versus FastAPI results, state the transport, operation count, database mode, server, concurrency model, and whether the comparison measures REST, JSON-RPC, streaming, SSE, WebSocket, or WebTransport.
341
+
342
+ ## Package ecosystem cross-links
343
+
344
+ Core cross-links:
345
+ - [`tigrbl`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl) - Facade package
346
+ - [`tigrbl_core`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_core) - Spec and primitive contracts
347
+ - [`tigrbl_canon`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_canon) - Canonical mapping and operation resolution
348
+ - [`tigrbl_runtime`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_runtime) - Phase lifecycle and execution runtime
349
+ - [`tigrbl_concrete`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_concrete) - Native objects, transports, hooks, deps, and secdeps
350
+ - [`tigrbl_ops_oltp`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_ops_oltp) - CRUD and transactional operation handlers
351
+ - [`tigrbl_ops_olap`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_ops_olap) - Analytical operation boundary
352
+ - [`tigrbl_ops_realtime`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_ops_realtime) - Stream, transfer, datagram, and realtime ops
353
+ - [`tigrbl_tests`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl_tests) - Examples, benchmark, parity, and package test surfaces
354
+ Engine cross-links:
355
+ - [`tigrbl_engine_sqlite`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/engines/tigrbl_engine_sqlite) - SQLite local transactional engine
356
+ - [`tigrbl_engine_postgres`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/engines/tigrbl_engine_postgres) - PostgreSQL SQLAlchemy engine
357
+ - [`tigrbl_engine_inmemory`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/engines/tigrbl_engine_inmemory) - Process-local transactional in-memory engine
358
+ - [`tigrbl_engine_redis`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/engines/tigrbl_engine_redis) - Redis cache/database engine
359
+ - [`tigrbl_engine_duckdb`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/engines/tigrbl_engine_duckdb) - DuckDB analytical engine
360
+ - [`tigrbl_engine_pandas`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/engines/tigrbl_engine_pandas) - pandas DataFrame engine
361
+ - [`tigrbl_engine_pgsqli_wal`](https://github.com/tigrbl/tigrbl/tree/master/pkgs/engines/tigrbl_engine_pgsqli_wal) - PostgreSQL and SQLite WAL engine
362
+ Rust cross-links:
363
+ - [`tigrbl_rs_spec`](https://github.com/tigrbl/tigrbl/tree/master/crates/tigrbl_rs_spec) - Rust IR and AppSpec model
364
+ - [`tigrbl_rs_atoms`](https://github.com/tigrbl/tigrbl/tree/master/crates/tigrbl_rs_atoms) - Rust atom catalog and phase algebra
365
+ - [`tigrbl_rs_kernel`](https://github.com/tigrbl/tigrbl/tree/master/crates/tigrbl_rs_kernel) - Rust compiler and plan optimizer
366
+ - [`tigrbl_rs_runtime`](https://github.com/tigrbl/tigrbl/tree/master/crates/tigrbl_rs_runtime) - Rust executor and callback fences
367
+ - [`tigrbl_rs_ports`](https://github.com/tigrbl/tigrbl/tree/master/crates/tigrbl_rs_ports) - Engine, session, transaction, callback, and handler ports
368
+
369
+ ## Install
370
+
371
+ ```bash
372
+ pip install tigrbl
373
+ ```
374
+
375
+ ## Package discovery
376
+
377
+ Search and AI discovery terms for `tigrbl` include: tigrbl, ASGI, REST, JSON-RPC, SQLAlchemy, Pydantic, asgi, api, json-rpc, rest, sqlalchemy, pydantic, api-framework.
378
+
379
+ ## Package-local entry point
380
+
381
+ This file is a package-local distribution entry point.
382
+ It is not the authoritative location for repository governance, current target status, current state reporting, certification claims, or release evidence.
383
+
384
+ ## Canonical repository docs
385
+
386
+ - `README.md`
387
+ - `docs/README.md`
388
+ - `docs/conformance/CURRENT_TARGET.md`
389
+ - `docs/conformance/CURRENT_STATE.md`
390
+ - `docs/conformance/NEXT_STEPS.md`
391
+ - `docs/governance/DOC_POINTERS.md`
392
+ - `docs/developer/PACKAGE_CATALOG.md`
393
+ - `docs/developer/PACKAGE_LAYOUT.md`
394
+
395
+ ## Package identity
396
+
397
+ - canonical repository: `https://github.com/tigrbl/tigrbl`
398
+ - organization: `https://github.com/tigrbl`
399
+ - social: `https://discord.gg/K4YTAPapjR`
400
+ - package path: `https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl`
401
+ - workspace path: `pkgs/core/tigrbl`
402
+ - workspace class: core Python package
403
+ - implementation layout: `tigrbl/`
404
+
405
+ Long-form repository documentation is governed from `docs/`.
406
+