Example #1
0
    def __init__(self, url=None, token=None, auth=Auth(), maxsize=10, ttl=600):
        """The parent Service class implements authentication and exponential
        backoff/retry. Override the url parameter to use a different instance
        of the backing service.
        """
        if url is None:
            url = os.environ.get(
                "DESCARTESLABS_PLACES_URL",
                "https://platform.descarteslabs.com/waldo/v2")

        Service.__init__(self, url, token, auth)
        self.cache = TTLCache(maxsize, ttl)
Example #2
0
    def __init__(self, url=None, token=None, auth=Auth()):
        """The parent Service class implements authentication and exponential
        backoff/retry. Override the url parameter to use a different instance
        of the backing service.
        """
        simplefilter('always', DeprecationWarning)
        if url is None:
            url = os.environ.get(
                "DESCARTESLABS_METADATA_URL",
                "https://platform.descarteslabs.com/metadata/v1")

        Service.__init__(self, url, token, auth)
        self._raster = Raster(auth=self.auth)