def __init__(self, server, protocol=None, response="html"): if server in servers.keys(): server = servers[server].url self.server = _check_url_response(server) self.protocol = protocol # Initialized only via properties. self.constraints = None self.dataset_id = None self.params = None self.requests_kwargs = {} self.response = response self.variables = "" # Caching the last `dataset_id` and `variables` list request for quicker multiple accesses, # will be overridden when requesting a new `dataset_id`. self._dataset_id = None self._variables = {}
def __init__( self, server: str, protocol: OptionalStr = None, response: str = "html", ): if server in servers.keys(): server = servers[server].url self.server = server self.protocol = protocol self.response = response # Initialized only via properties. self.constraints: Optional[Dict] = None self.dataset_id: OptionalStr = None self.auth: Optional[tuple] = None self.variables: Optional[ListLike] = None # Caching the last `dataset_id` and `variables` list request for quicker multiple accesses, # will be overridden when requesting a new `dataset_id`. self._dataset_id: OptionalStr = None self._variables: Dict = {}
def __init__(self, server, dataset_id=None, protocol=None, variables='', response='html', constraints=None, params=None, requests_kwargs=None): if server in servers.keys(): server = servers[server].url self.server = _check_url_response(server) self.dataset_id = dataset_id self.protocol = protocol self.variables = variables self.response = response self.constraints = constraints self.params = params self.requests_kwargs = requests_kwargs if requests_kwargs else {} # Caching the last `dataset_id` request for quicker multiple accesses, # will be overridden when requesting a new `dataset_id`. self._dataset_id = None self._variables = {}