Skip to content

Commit e5a0493

Browse files
committed
Add a get_config() function to plotly.py.
1 parent 2fa2cae commit e5a0493

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

plotly/plotly/plotly.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444

4545
_plot_options = dict()
4646

47+
_config = dict()
48+
4749
### test file permissions and make sure nothing is corrupted ###
4850
tools.ensure_local_plotly_files()
4951

@@ -127,6 +129,15 @@ def _plot_option_logic(plot_options):
127129
return options
128130

129131

132+
def get_config():
133+
"""Returns either module config or file config."""
134+
config = tools.get_config_file()
135+
for config_key in config:
136+
if _config.get(config_key):
137+
config[config_key] = _config[config_key]
138+
return config
139+
140+
130141
def plot(figure_or_data, validate=True, **plot_options):
131142
"""Create a unique url for this plot in Plotly and optionally open url.
132143

0 commit comments

Comments
 (0)