Skip to content

Commit 7327df5

Browse files
committed
refactor: group Python examples as <lang>/<framework>/<database>
1 parent 9383d47 commit 7327df5

File tree

9 files changed

+3
-3
lines changed

9 files changed

+3
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Generates the endpoints (or a whole app) from a mapping (SQL query -> URL)
4949
| -----------| ----------------------------| ---------------------------| --------- |
5050
| JavaScript | `npx query2app --lang js` | [`app.js`](examples/js/app.js)<br/>[`routes.js`](examples/js/routes.js)<br/>[`package.json`](examples/js/package.json) | Web: [`express`](https://www.npmjs.com/package/express), [`body-parser`](https://www.npmjs.com/package/body-parser)<br>Database: [`mysql`](https://www.npmjs.com/package/mysql) |
5151
| Golang | `npx query2app --lang go` | [`app.go`](examples/go/chi/mysql/app.go)<br/>[`routes.go`](examples/go/chi/mysql/routes.go)<br/>[`go.mod`](examples/go/chi/mysql/go.mod) | Web: [`go-chi/chi`](https://github.com/go-chi/chi)<br/>Database: [`go-sql-driver/mysql`](https://github.com/go-sql-driver/mysql), [`jmoiron/sqlx`](https://github.com/jmoiron/sqlx) |
52-
| Python | `npx query2app --lang python` | [`app.py`](examples/python/app.py)<br/>[`db.py`](examples/python/db.py)<br/>[`routes.py`](examples/python/routes.py)<br/>[`requirements.txt`](examples/python/requirements.txt) | Web: [FastAPI](https://github.com/tiangolo/fastapi), [Uvicorn](https://www.uvicorn.org)<br/>Database: [psycopg2](https://pypi.org/project/psycopg2/) |
52+
| Python | `npx query2app --lang python` | [`app.py`](examples/python/fastapi/postgres/app.py)<br/>[`db.py`](examples/python/fastapi/postgres/db.py)<br/>[`routes.py`](examples/python/fastapi/postgres/routes.py)<br/>[`requirements.txt`](examples/python/fastapi/postgres/requirements.txt) | Web: [FastAPI](https://github.com/tiangolo/fastapi), [Uvicorn](https://www.uvicorn.org)<br/>Database: [psycopg2](https://pypi.org/project/psycopg2/) |
5353

5454
1. Run the application
5555
| Language | Commands to run the application |

examples/python/endpoints.yaml

-1
This file was deleted.
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../js/endpoints.yaml

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"test": "echo \"Error: no test specified\" && exit 1",
3131
"gen-js-example": "cd examples/js; ../../src/cli.js --lang js",
3232
"gen-go-example": "cd examples/go/chi/mysql; ../../../../src/cli.js --lang go",
33-
"gen-py-example": "cd examples/python; ../../src/cli.js --lang python"
33+
"gen-py-example": "cd examples/python/fastapi/postgres; ../../../../src/cli.js --lang python"
3434
},
3535
"dependencies": {
3636
"ejs": "~3.1.9",

0 commit comments

Comments
 (0)