plotlyshare 1.0.7__tar.gz → 1.0.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,42 +1,44 @@
1
- Metadata-Version: 2.1
2
- Name: plotlyshare
3
- Version: 1.0.7
4
- Summary: Link-based sharing of `plotly` plots with a private web app
5
- Author-email: plutonium239 <plutonium.239.811@gmail.com>
6
- Project-URL: Homepage, https://github.com/plutonium-239/plotlyshare
7
- Project-URL: Issues, https://github.com/plutonium-239/plotlyshare/issues
8
- Keywords: plotly,interactive,plot
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.7
13
- Description-Content-Type: text/markdown
14
- Requires-Dist: rich
15
- Requires-Dist: plotly
16
- Requires-Dist: wonderwords
17
- Requires-Dist: requests
18
-
19
- # `plotlyshare`
20
-
21
- The purpose of this package is to provide a seamless way to share interactive `plotly` plots, providing a similar experience to google docs/etc.
22
-
23
- This requires a free account on deta space: https://deta.space, which is essentially a *personal* cloud computer *at no cost*.
24
-
25
- The idea is to preserve the interactivity and responsiveness of `plotly` plots with the ease of **link-based sharing** and without all the hassle of sending an html file, or worse, a static image/document.
26
-
27
- To use this, first run `python -m plotlyshare setup` and install [plotlyshare on deta space](https://deta.space/discovery/@pu239/plotlyshare) .
28
- And then whenever making a plot,
29
-
30
- ```py
31
- ...
32
- import plotly.express as px
33
- import plotly.graph_objects as go
34
- import plotlyshare
35
- ...
36
- fig = px.line(...)
37
- fig = go.Figure(...)
38
- fig.show(renderer='plotlyshare')
39
- ```
40
-
41
- and that's it, the package will upload your plot to your instance of plotlyshare running in deta space and assign it a randomly generated name (which can be edited from the app's page)
42
- It will print the name that was generated and the direct link to the plot, ready to share with anyone.
1
+ Metadata-Version: 2.1
2
+ Name: plotlyshare
3
+ Version: 1.0.8
4
+ Summary: Link-based sharing of `plotly` plots with a private web app
5
+ Keywords: plotly,interactive,plot
6
+ Author-email: plutonium239 <plutonium.239.811@gmail.com>
7
+ Requires-Python: >=3.7
8
+ Description-Content-Type: text/markdown
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Dist: rich
13
+ Requires-Dist: plotly
14
+ Requires-Dist: wonderwords
15
+ Requires-Dist: requests
16
+ Project-URL: Homepage, https://github.com/plutonium-239/plotlyshare
17
+ Project-URL: Issues, https://github.com/plutonium-239/plotlyshare/issues
18
+
19
+ # `plotlyshare`
20
+ [![Downloads](https://static.pepy.tech/badge/plotlyshare)](https://pepy.tech/project/plotlyshare)
21
+
22
+ The purpose of this package is to provide a seamless way to share interactive `plotly` plots, providing a similar experience to google docs/etc.
23
+
24
+ This requires a free account on deta space: https://deta.space, which is essentially a *personal* cloud computer *at no cost*.
25
+
26
+ The idea is to preserve the interactivity and responsiveness of `plotly` plots with the ease of **link-based sharing** and without all the hassle of sending an html file, or worse, a static image/document.
27
+
28
+ To use this, first run `python -m plotlyshare setup` and install [plotlyshare on deta space](https://deta.space/discovery/@pu239/plotlyshare) .
29
+ And then whenever making a plot,
30
+
31
+ ```py
32
+ ...
33
+ import plotly.express as px
34
+ import plotly.graph_objects as go
35
+ import plotlyshare
36
+ ...
37
+ fig = px.line(...)
38
+ fig = go.Figure(...)
39
+ fig.show(renderer='plotlyshare')
40
+ ```
41
+
42
+ and that's it, the package will upload your plot to your instance of plotlyshare running in deta space and assign it a randomly generated name (which can be edited from the app's page)
43
+ It will print the name that was generated and the direct link to the plot, ready to share with anyone.
44
+
@@ -1,4 +1,5 @@
1
1
  # `plotlyshare`
2
+ [![Downloads](https://static.pepy.tech/badge/plotlyshare)](https://pepy.tech/project/plotlyshare)
2
3
 
3
4
  The purpose of this package is to provide a seamless way to share interactive `plotly` plots, providing a similar experience to google docs/etc.
4
5
 
@@ -3,7 +3,7 @@ import time
3
3
  from rich import console, pretty
4
4
  from plotlyshare.custom_plotly_renderer import test_connection
5
5
 
6
- allowed_commands = ['setup']
6
+ allowed_commands = ['setup', 'test']
7
7
  assert len(sys.argv) == 2, f'Please give only one argument out of {allowed_commands}'
8
8
  command = sys.argv[1]
9
9
  assert command in allowed_commands, f'Given command not in {allowed_commands}'
@@ -66,3 +66,14 @@ if command == 'setup':
66
66
  c.print('[bold green]Setup completed!🚀[/bold green]')
67
67
  else:
68
68
  c.print('[bold red]Setup failed:[/bold red]\n'+display)
69
+ elif command == 'test':
70
+ if old_config['setup_done']:
71
+ c = console.Console()
72
+ with c.status('Testing credentials...', spinner='shark'):
73
+ passed, display = test_connection(old_config['DETA_APP_URL'], old_config['DETA_PROJECT_KEY'])
74
+
75
+ if passed:
76
+ old_config['setup_done'] = True
77
+ c.print('[bold green]It works!🚀[/bold green]')
78
+ else:
79
+ c.print('[bold red]There was an error:[/bold red]\n'+display)
@@ -0,0 +1,6 @@
1
+ {
2
+ "DETA_APP_URL": "https://plotlyshare-1-r8742502.deta.app",
3
+ "DETA_PROJECT_KEY": "d0jtJXqwnHjE_ncFAJpX61B6FQi8acs6EHwRtvCgFHi1E",
4
+ "open_browser_after_upload": true,
5
+ "setup_done": true
6
+ }
@@ -1,10 +1,10 @@
1
1
  [build-system]
2
- requires = ["setuptools>=61"]
3
- build-backend = "setuptools.build_meta"
2
+ build-backend = "flit_core.buildapi"
3
+ requires = ["flit_core >=3.2,<4"]
4
4
 
5
5
  [project]
6
6
  name = "plotlyshare"
7
- version = "1.0.7"
7
+ version = "1.0.8"
8
8
  authors = [{name="plutonium239", email="plutonium.239.811@gmail.com"}]
9
9
  description = "Link-based sharing of `plotly` plots with a private web app"
10
10
  readme = "README.md"
@@ -1,42 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: plotlyshare
3
- Version: 1.0.7
4
- Summary: Link-based sharing of `plotly` plots with a private web app
5
- Author-email: plutonium239 <plutonium.239.811@gmail.com>
6
- Project-URL: Homepage, https://github.com/plutonium-239/plotlyshare
7
- Project-URL: Issues, https://github.com/plutonium-239/plotlyshare/issues
8
- Keywords: plotly,interactive,plot
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.7
13
- Description-Content-Type: text/markdown
14
- Requires-Dist: rich
15
- Requires-Dist: plotly
16
- Requires-Dist: wonderwords
17
- Requires-Dist: requests
18
-
19
- # `plotlyshare`
20
-
21
- The purpose of this package is to provide a seamless way to share interactive `plotly` plots, providing a similar experience to google docs/etc.
22
-
23
- This requires a free account on deta space: https://deta.space, which is essentially a *personal* cloud computer *at no cost*.
24
-
25
- The idea is to preserve the interactivity and responsiveness of `plotly` plots with the ease of **link-based sharing** and without all the hassle of sending an html file, or worse, a static image/document.
26
-
27
- To use this, first run `python -m plotlyshare setup` and install [plotlyshare on deta space](https://deta.space/discovery/@pu239/plotlyshare) .
28
- And then whenever making a plot,
29
-
30
- ```py
31
- ...
32
- import plotly.express as px
33
- import plotly.graph_objects as go
34
- import plotlyshare
35
- ...
36
- fig = px.line(...)
37
- fig = go.Figure(...)
38
- fig.show(renderer='plotlyshare')
39
- ```
40
-
41
- and that's it, the package will upload your plot to your instance of plotlyshare running in deta space and assign it a randomly generated name (which can be edited from the app's page)
42
- It will print the name that was generated and the direct link to the plot, ready to share with anyone.
@@ -1,10 +0,0 @@
1
- README.md
2
- pyproject.toml
3
- plotlyshare/__init__.py
4
- plotlyshare/__main__.py
5
- plotlyshare/custom_plotly_renderer.py
6
- plotlyshare.egg-info/PKG-INFO
7
- plotlyshare.egg-info/SOURCES.txt
8
- plotlyshare.egg-info/dependency_links.txt
9
- plotlyshare.egg-info/requires.txt
10
- plotlyshare.egg-info/top_level.txt
@@ -1,4 +0,0 @@
1
- rich
2
- plotly
3
- wonderwords
4
- requests
@@ -1 +0,0 @@
1
- plotlyshare
@@ -1,4 +0,0 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-