Pygwalker

Latest version: v0.4.8.9

Safety actively analyzes 634607 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 10

0.3.7

1. Streamlit Communication
Good news for streamlit developers,

Some popular features available in Jupyter now are accessible in streamlit as well!
+ Save chart configuration
+ Use DuckDB as a computation engine for handling larger datasets

> Usage Note: If deploying on Streamlit, especially if it's publicly accessible, please adhere to the best practices for pygwalker on Streamlit. The demo code contains critical comments; ensure you understand them before integration.

demo code: https://github.com/Kanaries/pygwalker-in-streamlit/blob/main/pygwalker_comm_demo.py
online url: https://pygwalker-in-app-dngxb2r82ho2zqct244v7b.streamlit.app/

python
import pandas as pd
import streamlit.components.v1 as components
import streamlit as st
from pygwalker.api.streamlit import init_streamlit_comm, get_streamlit_html

st.set_page_config(
page_title="Use Pygwalker In Streamlit",
layout="wide"
)

st.title("Use Pygwalker In Streamlit(support communication)")

Initialize pygwalker communication
init_streamlit_comm()

When using `use_kernel_calc=True`, you should cache your pygwalker html, if you don't want your memory to explode
st.cache_resource
def get_pyg_html(df: pd.DataFrame) -> str:
When you need to publish your application, you need set `debug=False`,prevent other users to write your config file.
If you want to use feature of saving chart config, set `debug=True`
html = get_streamlit_html(df, spec="./gw0.json", use_kernel_calc=True, debug=False)
return html

st.cache_data
def get_df() -> pd.DataFrame:
return pd.read_csv("https://kanaries-app.s3.ap-northeast-1.amazonaws.com/public-datasets/bike_sharing_dc.csv")

df = get_df()

components.html(get_pyg_html(df), width=1300, height=1000, scrolling=True)

> Note: Ensure you review the demo code comments thoroughly before implementing the new Pygwalker in Streamlit.

2. Support external database as datasource & computation engine (Experimental)

Pygwalker now allows databases, like Snowflake, to be used as data sources and compute engines.

Example:

python
from pygwalker.data_parsers.database_parser import Connector

conn = Connector(
"snowflake://user_name:passwordaccount_identifier/database/schema",
"SELECT * FROM bike_share"
)

walker = pyg.walk(conn)


> Usage Note: It's currently not recommended to publish pygwalker applications using the Connector feature to the public network.

Feat

* feat: support communications on streamlit https://github.com/Kanaries/pygwalker/pull/228
* feat: support database connector https://github.com/Kanaries/pygwalker/pull/233

longxiaofei

**Full Changelog**: https://github.com/Kanaries/pygwalker/compare/0.3.6...0.3.7

0.3.6

[Graphic-Walker](https://github.com/Kanaries/graphic-walker) have major update.
* support drill for time field.
* support feature for time field.
* enhance old calculated fields, bin, bin count...

https://github.com/Kanaries/pygwalker/assets/28337703/484ce053-2562-4684-8213-f417b900d9df

Feat

* feat: adjust inferred field type https://github.com/Kanaries/pygwalker/pull/218
* feat: use new dsl_parser https://github.com/Kanaries/pygwalker/pull/219
* feat: add drill function on the temporal field https://github.com/Kanaries/pygwalker/pull/222

Refactor

* refactor: delete auth-wrapper lib https://github.com/Kanaries/pygwalker/pull/220

Fix

* fix: react render cause dnd not work https://github.com/Kanaries/pygwalker/pull/223

Plan
* add profiling features.
* optimize share features.
* custom calculated fields.
* add communication in streamlit

longxiaofei


**Full Changelog**: https://github.com/Kanaries/pygwalker/compare/0.3.5...0.3.6

0.3.5

Pygwalker add feature of sharing charts on the kanaries, you can share your charts to anybody.

Here is a chart I just shared: [https://kanaries.net/share/notebook/cwa8g22r6kg0#heading-0](https://kanaries.net/share/notebook/cwa8g22r6kg0#heading-0)

Document: [How to use new feature of pygwalker: share charts? ](https://space.kanaries.net/t/how-to-use-new-feature-of-pygwalker-share-charts/26/1)

Currently we only support uploading datasets no larger than 100MB, we will optimize it next version.

Feat

* feat: share charts beta version https://github.com/Kanaries/pygwalker/pull/215

Refactor

* refactor: compress wasm https://github.com/Kanaries/pygwalker/pull/213

Plan

* add profiling features.
* optimize share features.

longxiaofei

**Full Changelog**: https://github.com/Kanaries/pygwalker/compare/0.3.4...0.3.5

0.3.4

Feat
* feat: auto fill new field in old chart config https://github.com/Kanaries/pygwalker/pull/205

Fix
* fix: version is empty when export code https://github.com/Kanaries/pygwalker/pull/206

Plan
* update share chart features(beta version).
* add profiling features.

longxiaofei


**Full Changelog**: https://github.com/Kanaries/pygwalker/compare/0.3.3...0.3.4

0.3.3

Scatter plot on map:

![g2-map2](https://github.com/Kanaries/pygwalker/assets/22167673/32da0a21-e69e-47f4-a22c-da073a17f3c6)

Choropleth plot on map:

![image](https://github.com/Kanaries/pygwalker/assets/22167673/0a061932-9a3e-4e5d-84a0-c26c1255a22f)


Feat
* support dataframe of spark(but not recommended use spark dataframe) https://github.com/Kanaries/pygwalker/pull/200
* add share chart features by kanaries cloud(alpha version) https://github.com/Kanaries/pygwalker/pull/202
* upgrade graphic-walker version, add geo charts https://github.com/Kanaries/pygwalker/pull/202

Plan
* update share chart features(beta version).
* add profiling features.

longxiaofei


**Full Changelog**: https://github.com/Kanaries/pygwalker/compare/0.3.2...0.3.3

0.3.2

Refactor
* adjust data parser code https://github.com/Kanaries/pygwalker/pull/198

Chore
* modify pypi authors https://github.com/Kanaries/pygwalker/pull/195

Plan
* support dataframe of pyspark.
* support geo chart of graphic-walker.
* support for sharing charts more easy.

longxiaofei

**Full Changelog**: https://github.com/Kanaries/pygwalker/compare/0.3.0...0.3.2

Page 6 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.