Create With Copilot
You can use Copilot chat (if extension installed) to create new databases and projects:
- Create a model, eg:
Show Me How to Use Copilot
Paste this into the Copilot prompt:
Use SQLAlchemy to create a sqlite database named sample_ai.sqlite, with customers, orders, items and product
Hints: use autonum keys, allow nulls, Decimal types, foreign keys, no check constraints.
Include a notes field for orders.
Create a few rows of only customer and product data.
Enforce the Check Credit requirement (do not generate check constraints):
1. Customer.Balance <= CreditLimit
2. Customer.Balance = Sum(Order.AmountTotal where date shipped is null)
3. Order.AmountTotal = Sum(Items.Amount)
4. Items.Amount = Quantity * UnitPrice
5. Store the Items.UnitPrice as a copy from Product.UnitPrice
-
Paste the copilot response into a new
sample_ai.py
file -
Create your project:
- This will create your database, create an API Logic Project from it, and launch your IDE.