Skip to content

Commit

Permalink
chore: bump to v0.4.8.9
Browse files Browse the repository at this point in the history
  • Loading branch information
longxiaofei committed Jun 1, 2024
1 parent 7790c1b commit 8ed2865
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/src/utils/communication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const getRealApiUrl = async(basePath: string, baseApiUrl: string) => {
for (let i = basePathPart.length; i >= 0; i--) {
possibleBasePaths.push(basePathPart.slice(0, i).join("/"));
}
const possibleApiUrls = possibleBasePaths.slice(0, 3).map(path => `${path.length === 0 ? '' : '/'}${path}/${baseApiUrl}`);
const possibleApiUrls = possibleBasePaths.slice(0, 2).map(path => `${path.length === 0 ? '' : '/'}${path}/${baseApiUrl}`);

return (await Promise.all(possibleApiUrls.map(async(url) => {
try {
Expand Down
4 changes: 3 additions & 1 deletion examples/web_server_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def init_pygwalker_entity_map() -> Dict[str, PygWalker]:
pygwalker_entity_map = init_pygwalker_entity_map()


@app.post("/_pygwalker/comm/{gid}")
# api path and html path need to have the same prefix
@app.post("/pyg_html/_pygwalker/comm/{gid}")
def pygwalker_comm(gid: str, payload: Dict[str, Any] = Body(...)):
if gid not in pygwalker_entity_map:
return {"success": False, "message": f"Unknown gid: {gid}"}
Expand All @@ -64,6 +65,7 @@ def pygwalker_comm(gid: str, payload: Dict[str, Any] = Body(...)):
return JSONResponse(content=json.loads(json.dumps(result, cls=DataFrameEncoder)))


# api path and html path need to have the same prefix
@app.get("/pyg_html/{gid}")
def pyg_html(gid: str):
walker = pygwalker_entity_map[gid]
Expand Down
2 changes: 1 addition & 1 deletion pygwalker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pygwalker.services.global_var import GlobalVarManager
from pygwalker.services.kaggle import show_tips_user_kaggle as __show_tips_user_kaggle

__version__ = "0.4.8.9a0"
__version__ = "0.4.8.9"
__hash__ = __rand_str()

from pygwalker.api.jupyter import walk, render, table
Expand Down

0 comments on commit 8ed2865

Please sign in to comment.