ApiLogicServer 16.1.3__py3-none-any.whl → 16.1.18__py3-none-any.whl
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.
- api_logic_server_cli/api_logic_server.py +2 -1
- api_logic_server_cli/genai/genai_svcs.py +2 -2
- api_logic_server_cli/prototypes/base/.github/.copilot-instructions.md +558 -52
- api_logic_server_cli/prototypes/base/.github/.copilot-instructions.md.backup +1257 -0
- api_logic_server_cli/prototypes/base/.github/welcome.md +23 -9
- api_logic_server_cli/prototypes/base/docs/training/{logic_bank_api.prompt → logic_bank_api.md} +125 -4
- api_logic_server_cli/prototypes/base/logic/logic_discovery/readme_logic_discovery.md +15 -0
- api_logic_server_cli/prototypes/base/logic/readme_logic.md +1 -1
- api_logic_server_cli/prototypes/manager/.github/welcome.md +14 -10
- api_logic_server_cli/prototypes/manager/readme_vibe.md +376 -0
- api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/.github/.copilot-instructions.md +395 -47
- api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/.github/welcome.md +40 -0
- api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/customizations/logic/declare_logic.py +1 -1
- api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/docs/system-creation-vibe.md +1 -1
- api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/iteration/logic/declare_logic.py +1 -1
- api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/logic/logic_discovery/{check_credit.py → place_order/check_credit.py} +2 -2
- api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/readme_ai_mcp.md +2 -2
- api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/readme_vibe.md +1 -1
- api_logic_server_cli/prototypes/manager/samples/prompts/genai_demo.prompt +1 -1
- api_logic_server_cli/prototypes/manager/system/ApiLogicServer-Internal-Dev/copilot-dev-context.md +27 -0
- api_logic_server_cli/prototypes/manager/system/ApiLogicServer-Internal-Dev/propagate_copilot_changes.py +102 -0
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo_formal.prompt +1 -1
- api_logic_server_cli/prototypes/manager/system/genai/examples/postgres/genai_demo_pg.prompt +1 -1
- api_logic_server_cli/prototypes/manager/system/genai/reference/declare_logic.py +1 -1
- api_logic_server_cli/prototypes/manager/system/genai/reference/genai_demo_logic.txt +1 -1
- api_logic_server_cli/prototypes/nw/Tutorial.md +1 -1
- api_logic_server_cli/prototypes/nw/integration/Sample-Integration.md +65 -48
- {apilogicserver-16.1.3.dist-info → apilogicserver-16.1.18.dist-info}/METADATA +1 -1
- {apilogicserver-16.1.3.dist-info → apilogicserver-16.1.18.dist-info}/RECORD +36 -32
- {apilogicserver-16.1.3.dist-info → apilogicserver-16.1.18.dist-info}/WHEEL +1 -1
- /api_logic_server_cli/prototypes/base/docs/training/{logic_bank_patterns.prompt → logic_bank_patterns.md} +0 -0
- /api_logic_server_cli/prototypes/base/docs/training/{probabilistic_logic.prompt → probabilistic_logic.md} +0 -0
- /api_logic_server_cli/prototypes/manager/samples/basic_demo_sample/logic/logic_discovery/{app_integration.py → place_order/app_integration.py} +0 -0
- {apilogicserver-16.1.3.dist-info → apilogicserver-16.1.18.dist-info}/entry_points.txt +0 -0
- {apilogicserver-16.1.3.dist-info → apilogicserver-16.1.18.dist-info}/licenses/LICENSE +0 -0
- {apilogicserver-16.1.3.dist-info → apilogicserver-16.1.18.dist-info}/top_level.txt +0 -0
api_logic_server_cli/prototypes/manager/system/ApiLogicServer-Internal-Dev/copilot-dev-context.md
CHANGED
|
@@ -42,6 +42,13 @@ This is the **BLT Manager** - a nested workspace that gets regenerated by the Bu
|
|
|
42
42
|
- Has its own venv shared by test projects
|
|
43
43
|
- Framework changes happen in `org_git/ApiLogicServer-src/`
|
|
44
44
|
|
|
45
|
+
**🚨 CRITICAL: README Files - Gold Source is Docs Repo**
|
|
46
|
+
- **Gold source:** `org_git/Docs/docs/` (NOT `ApiLogicServer-src/prototypes/`)
|
|
47
|
+
- **copy_md() function:** Fetches from GitHub Docs repo (or local Docs if dev), converts mkdocs → markdown
|
|
48
|
+
- **Affected files:** Any file containing "readme" or "README" (readme_vibe.md, readme_ai_mcp.md, Tutorial.md, Sample-Integration.md, etc.)
|
|
49
|
+
- **Implication:** Changes to README files must go to **Docs repo**, not prototypes - prototypes get overwritten on project creation
|
|
50
|
+
- **See:** [Architecture-Internals.md#docs-used-in-project-creation](https://apilogicserver.github.io/Docs/Architecture-Internals/#docs-used-in-project-creation)
|
|
51
|
+
|
|
45
52
|
|
|
46
53
|
|
|
47
54
|
## 📚 Complete Architecture Documentation
|
|
@@ -440,12 +447,32 @@ Several `*_corrected_prompt.txt` files show typical AI mistakes:
|
|
|
440
447
|
4. Sync templates back to `ApiLogicServer-src`
|
|
441
448
|
5. Push to GitHub
|
|
442
449
|
|
|
450
|
+
**🚨 CRITICAL Exception - README Files:**
|
|
451
|
+
- **Gold source:** `org_git/Docs/docs/` - NOT ApiLogicServer-src prototypes
|
|
452
|
+
- **Affected:** readme_vibe.md, readme_ai_mcp.md, Tutorial.md, Sample-Integration.md, etc.
|
|
453
|
+
- **Why:** Users read docs without installing; copy_md() fetches from Docs on project creation
|
|
454
|
+
- **Workflow for README changes:**
|
|
455
|
+
1. Edit in `org_git/Docs/docs/` (e.g., Sample-Basic-Demo.md)
|
|
456
|
+
2. Test locally (mkdocs serve)
|
|
457
|
+
3. Commit to Docs repo
|
|
458
|
+
4. Run BLT - copy_md() will fetch updated docs
|
|
459
|
+
5. Test generated projects have correct READMEs
|
|
460
|
+
|
|
443
461
|
**BLT (Build-Load-Test):**
|
|
444
462
|
- Rebuilds API Logic Server from dev source
|
|
445
463
|
- Creates ~18 test projects with validation
|
|
446
464
|
- Critical smoke test before pushing to GitHub
|
|
447
465
|
- Results in `tests/results.txt` and `tests/failures.txt`
|
|
448
466
|
|
|
467
|
+
**Propagating Changes to Source:**
|
|
468
|
+
- **Copilot Instructions:** Use `system/ApiLogicServer-Internal-Dev/propagate_copilot_changes.py`
|
|
469
|
+
- Copies changes from `tests/ApiLogicProject/.github/.copilot-instructions.md` → source prototype
|
|
470
|
+
- Usage: `python3 build_and_test/ApiLogicServer/system/ApiLogicServer-Internal-Dev/propagate_copilot_changes.py`
|
|
471
|
+
- Extracts sections between title and "Key Technical Points"
|
|
472
|
+
- Ensures edits propagate to future project creations
|
|
473
|
+
- **README Files:** Manual update required in Docs repo (see above)
|
|
474
|
+
- **Other Files:** Copy manually or create similar propagation scripts in `system/ApiLogicServer-Internal-Dev/`
|
|
475
|
+
|
|
449
476
|
|
|
450
477
|
|
|
451
478
|
---
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Propagate Copilot Instructions Changes from BLT Test Projects to Source Prototypes
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
cd /Users/val/dev/ApiLogicServer/ApiLogicServer-dev
|
|
7
|
+
python3 build_and_test/ApiLogicServer/system/ApiLogicServer-Internal-Dev/propagate_copilot_changes.py
|
|
8
|
+
|
|
9
|
+
Purpose:
|
|
10
|
+
When you edit .copilot-instructions.md in test projects (tests/ApiLogicProject),
|
|
11
|
+
this script copies those changes back to the source prototype
|
|
12
|
+
(org_git/ApiLogicServer-src/api_logic_server_cli/prototypes/base/).
|
|
13
|
+
|
|
14
|
+
This ensures changes propagate to future project creations.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
import re
|
|
18
|
+
import sys
|
|
19
|
+
from pathlib import Path
|
|
20
|
+
|
|
21
|
+
def propagate_copilot_instructions():
|
|
22
|
+
"""Copy changes from BLT test project to source prototype"""
|
|
23
|
+
|
|
24
|
+
base_dir = Path('/Users/val/dev/ApiLogicServer/ApiLogicServer-dev')
|
|
25
|
+
|
|
26
|
+
# Source files
|
|
27
|
+
test_file = base_dir / 'build_and_test/ApiLogicServer/tests/ApiLogicProject/.github/.copilot-instructions.md'
|
|
28
|
+
source_file = base_dir / 'org_git/ApiLogicServer-src/api_logic_server_cli/prototypes/base/.github/.copilot-instructions.md'
|
|
29
|
+
|
|
30
|
+
if not test_file.exists():
|
|
31
|
+
print(f"❌ Test file not found: {test_file}")
|
|
32
|
+
return False
|
|
33
|
+
|
|
34
|
+
if not source_file.exists():
|
|
35
|
+
print(f"❌ Source file not found: {source_file}")
|
|
36
|
+
return False
|
|
37
|
+
|
|
38
|
+
# Read test file
|
|
39
|
+
with open(test_file, 'r') as f:
|
|
40
|
+
test_content = f.read()
|
|
41
|
+
|
|
42
|
+
# Read source file
|
|
43
|
+
with open(source_file, 'r') as f:
|
|
44
|
+
source_content = f.read()
|
|
45
|
+
|
|
46
|
+
# Extract sections to copy (between title and "Key Technical Points")
|
|
47
|
+
# This captures additions like "What You Get" and "What You Do"
|
|
48
|
+
match = re.search(
|
|
49
|
+
r'(# GitHub Copilot Instructions.*?\n---\n)(.*?)(---\n\n## 🔑 Key Technical Points)',
|
|
50
|
+
test_content,
|
|
51
|
+
re.DOTALL
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
if not match:
|
|
55
|
+
print("❌ Could not find sections to copy in test file")
|
|
56
|
+
return False
|
|
57
|
+
|
|
58
|
+
new_sections = match.group(2)
|
|
59
|
+
|
|
60
|
+
# Replace in source file
|
|
61
|
+
updated_content = re.sub(
|
|
62
|
+
r'(# GitHub Copilot Instructions.*?\n---\n).*?(---\n\n## 🔑 Key Technical Points)',
|
|
63
|
+
r'\1' + new_sections + r'\2',
|
|
64
|
+
source_content,
|
|
65
|
+
flags=re.DOTALL
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
if updated_content == source_content:
|
|
69
|
+
print("ℹ️ No changes needed - source already up to date")
|
|
70
|
+
return True
|
|
71
|
+
|
|
72
|
+
# Write back to source
|
|
73
|
+
with open(source_file, 'w') as f:
|
|
74
|
+
f.write(updated_content)
|
|
75
|
+
|
|
76
|
+
print("✅ Successfully updated source prototype:")
|
|
77
|
+
print(f" {source_file.relative_to(base_dir)}")
|
|
78
|
+
print(" Changes will propagate to newly created projects after next BLT run")
|
|
79
|
+
|
|
80
|
+
return True
|
|
81
|
+
|
|
82
|
+
def propagate_readme_changes():
|
|
83
|
+
"""
|
|
84
|
+
Reminder: README files have gold source in Docs repo, not prototypes.
|
|
85
|
+
|
|
86
|
+
Changes to readme.md and readme_ai_mcp.md in test projects need to be
|
|
87
|
+
manually copied to:
|
|
88
|
+
/org_git/Docs/docs/Sample-Basic-Demo.md
|
|
89
|
+
/org_git/Docs/docs/Integration-MCP-AI-Example.md
|
|
90
|
+
"""
|
|
91
|
+
print("\n📝 Reminder: README changes need manual update in Docs repo:")
|
|
92
|
+
print(" /org_git/Docs/docs/Sample-Basic-Demo.md")
|
|
93
|
+
print(" /org_git/Docs/docs/Integration-MCP-AI-Example.md")
|
|
94
|
+
|
|
95
|
+
if __name__ == '__main__':
|
|
96
|
+
print("Propagating Copilot Instructions Changes...")
|
|
97
|
+
print("-" * 60)
|
|
98
|
+
|
|
99
|
+
success = propagate_copilot_instructions()
|
|
100
|
+
propagate_readme_changes()
|
|
101
|
+
|
|
102
|
+
sys.exit(0 if success else 1)
|
api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo_formal.prompt
CHANGED
|
@@ -2,7 +2,7 @@ Create a system with customers, orders, items and products.
|
|
|
2
2
|
|
|
3
3
|
Include a notes field for orders.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
on Placing Orders, Check Credit
|
|
6
6
|
1. Customer.balance <= credit_limit
|
|
7
7
|
2. Customer.balance = Sum(Order.amount_total where date_shipped is null)
|
|
8
8
|
3. Order.amount_total = Sum(Item.amount)
|
|
@@ -6,7 +6,7 @@ Include a notes field for orders.
|
|
|
6
6
|
|
|
7
7
|
Create a few rows of only customer and product data.
|
|
8
8
|
|
|
9
|
-
Enforce
|
|
9
|
+
Enforce on Placing Orders, Check Credit requirement (do not generate check constraints):
|
|
10
10
|
1. Customer.balance <= credit_limit
|
|
11
11
|
2. Customer.balance = Sum(Order.amount_total where date_shipped is null)
|
|
12
12
|
3. Order.amount_total = Sum(Item.mount)
|
|
@@ -23,7 +23,7 @@ def declare_logic():
|
|
|
23
23
|
|
|
24
24
|
Use Logic Bank to enforce these requirements:
|
|
25
25
|
|
|
26
|
-
Enforce
|
|
26
|
+
Enforce on Placing Orders, Check Credit requirement (do not generate check constraints):
|
|
27
27
|
1. Customer.balance <= credit_limit
|
|
28
28
|
2. Customer.balance = Sum(Order.amount_total where date_shipped is null)
|
|
29
29
|
3. Order.amount_total = Sum(Item.mount)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
-- informal English
|
|
2
2
|
|
|
3
|
-
Use Logic Bank to enforce
|
|
3
|
+
Use Logic Bank to enforce on Placing Orders, Check Credit requirement (do not generate check constraints):
|
|
4
4
|
1. The customer's balance must not exceed the credit limit.
|
|
5
5
|
2. The customer's balance is the sum of all unshipped orders.
|
|
6
6
|
3. The order amount total is the sum of all item amounts.
|
|
@@ -183,7 +183,7 @@ Note the automation for **automatic joins** (Product Name, not ProductId) and **
|
|
|
183
183
|
|
|
184
184
|
|
|
185
185
|
|
|
186
|
-
### 3.b Customize Logic:
|
|
186
|
+
### 3.b Customize Logic: on Placing Orders, Check Credit
|
|
187
187
|
|
|
188
188
|
Such logic (multi-table derivations and constraints) is a significant portion of a system, typically nearly half. API Logic server provides **spreadsheet-like rules** that dramatically simplify and accelerate logic development.
|
|
189
189
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Declarative Application Integration
|
|
3
|
-
|
|
3
|
+
notes: gold docsite, 2100 words (goal: 1500)
|
|
4
|
+
version: 10.03.01 from docsite, for readme
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Purpose
|
|
@@ -23,7 +24,8 @@ The **Northwind API Logic Server** provides APIs *and logic* for both transactio
|
|
|
23
24
|
|
|
24
25
|
The **Shipping API Logic Server** listens on kafka, and processes the message.<br><br>
|
|
25
26
|
|
|
26
|
-

|
|
28
|
+
|
|
27
29
|
|
|
28
30
|
|
|
29
31
|
**Self-serve APIs, Shared Logic**
|
|
@@ -84,27 +86,30 @@ To run the ApiLogicProject app:
|
|
|
84
86
|
One command has created meaningful elements of our system:
|
|
85
87
|
<br><br>
|
|
86
88
|
|
|
87
|
-
!!! pied-piper ":bulb: Instant Self-Serve API - ad hoc integration - and Admin App"
|
|
88
89
|
|
|
89
|
-
|
|
90
|
+
|
|
91
|
+
**Key Takeways - Instant Self-Serve API - ad hoc integration - and Admin App**
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### API: Ad hoc Integration
|
|
95
|
+
|
|
96
|
+
The system creates an API with end points for each table, providing filtering, sorting, pagination, optimistic locking and related data access.
|
|
90
97
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
The API is [**self-serve**](https://apilogicserver.github.io/Docs/API-Self-Serve/): consumers can select their own attributes and related data, eliminating reliance on custom API development. In this sample, our self-serve API meets our needs for Ad Hoc Integration, and Custom UI Dev.
|
|
98
|
+
The API is [**self-serve**](https://apilogicserver.github.io/Docs/API-Self-Serve/): consumers can select their own attributes and related data, eliminating reliance on custom API development. In this sample, our self-serve API meets our needs for Ad Hoc Integration, and Custom UI Dev.
|
|
94
99
|
|
|
95
|
-
|
|
100
|
+
<img src="https://github.com/ApiLogicServer/Docs/blob/main/docs/images/integration/api-swagger.jpeg?raw=true">
|
|
96
101
|
|
|
97
|
-
|
|
102
|
+
### Admin App: Order Entry UI
|
|
98
103
|
|
|
99
|
-
|
|
104
|
+
The `create` command also creates an Admin App: multi-page, multi-table with automatic joins -- ready for **[business user agile collaboration](https://apilogicserver.github.io/Docs/Tech-AI/),** and back office data maintenance. This complements custom UIs you can create with the API.
|
|
100
105
|
|
|
101
|
-
|
|
106
|
+
You can click the first Customer, and see their Orders, and Items.
|
|
102
107
|
|
|
103
|
-
|
|
108
|
+
<img src="https://github.com/ApiLogicServer/Docs/blob/main/docs/images/integration/admin-app-initial.jpeg?raw=true">
|
|
104
109
|
|
|
105
|
-
|
|
110
|
+
!!! pied-piper ":bulb: 1 Command: Ad Hoc Integration Complete"
|
|
106
111
|
|
|
107
|
-
|
|
112
|
+
With 1 command, we have created an executable project that completes our ad hoc integration with a self-serve API. We have also unblocked custom UI development.
|
|
108
113
|
|
|
109
114
|
|
|
110
115
|
|
|
@@ -235,45 +240,48 @@ Note the automation for **automatic joins** (Product Name, not ProductId) and **
|
|
|
235
240
|
|
|
236
241
|
|
|
237
242
|
|
|
238
|
-
###
|
|
243
|
+
### on Placing Orders, Check Credit Logic
|
|
239
244
|
|
|
240
245
|
Such logic (multi-table derivations and constraints) is a significant portion of a system, typically nearly half. API Logic server provides **spreadsheet-like rules** that dramatically simplify and accelerate logic development.
|
|
241
246
|
|
|
242
|
-
!!! pied-piper ":bulb: Logic: Multi-table Derivation and Constraint Rules, 40X More Concise"
|
|
243
247
|
|
|
244
|
-
|
|
248
|
+
|
|
249
|
+
**Key Takeways - Logic: Multi-table Derivations and Constraint Rules, 40X More Concise**
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
#### IDE: Declare and Debug
|
|
253
|
+
|
|
254
|
+
The 5 check credit rules are shown below.
|
|
255
|
+
|
|
256
|
+
!!! pied-piper ":bulb: Rules are 40X More Concise Than Code"
|
|
257
|
+
|
|
258
|
+
Rules are 40X more concise than legacy code, as [shown here](https://apilogicserver.github.io/Docs/https://github.com/ApiLogicServer/basic_demo/blob/main/logic/procedural/declarative-vs-procedural-comparison).
|
|
259
|
+
|
|
260
|
+
Rules are declared in Python, simplified with IDE code completion. The `add-cust` process above has simulated the process of using your IDE to declare logic.
|
|
245
261
|
|
|
246
|
-
|
|
262
|
+
Observe rules can be debugged using standard logging and the debugger:
|
|
247
263
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
Rules are 40X more concise than legacy code, as [shown here](https://github.com/valhuber/LogicBank/wiki/by-code){:target="_blank" rel="noopener"}.
|
|
251
|
-
|
|
252
|
-
Rules are declared in Python, simplified with IDE code completion. The `add-cust` process above has simulated the process of using your IDE to declare logic.
|
|
253
|
-
|
|
254
|
-
Observe rules can be debugged using standard logging and the debugger:
|
|
264
|
+
<img src="https://github.com/ApiLogicServer/Docs/blob/main/docs/images/integration/logic-chaining.jpeg?raw=true">
|
|
255
265
|
|
|
256
|
-
|
|
266
|
+
Rules operate by handling SQLAlchemy events, so apply to all ORM access, whether by the api engine, or your custom code. Once declared, you don't need to remember to call them, which promotes quality.
|
|
257
267
|
|
|
258
|
-
|
|
268
|
+
The rules shown above prevented the too-big order with *multi-table logic* to copy the Product Price, compute the Amount, roll it up to the AmountTotal and Balance, and check the CreditLimit.
|
|
259
269
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
These same rules also govern changing orders, deleting them, picking different parts - about 9 transactions, all automated. Implementing all this by hand would otherwise require about 200 lines of code.<br><br>
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
#### Agility, Quality
|
|
270
|
+
These same rules also govern changing orders, deleting them, picking different parts - about 9 transactions, all automated. Implementing all this by hand would otherwise require about 200 lines of code.<br><br>
|
|
266
271
|
|
|
267
|
-
Rules are a unique and significant innovation, providing meaningful improvements over procedural logic:
|
|
268
272
|
|
|
269
|
-
|
|
270
|
-
| :--- |:---|:---|:---|
|
|
271
|
-
| **Reuse** | Not Automatic | Automatic - all Use Cases | **40X Code Reduction** |
|
|
272
|
-
| **Invocation** | Passive - only if called | Active - call not required | Quality |
|
|
273
|
-
| **Ordering** | Manual | Automatic | Agile Maintenance |
|
|
274
|
-
| **Optimizations** |Manual | Automatic | Agile Design |
|
|
273
|
+
#### Agility, Quality
|
|
275
274
|
|
|
276
|
-
|
|
275
|
+
Rules are a unique and significant innovation, providing meaningful improvements over procedural logic:
|
|
276
|
+
|
|
277
|
+
| CHARACTERISTIC | PROCEDURAL | DECLARATIVE | WHY IT MATTERS |
|
|
278
|
+
| :--- |:---|:---|:---|
|
|
279
|
+
| **Reuse** | Not Automatic | Automatic - all Use Cases | **40X Code Reduction** |
|
|
280
|
+
| **Invocation** | Passive - only if called | Active - call not required | Quality |
|
|
281
|
+
| **Ordering** | Manual | Automatic | Agile Maintenance |
|
|
282
|
+
| **Optimizations** |Manual | Automatic | Agile Design |
|
|
283
|
+
|
|
284
|
+
> For more on rules, [click here](https://apilogicserver.github.io/Docs/Logic-Why/).
|
|
277
285
|
|
|
278
286
|
|
|
279
287
|
|
|
@@ -289,13 +297,16 @@ To see security in action:
|
|
|
289
297
|
|
|
290
298
|
|
|
291
299
|
|
|
292
|
-
!!! pied-piper ":bulb: Row-Level Security: Customers Filtered"
|
|
293
300
|
|
|
294
|
-
|
|
301
|
+
|
|
302
|
+
**Key Takeways - Row-Level Security: Customers Filtered**
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
#### Login, Row Filtering
|
|
295
306
|
|
|
296
|
-
|
|
307
|
+
Declarative row-level security ensures that users see only the rows authorized for their roles. Observe you now see only customer ALFKI, per the security declared below. Note the console log at the bottom shows how the filter worked.
|
|
297
308
|
|
|
298
|
-
|
|
309
|
+
<img src="https://github.com/ApiLogicServer/Docs/blob/main/docs/images/integration/security-filters.jpg?raw=true">
|
|
299
310
|
|
|
300
311
|
|
|
301
312
|
|
|
@@ -328,7 +339,10 @@ The main task here is to ***map*** a B2B payload onto our logic-enabled SQLAlche
|
|
|
328
339
|
|
|
329
340
|

|
|
330
341
|
|
|
331
|
-
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
**Key Takeways - Custom Endpoint - 7 lines of code**
|
|
345
|
+
|
|
332
346
|
|
|
333
347
|
So, our custom endpoint required about 7 lines of code, along with the API specification on the right. Note the logic is automatically factored out, and re-used for all APIs, both custom and self-serve.
|
|
334
348
|
|
|
@@ -355,7 +369,10 @@ Just as you can customize apis, you can complement rule-based logic using Python
|
|
|
355
369
|
|
|
356
370
|

|
|
357
371
|
|
|
358
|
-
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
**Key Takeways - Extensible Rules, Kafka Message Produced**
|
|
375
|
+
|
|
359
376
|
|
|
360
377
|
Rule-based logic is extensible with Python, here producing a Kafka message with 20 lines of code.
|
|
361
378
|
|
|
@@ -363,7 +380,7 @@ Just as you can customize apis, you can complement rule-based logic using Python
|
|
|
363
380
|
|
|
364
381
|
## 4. Consuming Messages
|
|
365
382
|
|
|
366
|
-
The Shipping system illustrates how to consume messages. This system was [created from AI](Tutorial-AI
|
|
383
|
+
The Shipping system illustrates how to consume messages. This system was [created from AI](https://apilogicserver.github.io/Docs/Tutorial-AI), here customized to add message consumption.
|
|
367
384
|
|
|
368
385
|
|
|
369
386
|
|