Configuration documents for BioBlend
BioBlend
- exception bioblend.ConnectionError(message: str, body: bytes | str | None = None, status_code: int | None = None)[source]
An exception class that is raised when unexpected HTTP responses come back.
Should make it easier to debug when strange HTTP things happen such as a proxy server getting in the way of the request etc. @see: body attribute to see the content of the http response
- class bioblend.NullHandler(level=0)[source]
Initializes the instance - basically setting the formatter to None and the filter list to empty.
- bioblend.get_version() str [source]
Returns a string with the current version of the library (e.g., “0.2.0”)
- bioblend.set_file_logger(name: str, filepath: str, level: int | str = 20, format_string: str | None = None) None [source]
- bioblend.set_stream_logger(name: str, level: int | str = 10, format_string: str | None = None) None [source]
- bioblend.wait_on(func: Callable[[], T], maxwait: float = 60, interval: float = 3) T [source]
Wait until a function returns without raising a NotReady exception
- Parameters:
func – function to wait on. It should accept no parameters.
maxwait – Total time (in seconds) to wait for the function to return without raising a NotReady exception. After this time, a
TimeoutException
will be raised.interval – Time (in seconds) to wait between 2 consecutive checks.
Config
- class bioblend.config.Config(path: str | None = None, fp: IO[str] | None = None, do_load: bool = True)[source]
BioBlend allows library-wide configuration to be set in external files. These configuration files can be used to specify access keys, for example. By default we use two locations for the BioBlend configurations:
System wide:
/etc/bioblend.cfg
Individual user:
~/.bioblend
(which works on both Windows and Unix)