How to use the konoha.data.resource.Resource function in konoha

To help you get started, weโ€™ve selected a few konoha examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github himkt / tiny_tokenizer / konoha / data / resource.py View on Github external
logger.info(f"Downloading {obj.key}")
            download_path = os.path.join(resource_dir, obj.key)
            bucket.download_file(obj.key, download_path)
            logging.info(f"Downloaded to {download_path}")

        dest_dir = os.path.join(resource_dir, prefix)
        logging.info(f"Downloaded to {dest_dir}")
        return dest_dir

    @property
    def path(self) -> Optional[str]:
        return self._path


if __name__ == "__main__":
    r = Resource("/tmp/main")
    print(r.path)