-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve readme, include static/ in build
- Loading branch information
1 parent
8bdcc24
commit fefa0fb
Showing
3 changed files
with
31 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
recursive-include src/dbstudio/static * | ||
include README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,45 @@ | ||
# DB Studio | ||
|
||
DB Studio is a web-based database management tool that allows you to manage your databases, tables, and data. It is designed to be simple and easy to use, with a clean and intuitive user interface. | ||
A web-based database management tool that allows you to manage your databases, tables, and data. | ||
|
||
DB Studio is currently compatible with FastAPI, Starlette, SQLAlchemy and SQLModel. | ||
It is designed to be embedded into your Python web applications, is currently compatible with FastAPI, | ||
Starlette, SQLAlchemy and SQLModel. | ||
|
||
``` | ||
## Get started | ||
|
||
Install DB Studio from PyPI using pip or your favorite package manager: | ||
|
||
```sh | ||
pip install dbstudio | ||
``` | ||
|
||
## Get started | ||
|
||
After configuring DB Studio, the UI will be available at `/dbstudio`. | ||
After configuring DB Studio, the UI will be available at `http://<your-server>/dbstudio`. | ||
|
||
### FastAPI | ||
## FastAPI | ||
|
||
```python | ||
from fastapi import FastAPI | ||
from dbstudio import DBStudio | ||
from dbstudio.fastapi import get_fastapi_router | ||
|
||
# Be sure to import your DB models before initializing DBStudio | ||
import .models | ||
|
||
app = FastAPI() | ||
|
||
app.mount("/", get_fastapi_router(Base.metadata)) | ||
``` | ||
# The router must be mounted at /dbstudio | ||
app.mount("/dbstudio", get_fastapi_router(Base.metadata)) | ||
``` | ||
|
||
## Starlette | ||
|
||
```python | ||
from starlette.applications import Starlette | ||
from dbstudio.starlette import get_startlette_mount | ||
|
||
# Be sure to import your DB models before initializing DBStudio | ||
import .models | ||
|
||
app = Starlette( | ||
routes=[get_startlette_mount(Base.metadata)], | ||
) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters