def from_domain(cls, domain, *args, **kwargs): """ Try to download the hive file from the domain using the defined beekeeper spec of domain/api/hive.json. """ version = kwargs.pop('version', None) require = kwargs.pop('require_https', False) return cls(Hive.from_domain(domain, version, require), *args, **kwargs)
def from_remote_hive(cls, url, *args, **kwargs): """ Download a JSON hive file from a URL, and initialize from it, paying attention to the version keyword argument. """ version = kwargs.pop('version', None) require = kwargs.pop('require_https', False) return cls(Hive.from_url(url, version, require), *args, **kwargs)
def from_hive_file(cls, fname, *args, **kwargs): """ Open a local JSON hive file and initialize from the hive contained in that file, paying attention to the version keyword argument. """ version = kwargs.pop('version', None) require = kwargs.pop('require_https', True) return cls(Hive.from_file(fname, version, require), *args, **kwargs)