Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/guide/namespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,26 @@ dc.read_values(scores=[0.8, 1.5, 2.1]).save("metrics")

ds = dc.read_dataset("local.local.metrics")
ds.show()
```

## Removing Namespaces and Projects

Use `delete_namespace` to remove an empty namespace or an empty project within a namespace. Delete will fail if the target is not empty.

### Signature

```python
def delete_namespace(name: str, session: Optional[Session]) -> None:
```

- **`<namespace>`** — deletes the namespace (must contain no projects or datasets).
- **`<namespace>.<project>`** — deletes the project (must contain no datasets).

### Examples

```python
import datachain as dc

dc.delete_namespace("dev.my-project") # delete project
dc.delete_namespace("dev") # delete namespace
```
2 changes: 2 additions & 0 deletions docs/references/datachain.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ for examples of how to create a chain.

::: datachain.lib.dc.datasets.move_dataset

::: datachain.lib.namespaces.delete

::: datachain.lib.dc.hf.read_hf

::: datachain.lib.dc.json.read_json
Expand Down
Loading