MCPcopy
hub / github.com/Kanaries/pygwalker / show_tips_user_kaggle

Function show_tips_user_kaggle

pygwalker/services/kaggle.py:27–42  ·  view source on GitHub ↗

Whether has set kanaries api key.

()

Source from the content-addressed store, hash-verified

25
26
27def show_tips_user_kaggle() -> bool:
28 """Whether has set kanaries api key."""
29 from kaggle_secrets import UserSecretsClient
30 try:
31 has_set_api_key = bool(UserSecretsClient().get_secret("kanaries_api_key"))
32 except Exception:
33 has_set_api_key = False
34
35 tips = """
36 <p>Since you haven't set the kannaries_api_key, Pygwalker assumes it's your first time using it on Kaggle.</p>
37 <p>Due to the persistent file approach in Kaggle, there may be some impact on the user experience when using Pygwalker on Kaggle.</p>
38 <p>Please take a moment to read this article: <a href="https://github.com/Kanaries/pygwalker/wiki/Best-Practices-for-Using-Pygwalker-in-Kaggle">Best Practices for Using Pygwalker in Kaggle</a>, which can help you optimize your Pygwalker experience on Kaggle.</p>
39 """
40
41 if not has_set_api_key:
42 display_html(tips)

Callers

nothing calls this directly

Calls 1

display_htmlFunction · 0.90

Tested by

no test coverage detected