Binder utility functions¶
Integration with Binder is on an experimental stage. Note that this API may change in the future.
Binder is still beta technology, so there may be instability in the experience of users who click Binder links.
Check to make sure that the Binder configuration is correct.
- sphinx_gallery.binder.copy_binder_files(app, exception)¶
Copy all Binder requirements and notebooks files.
- sphinx_gallery.binder.gen_binder_rst(fpath, binder_conf, gallery_conf)¶
Generate the RST + link for the Binder badge.
fpath (str) – The path to the .py file for which a Binder badge will be generated.
binder_conf (dict or None) –
If a dictionary it must have the following keys:
The URL of the BinderHub instance that’s running a Binder service.
The GitHub organization to which the documentation will be pushed.
The GitHub repository to which the documentation will be pushed.
The Git branch on which the documentation exists (e.g., gh-pages).
A list of paths to dependency files that match the Binderspec.
gallery_conf (dict) – Sphinx-Gallery configuration dictionary.
rst – The reStructuredText for the Binder badge that links to this file.
- Return type
- sphinx_gallery.binder.gen_binder_url(fpath, binder_conf, gallery_conf)¶
Generate a Binder URL according to the configuration in conf.py.
binder_url – A URL that can be used to direct the user to the live Binder environment.
- Return type