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_by_slug

instance_name = "my-hosted"
assert ln_setup.settings.user.handle == "testuser1"
ln_setup.connect(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()

Delete everything:

target_path.unlink()
ln_setup.delete("my-hosted", force=True)
delete_instance_by_slug(f"testuser1/{instance_name}")