def __init__(self, package, version):
        """Construct a new requirement.

        :param package: the package name.
        :param version: a semver compatible version specification.
        """
        self.package = package
        self.version = version
        if self.version and not re.match(r"[<=>~]", version[:2]):
            self.version = "=={}".format(self.version)
def __init__(self, resolver, proxy_type, key):
        if proxy_type == "file":
            self._method = resolver.get_file_content
        elif proxy_type == "param":
            self._method = resolver.get_parameter_value
        elif proxy_type == "secret":
            self._method = resolver.get_secret_value
        elif proxy_type == "bucket_file":
            self._method = resolver.get_bucket_file
        else:
            raise ValueError("Unknown proxy type %s", proxy_type)
        self._key = key