tigrbl 0.4.0.dev2__tar.gz → 0.4.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.
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/LICENSE +1 -1
- tigrbl-0.4.1/PKG-INFO +639 -0
- tigrbl-0.4.1/README.md +380 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/pyproject.toml +29 -7
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/__init__.py +18 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/factories/router.py +8 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/docs/lens.py +2 -1
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/docs/openapi/schema.py +51 -3
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/docs/openrpc.py +62 -3
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/docs/swagger.py +2 -1
- tigrbl-0.4.0.dev2/PKG-INFO +0 -77
- tigrbl-0.4.0.dev2/README.md +0 -27
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/__main__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/canonical_json.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/cli.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/config/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/config/constants.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/config/defaults.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/ddl/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/decorators/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/decorators/allow_anon.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/decorators/engine.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/decorators/hook.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/decorators/middlewares.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/decorators/op.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/decorators/response.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/decorators/rest.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/decorators/schema.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/decorators/session.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/engine/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/engine/bind.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/engine/builders.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/engine/capabilities.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/engine/collect.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/engine/plugins.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/engine/registry.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/engine/resolver.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/factories/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/factories/app.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/factories/column.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/factories/engine.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/factories/hook.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/factories/op.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/factories/responses.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/factories/schema.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/factories/table.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/hook/exceptions.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/hook/types.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/middlewares/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/middlewares/compose.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/op/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/op/canonical.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/op/collect.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/op/types.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/orm/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/requests.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/rest/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/schema/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/schema/builder/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/schema/builder/build_schema.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/schema/builder/cache.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/schema/builder/extras.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/schema/builder/helpers.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/schema/builder/list_params.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/schema/builder/strip_parent_fields.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/schema/utils.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/security/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/security/dependencies.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/session/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/session/base.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/session/spec.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/shortcuts/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/shortcuts/app.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/shortcuts/column.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/shortcuts/engine.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/shortcuts/hook.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/shortcuts/op.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/shortcuts/responses.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/shortcuts/rest.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/shortcuts/router.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/shortcuts/schema.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/shortcuts/table.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/specs.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/diagnostics/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/diagnostics/healthz.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/diagnostics/hookz.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/diagnostics/kernelz.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/diagnostics/methodz.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/diagnostics/router.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/diagnostics/utils.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/docs/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/docs/openapi/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/docs/openapi/helpers.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/docs/openapi/metadata.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/docs/openapi/mount.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/favicon/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/favicon/assets/favicon.svg +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/system/uvicorn.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/transport/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/transport/jsonrpc/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/transport/jsonrpc/helpers.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/transport/jsonrpc/models.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/transport/rest/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/transport/rest/aggregator.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/types/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/utils/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/utils/schema.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/vendor/__init__.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/vendor/jinja.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/vendor/pydantic.py +0 -0
- {tigrbl-0.4.0.dev2 → tigrbl-0.4.1}/tigrbl/vendor/sqlalchemy.py +0 -0
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright [
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
tigrbl-0.4.1/PKG-INFO
ADDED
|
@@ -0,0 +1,639 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tigrbl
|
|
3
|
+
Version: 0.4.1
|
|
4
|
+
Summary: Schema-first ASGI API framework for REST, JSON-RPC, OpenAPI, OpenRPC, SQLAlchemy models, typed validation, lifecycle hooks, and engine plugins.
|
|
5
|
+
License: Apache License
|
|
6
|
+
Version 2.0, January 2004
|
|
7
|
+
http://www.apache.org/licenses/
|
|
8
|
+
|
|
9
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
10
|
+
|
|
11
|
+
1. Definitions.
|
|
12
|
+
|
|
13
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
14
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
15
|
+
|
|
16
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
17
|
+
the copyright owner that is granting the License.
|
|
18
|
+
|
|
19
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
20
|
+
other entities that control, are controlled by, or are under common
|
|
21
|
+
control with that entity. For the purposes of this definition,
|
|
22
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
23
|
+
direction or management of such entity, whether by contract or
|
|
24
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
25
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
26
|
+
|
|
27
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
28
|
+
exercising permissions granted by this License.
|
|
29
|
+
|
|
30
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
31
|
+
including but not limited to software source code, documentation
|
|
32
|
+
source, and configuration files.
|
|
33
|
+
|
|
34
|
+
"Object" form shall mean any form resulting from mechanical
|
|
35
|
+
transformation or translation of a Source form, including but
|
|
36
|
+
not limited to compiled object code, generated documentation,
|
|
37
|
+
and conversions to other media types.
|
|
38
|
+
|
|
39
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
40
|
+
Object form, made available under the License, as indicated by a
|
|
41
|
+
copyright notice that is included in or attached to the work
|
|
42
|
+
(an example is provided in the Appendix below).
|
|
43
|
+
|
|
44
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
45
|
+
form, that is based on (or derived from) the Work and for which the
|
|
46
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
47
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
48
|
+
of this License, Derivative Works shall not include works that remain
|
|
49
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
50
|
+
the Work and Derivative Works thereof.
|
|
51
|
+
|
|
52
|
+
"Contribution" shall mean any work of authorship, including
|
|
53
|
+
the original version of the Work and any modifications or additions
|
|
54
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
55
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
56
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
57
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
58
|
+
means any form of electronic, verbal, or written communication sent
|
|
59
|
+
to the Licensor or its representatives, including but not limited to
|
|
60
|
+
communication on electronic mailing lists, source code control systems,
|
|
61
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
62
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
63
|
+
excluding communication that is conspicuously marked or otherwise
|
|
64
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
65
|
+
|
|
66
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
67
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
68
|
+
subsequently incorporated within the Work.
|
|
69
|
+
|
|
70
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
71
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
72
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
73
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
74
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
75
|
+
Work and such Derivative Works in Source or Object form.
|
|
76
|
+
|
|
77
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
78
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
79
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
80
|
+
(except as stated in this section) patent license to make, have made,
|
|
81
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
82
|
+
where such license applies only to those patent claims licensable
|
|
83
|
+
by such Contributor that are necessarily infringed by their
|
|
84
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
85
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
86
|
+
institute patent litigation against any entity (including a
|
|
87
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
88
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
89
|
+
or contributory patent infringement, then any patent licenses
|
|
90
|
+
granted to You under this License for that Work shall terminate
|
|
91
|
+
as of the date such litigation is filed.
|
|
92
|
+
|
|
93
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
94
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
95
|
+
modifications, and in Source or Object form, provided that You
|
|
96
|
+
meet the following conditions:
|
|
97
|
+
|
|
98
|
+
(a) You must give any other recipients of the Work or
|
|
99
|
+
Derivative Works a copy of this License; and
|
|
100
|
+
|
|
101
|
+
(b) You must cause any modified files to carry prominent notices
|
|
102
|
+
stating that You changed the files; and
|
|
103
|
+
|
|
104
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
105
|
+
that You distribute, all copyright, patent, trademark, and
|
|
106
|
+
attribution notices from the Source form of the Work,
|
|
107
|
+
excluding those notices that do not pertain to any part of
|
|
108
|
+
the Derivative Works; and
|
|
109
|
+
|
|
110
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
111
|
+
distribution, then any Derivative Works that You distribute must
|
|
112
|
+
include a readable copy of the attribution notices contained
|
|
113
|
+
within such NOTICE file, excluding those notices that do not
|
|
114
|
+
pertain to any part of the Derivative Works, in at least one
|
|
115
|
+
of the following places: within a NOTICE text file distributed
|
|
116
|
+
as part of the Derivative Works; within the Source form or
|
|
117
|
+
documentation, if provided along with the Derivative Works; or,
|
|
118
|
+
within a display generated by the Derivative Works, if and
|
|
119
|
+
wherever such third-party notices normally appear. The contents
|
|
120
|
+
of the NOTICE file are for informational purposes only and
|
|
121
|
+
do not modify the License. You may add Your own attribution
|
|
122
|
+
notices within Derivative Works that You distribute, alongside
|
|
123
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
124
|
+
that such additional attribution notices cannot be construed
|
|
125
|
+
as modifying the License.
|
|
126
|
+
|
|
127
|
+
You may add Your own copyright statement to Your modifications and
|
|
128
|
+
may provide additional or different license terms and conditions
|
|
129
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
130
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
131
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
132
|
+
the conditions stated in this License.
|
|
133
|
+
|
|
134
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
135
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
136
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
137
|
+
this License, without any additional terms or conditions.
|
|
138
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
139
|
+
the terms of any separate license agreement you may have executed
|
|
140
|
+
with Licensor regarding such Contributions.
|
|
141
|
+
|
|
142
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
143
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
144
|
+
except as required for reasonable and customary use in describing the
|
|
145
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
146
|
+
|
|
147
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
148
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
149
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
150
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
151
|
+
implied, including, without limitation, any warranties or conditions
|
|
152
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
153
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
154
|
+
appropriateness of using or redistributing the Work and assume any
|
|
155
|
+
risks associated with Your exercise of permissions under this License.
|
|
156
|
+
|
|
157
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
158
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
159
|
+
unless required by applicable law (such as deliberate and grossly
|
|
160
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
161
|
+
liable to You for damages, including any direct, indirect, special,
|
|
162
|
+
incidental, or consequential damages of any character arising as a
|
|
163
|
+
result of this License or out of the use or inability to use the
|
|
164
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
165
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
166
|
+
other commercial damages or losses), even if such Contributor
|
|
167
|
+
has been advised of the possibility of such damages.
|
|
168
|
+
|
|
169
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
170
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
171
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
172
|
+
or other liability obligations and/or rights consistent with this
|
|
173
|
+
License. However, in accepting such obligations, You may act only
|
|
174
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
175
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
176
|
+
defend, and hold each Contributor harmless for any liability
|
|
177
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
178
|
+
of your accepting any such warranty or additional liability.
|
|
179
|
+
|
|
180
|
+
END OF TERMS AND CONDITIONS
|
|
181
|
+
|
|
182
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
183
|
+
|
|
184
|
+
To apply the Apache License to your work, attach the following
|
|
185
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
186
|
+
replaced with your own identifying information. (Don't include
|
|
187
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
188
|
+
comment syntax for the file format. We also recommend that a
|
|
189
|
+
file or class name and description of purpose be included on the
|
|
190
|
+
same "printed page" as the copyright notice for easier
|
|
191
|
+
identification within third-party archives.
|
|
192
|
+
|
|
193
|
+
Copyright [yyyy] [name of copyright owner]
|
|
194
|
+
|
|
195
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
196
|
+
you may not use this file except in compliance with the License.
|
|
197
|
+
You may obtain a copy of the License at
|
|
198
|
+
|
|
199
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
200
|
+
|
|
201
|
+
Unless required by applicable law or agreed to in writing, software
|
|
202
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
203
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
204
|
+
See the License for the specific language governing permissions and
|
|
205
|
+
limitations under the License.
|
|
206
|
+
License-File: LICENSE
|
|
207
|
+
Keywords: tigrbl,asgi,api,json-rpc,rest,sqlalchemy,pydantic,api-framework,framework,openapi,openrpc,schema-first
|
|
208
|
+
Author: Jacob Stewart
|
|
209
|
+
Author-email: jacob@swarmauri.com
|
|
210
|
+
Requires-Python: >=3.10,<3.15
|
|
211
|
+
Classifier: Development Status :: 3 - Alpha
|
|
212
|
+
Classifier: Intended Audience :: Developers
|
|
213
|
+
Classifier: Intended Audience :: Information Technology
|
|
214
|
+
Classifier: Framework :: AsyncIO
|
|
215
|
+
Classifier: Operating System :: OS Independent
|
|
216
|
+
Classifier: Programming Language :: Python
|
|
217
|
+
Classifier: Programming Language :: Python :: 3
|
|
218
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
219
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
220
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
221
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
222
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
223
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
224
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
225
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
226
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
227
|
+
Provides-Extra: postgres
|
|
228
|
+
Provides-Extra: servers
|
|
229
|
+
Provides-Extra: templates
|
|
230
|
+
Provides-Extra: tests
|
|
231
|
+
Requires-Dist: aiosqlite (>=0.19.0)
|
|
232
|
+
Requires-Dist: asyncpg (>=0.30.0) ; extra == "postgres"
|
|
233
|
+
Requires-Dist: greenlet (>=3.2.3)
|
|
234
|
+
Requires-Dist: gunicorn (>=21.2.0) ; extra == "servers"
|
|
235
|
+
Requires-Dist: httpx (>=0.27.0)
|
|
236
|
+
Requires-Dist: hypercorn (>=0.16.0) ; extra == "servers"
|
|
237
|
+
Requires-Dist: jinja2 (>=3.1.4) ; extra == "templates"
|
|
238
|
+
Requires-Dist: psycopg2-binary (>=2.9.9) ; extra == "postgres"
|
|
239
|
+
Requires-Dist: pydantic (>=2.0.0)
|
|
240
|
+
Requires-Dist: sqlalchemy (>=2.0)
|
|
241
|
+
Requires-Dist: tigrbl-atoms
|
|
242
|
+
Requires-Dist: tigrbl-base
|
|
243
|
+
Requires-Dist: tigrbl-canon
|
|
244
|
+
Requires-Dist: tigrbl-concrete
|
|
245
|
+
Requires-Dist: tigrbl-core
|
|
246
|
+
Requires-Dist: tigrbl-kernel
|
|
247
|
+
Requires-Dist: tigrbl-ops-oltp
|
|
248
|
+
Requires-Dist: tigrbl-orm
|
|
249
|
+
Requires-Dist: tigrbl-runtime
|
|
250
|
+
Requires-Dist: tigrbl-tests ; extra == "tests"
|
|
251
|
+
Requires-Dist: uvicorn
|
|
252
|
+
Project-URL: Discord, https://discord.gg/K4YTAPapjR
|
|
253
|
+
Project-URL: Homepage, https://github.com/tigrbl/tigrbl
|
|
254
|
+
Project-URL: Issues, https://github.com/tigrbl/tigrbl/issues
|
|
255
|
+
Project-URL: Organization, https://github.com/tigrbl
|
|
256
|
+
Project-URL: Repository, https://github.com/tigrbl/tigrbl
|
|
257
|
+
Description-Content-Type: text/markdown
|
|
258
|
+
|
|
259
|
+

|
|
260
|
+
|
|
261
|
+
<p align="center">
|
|
262
|
+
<a href="https://pepy.tech/project/tigrbl">
|
|
263
|
+
<img src="https://static.pepy.tech/badge/tigrbl" alt="Pepy downloads for tigrbl"/></a>
|
|
264
|
+
<a href="https://hits.sh/github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl/">
|
|
265
|
+
<img src="https://hits.sh/github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl.svg" alt="Repository views for tigrbl"/></a>
|
|
266
|
+
<a href="https://pypi.org/project/tigrbl/">
|
|
267
|
+
<img src="https://img.shields.io/badge/python-3.10--3.14-blue" alt="Python 3.10 through 3.14"/></a>
|
|
268
|
+
<a href="https://pypi.org/project/tigrbl/">
|
|
269
|
+
<img src="https://img.shields.io/pypi/l/tigrbl" alt="PyPI license metadata for tigrbl"/></a>
|
|
270
|
+
<a href="https://pypi.org/project/tigrbl/">
|
|
271
|
+
<img src="https://img.shields.io/pypi/v/tigrbl?label=tigrbl&color=green" alt="PyPI version for tigrbl"/></a>
|
|
272
|
+
</p>
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
<h1 align="center">Tigrbl</h1>
|
|
277
|
+
|
|
278
|
+
**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).**
|
|
279
|
+
|
|
280
|
+
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.
|
|
281
|
+
|
|
282
|
+
`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, OpenAPI/OpenRPC documentation surfaces, and PyPI distributions that complete the system.
|
|
283
|
+
|
|
284
|
+
## Public operation model
|
|
285
|
+
|
|
286
|
+
- `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.
|
|
287
|
+
- 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.
|
|
288
|
+
- Use the facade when you want one install and one import surface for API authoring, route mounting, docs emission, engine binding, and request execution.
|
|
289
|
+
|
|
290
|
+
## High-level feature and productization list
|
|
291
|
+
|
|
292
|
+
- Schema-first API construction from SQLAlchemy models, typed specs, Pydantic schemas, and canonical operation definitions.
|
|
293
|
+
- 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.
|
|
294
|
+
- Canonical operations: CRUD, bulk, analytical, realtime, stream, transfer, and datagram operation families are normalized through spec and canon packages before runtime execution.
|
|
295
|
+
- 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.
|
|
296
|
+
- Hook and dependency surfaces: model hooks, router hooks, REST deps, security dependencies (`secdeps`), anonymous-operation allowances, and engine context are first-class authoring inputs.
|
|
297
|
+
- 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.
|
|
298
|
+
- 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.
|
|
299
|
+
- 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.
|
|
300
|
+
|
|
301
|
+
## Tigrbl versus FastAPI benchmark context
|
|
302
|
+
|
|
303
|
+
- 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.
|
|
304
|
+
- 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.
|
|
305
|
+
- 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.
|
|
306
|
+
|
|
307
|
+
## Design-practice map
|
|
308
|
+
|
|
309
|
+
Tigrbl API design works best when each concern has a single package residence:
|
|
310
|
+
|
|
311
|
+
- Public API authoring belongs in the `tigrbl` facade: import `TigrblApp`, `TigrblRouter`, `TableBase`, decorators, security helpers, and schema/operation helpers from one place.
|
|
312
|
+
- 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.
|
|
313
|
+
- 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.
|
|
314
|
+
- 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.
|
|
315
|
+
- 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.
|
|
316
|
+
- Backend-specific session, transaction, persistence, and database guard behavior belongs in the split `tigrbl_engine_*` packages.
|
|
317
|
+
|
|
318
|
+
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.
|
|
319
|
+
|
|
320
|
+
## Terminology
|
|
321
|
+
|
|
322
|
+
| Term | Package residence | Meaning |
|
|
323
|
+
|------|-------------------|---------|
|
|
324
|
+
| Facade | `tigrbl` | Public authoring surface that keeps the split package graph importable from one package. |
|
|
325
|
+
| Table / model | `tigrbl`, `tigrbl_orm`, `tigrbl_core` | SQLAlchemy-backed resource definition and its portable table specification. |
|
|
326
|
+
| Operation | `tigrbl_core`, `tigrbl_canon`, `tigrbl_ops_*` | Verb-driven action such as `create`, `read`, `merge`, `query`, `stream`, or a custom operation. |
|
|
327
|
+
| Canon op | `tigrbl_canon` | Deterministic operation projection after decorators, inheritance, router/app inputs, bindings, hooks, and defaults are merged. |
|
|
328
|
+
| Binding | `tigrbl_core`, `tigrbl_canon` | REST, JSON-RPC, stream, SSE, WebSocket, or WebTransport exposure for an operation. |
|
|
329
|
+
| Hook | `tigrbl_core`, `tigrbl_concrete`, `tigrbl_runtime` | Callback attached to a phase such as `PRE_HANDLER`, `POST_HANDLER`, or `POST_COMMIT`. |
|
|
330
|
+
| Phase | `tigrbl_runtime`, `tigrbl_atoms` | Ordered runtime step where request parsing, validation, authorization, handlers, transactions, hooks, and response work occur. |
|
|
331
|
+
| Dependency | `tigrbl_concrete` | Callable injected into concrete routing or runtime execution. |
|
|
332
|
+
| Security dependency / `secdeps` | `tigrbl_core`, `tigrbl_concrete` | Operation-level security dependencies that also project OpenAPI security metadata. |
|
|
333
|
+
| Engine | `tigrbl_engine_*`, `tigrbl_concrete`, `tigrbl_runtime` | Backend session and transaction provider selected by application, router, model, or operation context. |
|
|
334
|
+
| Spec | `tigrbl_core`, `tigrbl_spec`, `tigrbl_rs_spec` | Portable description of apps, tables, operations, bindings, hooks, engines, requests, and responses. |
|
|
335
|
+
|
|
336
|
+
## Canonical operation design
|
|
337
|
+
|
|
338
|
+
Default OLTP operations are intentionally boring. They should map predictably to REST routes, JSON-RPC methods, input shapes, output shapes, and transaction behavior.
|
|
339
|
+
|
|
340
|
+
| Verb | REST route | JSON-RPC method | Scope | Request body | Result |
|
|
341
|
+
|------|------------|-----------------|-------|--------------|--------|
|
|
342
|
+
| `create` | `POST /{resource}` | `Model.create` | collection | object | object |
|
|
343
|
+
| `read` | `GET /{resource}/{id}` | `Model.read` | member | identifier | object |
|
|
344
|
+
| `update` | `PATCH /{resource}/{id}` | `Model.update` | member | partial object | object |
|
|
345
|
+
| `replace` | `PUT /{resource}/{id}` | `Model.replace` | member | full object | object |
|
|
346
|
+
| `merge` | `PATCH /{resource}/{id}` | `Model.merge` | member | merge object | object |
|
|
347
|
+
| `delete` | `DELETE /{resource}/{id}` | `Model.delete` | member | identifier | object |
|
|
348
|
+
| `list` | `GET /{resource}` | `Model.list` | collection | query object | array |
|
|
349
|
+
| `clear` | `DELETE /{resource}` | `Model.clear` | collection | filter object | object |
|
|
350
|
+
| `bulk_create` | `POST /{resource}` | `Model.bulk_create` | collection | array | array |
|
|
351
|
+
| `bulk_update` | `PATCH /{resource}` | `Model.bulk_update` | collection | array | array |
|
|
352
|
+
| `bulk_replace` | `PUT /{resource}` | `Model.bulk_replace` | collection | array | array |
|
|
353
|
+
| `bulk_merge` | `PATCH /{resource}` | `Model.bulk_merge` | collection | array | array |
|
|
354
|
+
| `bulk_delete` | `DELETE /{resource}` | `Model.bulk_delete` | collection | filter object | object |
|
|
355
|
+
|
|
356
|
+
Design guidance:
|
|
357
|
+
|
|
358
|
+
- Prefer default CRUD verbs for resource lifecycle work; add custom operations only when the operation is domain-specific.
|
|
359
|
+
- Treat REST and JSON-RPC as projections of the same operation, not separate implementations.
|
|
360
|
+
- 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.
|
|
361
|
+
- 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.
|
|
362
|
+
- 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.
|
|
363
|
+
|
|
364
|
+
## REST and JSON-RPC parity
|
|
365
|
+
|
|
366
|
+
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.
|
|
367
|
+
|
|
368
|
+
```python
|
|
369
|
+
from tigrbl import TigrblApp
|
|
370
|
+
from tigrbl.factories.engine import mem
|
|
371
|
+
from tigrbl.orm.mixins import GUIDPk
|
|
372
|
+
from tigrbl.orm.tables import TableBase
|
|
373
|
+
from tigrbl.types import Column, String
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
class Widget(TableBase, GUIDPk):
|
|
377
|
+
__tablename__ = "readme_widgets"
|
|
378
|
+
|
|
379
|
+
name = Column(String, nullable=False)
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
app = TigrblApp(engine=mem(async_=False), mount_system=False)
|
|
383
|
+
app.include_table(Widget)
|
|
384
|
+
app.initialize()
|
|
385
|
+
app.mount_jsonrpc(prefix="/rpc")
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
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.
|
|
389
|
+
|
|
390
|
+
## Custom operations
|
|
391
|
+
|
|
392
|
+
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.
|
|
393
|
+
|
|
394
|
+
```python
|
|
395
|
+
from tigrbl import TigrblApp, op_ctx
|
|
396
|
+
from tigrbl.orm.tables import TableBase
|
|
397
|
+
from tigrbl.types import Column, Integer
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
class Health(TableBase):
|
|
401
|
+
__tablename__ = "readme_health"
|
|
402
|
+
|
|
403
|
+
id = Column(Integer, primary_key=True)
|
|
404
|
+
|
|
405
|
+
@op_ctx(alias="ping", target="custom", http_methods=("GET",))
|
|
406
|
+
def ping(cls, ctx):
|
|
407
|
+
return {"status": "ok", "owner": cls.__name__}
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
app = TigrblApp(mount_system=False)
|
|
411
|
+
app.include_table(Health)
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
Design guidance:
|
|
415
|
+
|
|
416
|
+
- Give custom operations stable aliases; those aliases become documentation, routing, and RPC vocabulary.
|
|
417
|
+
- Use `target="custom"` for domain behavior that is not one of the canonical CRUD targets.
|
|
418
|
+
- Keep operation bodies small. Move persistence semantics into operation packages and engine-specific behavior into engine packages.
|
|
419
|
+
|
|
420
|
+
## Phase lifecycle and hooks
|
|
421
|
+
|
|
422
|
+
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.
|
|
423
|
+
|
|
424
|
+
| Phase | Design purpose |
|
|
425
|
+
|-------|----------------|
|
|
426
|
+
| `PRE_TX_BEGIN` | Validate request context before transaction work begins. |
|
|
427
|
+
| `START_TX` | Open or attach a transaction/session. |
|
|
428
|
+
| `PRE_HANDLER` | Authorize, normalize, validate, and prepare handler inputs. |
|
|
429
|
+
| `HANDLER` | Execute the operation handler. |
|
|
430
|
+
| `POST_HANDLER` | Shape handler output while still inside transaction scope. |
|
|
431
|
+
| `PRE_COMMIT` | Run final checks before commit. |
|
|
432
|
+
| `END_TX` | Commit/rollback and close transaction scope. |
|
|
433
|
+
| `POST_COMMIT` | Run committed side effects before the response is finalized. |
|
|
434
|
+
| `POST_RESPONSE` | Run after-response work. |
|
|
435
|
+
| `ON_<PHASE>_ERROR` | Handle phase-specific failures. |
|
|
436
|
+
| `ON_ERROR` | General fallback error handling. |
|
|
437
|
+
| `ON_ROLLBACK` | Cleanup after rollback. |
|
|
438
|
+
|
|
439
|
+
```python
|
|
440
|
+
from tigrbl import hook_ctx
|
|
441
|
+
from tigrbl.orm.mixins import GUIDPk
|
|
442
|
+
from tigrbl.orm.tables import TableBase
|
|
443
|
+
from tigrbl.types import Column, String
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
class AuditedWidget(TableBase, GUIDPk):
|
|
447
|
+
__tablename__ = "readme_audited_widgets"
|
|
448
|
+
|
|
449
|
+
name = Column(String, nullable=False)
|
|
450
|
+
|
|
451
|
+
@hook_ctx(ops="create", phase="PRE_HANDLER")
|
|
452
|
+
def normalize_create(cls, ctx):
|
|
453
|
+
payload = ctx.get("payload") or {}
|
|
454
|
+
if "name" in payload:
|
|
455
|
+
payload["name"] = payload["name"].strip()
|
|
456
|
+
ctx["payload"] = payload
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
Design guidance:
|
|
460
|
+
|
|
461
|
+
- Attach hooks where the behavior belongs: model hooks for model policy, router hooks for route-group policy, app hooks for application-wide policy.
|
|
462
|
+
- Prefer `PRE_HANDLER` for request normalization and authorization preparation.
|
|
463
|
+
- Prefer `POST_COMMIT` for committed side effects; avoid doing durable side effects before the transaction decision is known.
|
|
464
|
+
- Document non-obvious hooks in the package where the hook class or concept resides.
|
|
465
|
+
|
|
466
|
+
## Security dependencies and dependencies
|
|
467
|
+
|
|
468
|
+
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.
|
|
469
|
+
|
|
470
|
+
```python
|
|
471
|
+
from tigrbl import HTTPBasic
|
|
472
|
+
from tigrbl._spec import OpSpec
|
|
473
|
+
from tigrbl.orm.mixins import GUIDPk
|
|
474
|
+
from tigrbl.orm.tables import TableBase
|
|
475
|
+
from tigrbl.security import Security
|
|
476
|
+
from tigrbl.types import Column, String
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
def basic_operator(
|
|
480
|
+
credential=Security(HTTPBasic(scheme_name="BasicAuth", realm="operators")),
|
|
481
|
+
):
|
|
482
|
+
return credential
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
class SecureWidget(TableBase, GUIDPk):
|
|
486
|
+
__tablename__ = "readme_secure_widgets"
|
|
487
|
+
|
|
488
|
+
name = Column(String, nullable=False)
|
|
489
|
+
__tigrbl_ops__ = (
|
|
490
|
+
OpSpec(alias="read", target="read", secdeps=(basic_operator,)),
|
|
491
|
+
)
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
Design guidance:
|
|
495
|
+
|
|
496
|
+
- Use `secdeps` when security is part of the operation contract and should appear in docs.
|
|
497
|
+
- Use concrete dependencies for route/runtime plumbing that is not itself a security scheme.
|
|
498
|
+
- Keep security scheme objects in `tigrbl_concrete`/`tigrbl.security`; keep operation metadata in `tigrbl_core`.
|
|
499
|
+
|
|
500
|
+
## Engine selection and database guards
|
|
501
|
+
|
|
502
|
+
Engine selection should be explicit and close to the scope it affects.
|
|
503
|
+
|
|
504
|
+
```python
|
|
505
|
+
from tigrbl import TigrblApp, engine_ctx
|
|
506
|
+
from tigrbl.factories.engine import mem
|
|
507
|
+
from tigrbl.orm.mixins import GUIDPk
|
|
508
|
+
from tigrbl.orm.tables import TableBase
|
|
509
|
+
from tigrbl.types import Column, String
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
@engine_ctx(kind="sqlite", mode="memory")
|
|
513
|
+
class LocalWidget(TableBase, GUIDPk):
|
|
514
|
+
__tablename__ = "readme_local_widgets"
|
|
515
|
+
|
|
516
|
+
name = Column(String, nullable=False)
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
app = TigrblApp(engine=mem(async_=False), mount_system=False)
|
|
520
|
+
app.include_table(LocalWidget)
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
Design guidance:
|
|
524
|
+
|
|
525
|
+
- Put engine defaults at app/router scope when most tables share a backend.
|
|
526
|
+
- Put `engine_ctx` at model or operation scope when the backend choice is part of that resource or operation contract.
|
|
527
|
+
- Document database guard behavior in the engine README: connection lifecycle, transaction lifecycle, persistence boundary, local/remote credential expectations, durability assumptions, and cleanup behavior.
|
|
528
|
+
|
|
529
|
+
## Benchmark and parity execution
|
|
530
|
+
|
|
531
|
+
The facade README should explain benchmark intent; the executable benchmark harness lives in `tigrbl_tests`.
|
|
532
|
+
|
|
533
|
+
```bash
|
|
534
|
+
python pkgs/core/tigrbl_tests/benchmarks/run_hot_path_perf_suite.py --help
|
|
535
|
+
python -m pytest pkgs/core/tigrbl_tests/tests/perf/test_tigrbl_vs_fastapi_create_benchmark.py -q
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
Benchmark guidance:
|
|
539
|
+
|
|
540
|
+
- Compare generated-operation value, route parity, documentation parity, and runtime behavior separately from raw route dispatch.
|
|
541
|
+
- Keep published benchmark artifacts under `pkgs/core/tigrbl_tests/tests/perf/` or another governed evidence path, then link the evidence from this facade README.
|
|
542
|
+
- 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.
|
|
543
|
+
|
|
544
|
+
## Package ecosystem cross-links
|
|
545
|
+
|
|
546
|
+
Every Tigrbl Python package links to its sibling distributions on PyPI so package indexes, search engines, answer engines, dependency scanners, and human readers can move through the installable package graph without falling back to source-tree paths.
|
|
547
|
+
|
|
548
|
+
Core packages:
|
|
549
|
+
- [`tigrbl`](https://pypi.org/project/tigrbl/) (this package) - Schema-first ASGI API framework for REST, JSON-RPC, OpenAPI, OpenRPC, SQLAlchemy models, typed validation, lifecycle hooks, and engine plugins.
|
|
550
|
+
- [`tigrbl-atoms`](https://pypi.org/project/tigrbl-atoms/) - Runtime atom utilities for Tigrbl planning, dispatch, transport ingress, egress, and high-throughput ASGI execution pipelines.
|
|
551
|
+
- [`tigrbl-base`](https://pypi.org/project/tigrbl-base/) - Abstract base interfaces for Tigrbl APIs, engines, providers, sessions, transports, and reusable runtime components.
|
|
552
|
+
- [`tigrbl-canon`](https://pypi.org/project/tigrbl-canon/) - Canonical mapping, routing, symbol resolution, and naming utilities for Tigrbl framework packages and generated API surfaces.
|
|
553
|
+
- [`tigrbl_client`](https://pypi.org/project/tigrbl_client/) - Typed Python client helpers for calling Tigrbl REST, JSON-RPC, OpenAPI, and generated schema-first API surfaces.
|
|
554
|
+
- [`tigrbl-concrete`](https://pypi.org/project/tigrbl-concrete/) - Concrete Tigrbl implementations for reusable framework behavior, sessions, routes, responses, and base abstraction adapters.
|
|
555
|
+
- [`tigrbl-core`](https://pypi.org/project/tigrbl-core/) - Core Tigrbl framework specifications, decorators, schemas, hooks, operations, and primitives for schema-first APIs.
|
|
556
|
+
- [`tigrbl-kernel`](https://pypi.org/project/tigrbl-kernel/) - Kernel orchestration for composing Tigrbl runtime plans, bindings, operation dispatch, and optimized ASGI execution.
|
|
557
|
+
- [`tigrbl-ops-olap`](https://pypi.org/project/tigrbl-ops-olap/) - Analytical OLAP operation boundaries for Tigrbl workloads, query-oriented APIs, and engine integrations.
|
|
558
|
+
- [`tigrbl-ops-oltp`](https://pypi.org/project/tigrbl-ops-oltp/) - Transactional OLTP operation handlers for Tigrbl CRUD, bulk, REST, JSON-RPC, and database-backed workloads.
|
|
559
|
+
- [`tigrbl-ops-realtime`](https://pypi.org/project/tigrbl-ops-realtime/) - Realtime, streaming, datagram, websocket, and event operation handlers for Tigrbl ASGI runtimes.
|
|
560
|
+
- [`tigrbl-orm`](https://pypi.org/project/tigrbl-orm/) - SQLAlchemy ORM tables, mixins, columns, model helpers, and persistence primitives for Tigrbl applications.
|
|
561
|
+
- [`tigrbl-runtime`](https://pypi.org/project/tigrbl-runtime/) - Runtime pipeline helpers and execution bridge surfaces for Tigrbl ASGI applications, transports, and operation dispatch.
|
|
562
|
+
- [`tigrbl_spec`](https://pypi.org/project/tigrbl_spec/) - Shared Tigrbl interfaces, protocol definitions, compatibility targets, and specification artifacts for framework integration.
|
|
563
|
+
- [`tigrbl_tests`](https://pypi.org/project/tigrbl_tests/) - Reusable Tigrbl pytest fixtures, conformance assertions, integration helpers, and package test utilities.
|
|
564
|
+
- [`tigrbl-typing`](https://pypi.org/project/tigrbl-typing/) - Typing protocols, aliases, generics, and shared type helpers for Tigrbl framework packages and extensions.
|
|
565
|
+
|
|
566
|
+
Engine packages:
|
|
567
|
+
- [`tigrbl_engine_bigquery`](https://pypi.org/project/tigrbl_engine_bigquery/) - BigQuery engine plugin for Google BigQuery warehouse sessions, analytics workloads, and Tigrbl engine registration.
|
|
568
|
+
- [`tigrbl_engine_clickhouse`](https://pypi.org/project/tigrbl_engine_clickhouse/) - ClickHouse engine plugin for analytical database sessions, warehouse workloads, and Tigrbl engine registration.
|
|
569
|
+
- [`tigrbl_engine_csv`](https://pypi.org/project/tigrbl_engine_csv/) - CSV engine plugin for file-backed tables, pandas DataFrames, and lightweight Tigrbl data workflows.
|
|
570
|
+
- [`tigrbl_engine_dataframe`](https://pypi.org/project/tigrbl_engine_dataframe/) - DataFrame engine plugin for transactional pandas sessions and in-process Tigrbl analytics workloads.
|
|
571
|
+
- [`tigrbl_engine_duckdb`](https://pypi.org/project/tigrbl_engine_duckdb/) - DuckDB engine plugin for embedded analytical database sessions, OLAP workloads, and Tigrbl engine registration.
|
|
572
|
+
- [`tigrbl_engine_inmemcache`](https://pypi.org/project/tigrbl_engine_inmemcache/) - In-memory cache engine plugin for process-local TTL, LRU, and fast Tigrbl cache workflows.
|
|
573
|
+
- [`tigrbl_engine_inmemory`](https://pypi.org/project/tigrbl_engine_inmemory/) - In-memory database engine plugin for process-local transactional storage, copy-on-write snapshots, and Tigrbl testing.
|
|
574
|
+
- [`tigrbl_engine_membloom`](https://pypi.org/project/tigrbl_engine_membloom/) - In-memory Bloom filter engine plugin for membership checks, rotating TTL windows, and Tigrbl API workflows.
|
|
575
|
+
- [`tigrbl_engine_memdedupe`](https://pypi.org/project/tigrbl_engine_memdedupe/) - In-memory dedupe engine plugin for idempotency tracking, duplicate suppression, and Tigrbl workflow coordination.
|
|
576
|
+
- [`tigrbl_engine_memkv`](https://pypi.org/project/tigrbl_engine_memkv/) - In-memory key-value engine plugin for process-local KV storage, cache workflows, and lightweight Tigrbl services.
|
|
577
|
+
- [`tigrbl_engine_memlru`](https://pypi.org/project/tigrbl_engine_memlru/) - In-memory LRU engine plugin for least-recently-used cache behavior and process-local Tigrbl data workflows.
|
|
578
|
+
- [`tigrbl_engine_mempubsub`](https://pypi.org/project/tigrbl_engine_mempubsub/) - In-memory pub/sub engine plugin for process-local publish-subscribe channels, events, and Tigrbl realtime workflows.
|
|
579
|
+
- [`tigrbl_engine_memqueue`](https://pypi.org/project/tigrbl_engine_memqueue/) - In-memory queue engine plugin for process-local tasks, message workflows, and Tigrbl runtime coordination.
|
|
580
|
+
- [`tigrbl_engine_memrate`](https://pypi.org/project/tigrbl_engine_memrate/) - In-memory rate-limit engine plugin for API quotas, counters, windows, and Tigrbl governance workflows.
|
|
581
|
+
- [`tigrbl_engine_numpy`](https://pypi.org/project/tigrbl_engine_numpy/) - NumPy engine plugin for array-to-table helpers, analytical workflows, and Tigrbl data integration.
|
|
582
|
+
- [`tigrbl_engine_pandas`](https://pypi.org/project/tigrbl_engine_pandas/) - Pandas engine plugin for transactional DataFrame sessions, tabular workflows, and Tigrbl data integration.
|
|
583
|
+
- [`tigrbl_engine_pgsqli_wal`](https://pypi.org/project/tigrbl_engine_pgsqli_wal/) - PostgreSQL and SQLite WAL engine plugin for transactional Tigrbl workflows and database-backed engine registration.
|
|
584
|
+
- [`tigrbl_engine_postgres`](https://pypi.org/project/tigrbl_engine_postgres/) - PostgreSQL engine plugin for SQLAlchemy sessions, async database workflows, and Tigrbl application persistence.
|
|
585
|
+
- [`tigrbl_engine_pyspark`](https://pypi.org/project/tigrbl_engine_pyspark/) - PySpark engine plugin for distributed DataFrame integration, analytics workloads, and Tigrbl data workflows.
|
|
586
|
+
- [`tigrbl_engine_redis`](https://pypi.org/project/tigrbl_engine_redis/) - Redis engine plugin for cache, data structures, and Tigrbl engine workflows backed by Redis.
|
|
587
|
+
- [`tigrbl_engine_rediscachethrough`](https://pypi.org/project/tigrbl_engine_rediscachethrough/) - Redis cache-through engine plugin for Redis, PostgreSQL, and Tigrbl data-access acceleration workflows.
|
|
588
|
+
- [`tigrbl_engine_snowflake`](https://pypi.org/project/tigrbl_engine_snowflake/) - Snowflake engine plugin for warehouse sessions, analytical workloads, and Tigrbl engine registration.
|
|
589
|
+
- [`tigrbl_engine_sqlite`](https://pypi.org/project/tigrbl_engine_sqlite/) - SQLite engine plugin for SQLAlchemy sessions, local transactional storage, and Tigrbl application persistence.
|
|
590
|
+
- [`tigrbl_engine_xlsx`](https://pypi.org/project/tigrbl_engine_xlsx/) - XLSX engine plugin for Excel workbook-backed tables, worksheet data access, and Tigrbl tabular workflows.
|
|
591
|
+
|
|
592
|
+
Application packages:
|
|
593
|
+
- [`tigrbl_acme_ca`](https://pypi.org/project/tigrbl_acme_ca/) - ACME v2 certificate authority app for Tigrbl tables, certificate automation, TLS workflows, and API surfaces.
|
|
594
|
+
- [`tigrbl_spiffe`](https://pypi.org/project/tigrbl_spiffe/) - SPIFFE and SPIRE identity app for Tigrbl with workload identity tables, UDS transport, and HTTP API surfaces.
|
|
595
|
+
|
|
596
|
+
Source-tree links remain available from each package identity section; this ecosystem section is intentionally PyPI-first for package discovery and installation routing.
|
|
597
|
+
|
|
598
|
+
## Install
|
|
599
|
+
|
|
600
|
+
```bash
|
|
601
|
+
pip install tigrbl
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
## Package discovery
|
|
605
|
+
|
|
606
|
+
`tigrbl` is described for package indexes, search engines, answer engines, and AI coding tools as: Schema-first ASGI API framework for REST, JSON-RPC, OpenAPI, OpenRPC, SQLAlchemy models, typed validation, lifecycle hooks, and engine plugins.
|
|
607
|
+
|
|
608
|
+
Use `tigrbl` when you need Tigrbl's schema-first ASGI package graph for REST APIs, JSON-RPC APIs, OpenAPI documentation, OpenRPC documentation, SQLAlchemy-backed models, Pydantic validation, typed operation specs, runtime dispatch, and installable engine or application extensions.
|
|
609
|
+
|
|
610
|
+
Discovery terms: tigrbl, ASGI, schema-first API framework, REST API, JSON-RPC API, OpenAPI documentation, OpenRPC documentation, SQLAlchemy models, Pydantic validation, typed validation, operation dispatch, engine plugins, api, json-rpc, rest, sqlalchemy, pydantic, api-framework, framework, openapi, openrpc, schema-first.
|
|
611
|
+
|
|
612
|
+
## Package-local entry point
|
|
613
|
+
|
|
614
|
+
This file is a package-local distribution entry point.
|
|
615
|
+
It is not the authoritative location for repository governance, current target status, current state reporting, certification claims, or release evidence.
|
|
616
|
+
|
|
617
|
+
## Canonical repository docs
|
|
618
|
+
|
|
619
|
+
- `README.md`
|
|
620
|
+
- `docs/README.md`
|
|
621
|
+
- `docs/conformance/CURRENT_TARGET.md`
|
|
622
|
+
- `docs/conformance/CURRENT_STATE.md`
|
|
623
|
+
- `docs/conformance/NEXT_STEPS.md`
|
|
624
|
+
- `docs/governance/DOC_POINTERS.md`
|
|
625
|
+
- `docs/developer/PACKAGE_CATALOG.md`
|
|
626
|
+
- `docs/developer/PACKAGE_LAYOUT.md`
|
|
627
|
+
|
|
628
|
+
## Package identity
|
|
629
|
+
|
|
630
|
+
- canonical repository: `https://github.com/tigrbl/tigrbl`
|
|
631
|
+
- organization: `https://github.com/tigrbl`
|
|
632
|
+
- social: `https://discord.gg/K4YTAPapjR`
|
|
633
|
+
- package path: `https://github.com/tigrbl/tigrbl/tree/master/pkgs/core/tigrbl`
|
|
634
|
+
- workspace path: `pkgs/core/tigrbl`
|
|
635
|
+
- workspace class: core Python package
|
|
636
|
+
- implementation layout: `tigrbl/`
|
|
637
|
+
|
|
638
|
+
Long-form repository documentation is governed from `docs/`.
|
|
639
|
+
|