Skip to content

Commit b177830

Browse files
committed
15.00.52: Python 3.13 - mgr cleanup
1 parent 0e12116 commit b177830

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

api_logic_server_cli/manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def copy_sqlite_dbs(cli_path: Path, mgr_path: Path):
6565
copyfile(cli_path.parent / 'database/nw-gold.sqlite', mgr_path / 'samples/dbs/nw.sqlite')
6666
copyfile(cli_path.parent / 'database/Chinook_Sqlite.sqlite', mgr_path / 'samples/dbs/chinook.sqlite')
6767
copyfile(cli_path.parent / 'database/classicmodels.sqlite', mgr_path / 'samples/dbs/classicmodels.sqlite')
68+
copyfile(cli_path.parent / 'database/todos.sqlite', mgr_path / 'samples/dbs/todos.sqlite')
6869
log.debug("✅ Manager Creation - Created: samples/dbs/")
6970
except Exception as e:
7071
log.debug(f"❌ Manager Creation - Copy samples/dbs creation failed: {str(e)}")

api_logic_server_cli/prototypes/manager/samples/readme_samples.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,44 @@ The created `samples/nw_sample` illustrates important customization sample code
66

77
## Sqlite Sample Databases
88

9-
The `samples/db` files are symbolic links to pre-installed sqlite databases. These allow you to explore creating projects from existing databases.
9+
The `samples/db` files are pre-installed sqlite databases. These allow you to explore creating projects from existing databases.
1010

1111
For example, create Northwind like this:
1212

1313
```bash
1414
genai-logic create --project_name=nw --db_url=sqlite:///samples/dbs/nw.sqlite
1515
```
1616

17-
> Note: If the symbolic links are missing, it is probably due to permission issues, e.g., on windows you must run the Shell with Admin privileges. You can continue using the abbeviations instead of a standard SQLAlchemy database uri.
18-
1917
## Database Connectivity
2018

2119
Sample project creation commands:
2220

2321
```bash
24-
genai-logic create
25-
genai-logic create-and-run
26-
genai-logic create --db_url=sqlite:////Users/val/dev/todo_example/todos.db --project_name=todo
22+
# local sqlite
2723
genai-logic create --db_url=sqlite:///c:\genai-logic\nw.sqlite --project_name=nw
28-
genai-logic create --db_url=sqlite:///ai.sqlite --project_name=ai --open_with=code
29-
genai-logic create --db_url=mysql+pymysql://root:p@mysql-container:3306/classicmodels --project_name=/localhost/docker_db_project
30-
genai-logic create --db_url='mssql+pyodbc://sa:Posey3861@localhost:1433/NORTHWND?driver=ODBC+Driver+18+for+SQL+Server&trusted_connection=no&Encrypt=no'
24+
genai-logic create --db_url=sqlite:///samples/dbs/todos.sqlite --project_name=todo
25+
genai-logic create --db_url=sqlite:////Users/val/dev/ApiLogicServer/ApiLogicServer-dev/clean/ApiLogicServer/samples/dbs/todos.sqlite --project_name=todo
26+
27+
# from localhost to mysql container
28+
genai-logic create --db_url=mysql+pymysql://root:p@localhost:3306/classicmodels --project_name=docker_classicmodels
29+
genai-logic create --db_url=mysql+pymysql://root:p@localhost:3306/Chinook --project_name=docker_chinook
30+
31+
# from container to mysql container replace localhost with....
32+
genai-logic create --db_url=mysql+pymysql://root:p@mysql-container:3306/Chinook --project_name=/localhost/docker_chinook
33+
34+
# microsoft sql server (setup: https://apilogicserver.github.io/Docs/Install-pyodbc/)
35+
genai-logic create --db_url='mssql+pyodbc://sa:Posey3861@localhost:1433/NORTHWND?driver=ODBC+Driver+18+for+SQL+Server&trusted_connection=no&Encrypt=no' --project-name=NORTHWND
36+
37+
# oracle
3138
genai-logic create --project_name=oracle_hr --db_url='oracle+oracledb://hr:tiger@localhost:1521/?service_name=ORCL'
39+
40+
# postgres
41+
genai-logic create --db_url=postgresql://postgres:p@localhost/northwind --project-name=nw-postgres
3242
genai-logic create --db_url=postgresql://postgres:[email protected]/postgres
3343
genai-logic create --project_name=my_schema --db_url=postgresql://postgres:p@localhost/my_schema
3444
genai-logic create --db_url=postgresql://postgres:password@localhost:5432/postgres?options=-csearch_path%3Dmy_db_schema
45+
46+
# pythonanywhere
3547
genai-logic create --project_name=Chinook \
3648
--host=ApiLogicServer.pythonanywhere.com --port= \
3749
--db_url=mysql+pymysql://ApiLogicServer:@ApiLogicServer.mysql.pythonanywhere-services.com/ApiLogicServer\$Chinook

0 commit comments

Comments
 (0)