Load hosted instance#

import lamindb_setup as ln_setup
from lamindb_setup.core.upath import UPath
from lamindb_setup.core._hub_core import delete_instance_storage

instance_name = "my-hosted"
assert ln_setup.settings.user.handle == "testuser1"
ln_setup.load(f"testuser1/{instance_name}")
ln_setup.settings.storage.root.view_tree()
target_path = UPath(ln_setup.settings.storage.root / "test_notebooks.py")
target_path.upload_from("test_notebooks.py")
target_path.exists()
ln_setup.settings.storage.root.view_tree()

Delete everything:

target_path.unlink()
(ln_setup.settings.storage.root / ".lamindb/_exclusion").rmdir()
ln_setup.delete("my-hosted", force=True)
delete_instance_storage(f"testuser1/{instance_name}")