find_api_page¶
-
astropy.utils.misc.
find_api_page
(obj, version=None, openinbrowser=True, timeout=None)[source] [edit on github]¶ Determines the URL of the API page for the specified object, and optionally open that page in a web browser.
Note
You must be connected to the internet for this to function even if
openinbrowser
isFalse
, unless you provide a local version of the documentation toversion
(e.g.,file:///path/to/docs
).Parameters: - obj
The object to open the docs for or its fully-qualified name (as a str).
- version : str
The doc version - either a version number like ‘0.1’, ‘dev’ for the development/latest docs, or a URL to point to a specific location that should be the base of the documentation. Defaults to latest if you are on aren’t on a release, otherwise, the version you are on.
- openinbrowser : bool
If
True
, thewebbrowser
package will be used to open the doc page in a new web browser window.- timeout : number, optional
The number of seconds to wait before timing-out the query to the astropy documentation. If not given, the default python stdlib timeout will be used.
Returns: - url : str
The loaded URL
Raises: - ValueError
If the documentation can’t be found