# nodus.secret

> `Secret` references (resources.md §5.2). Values are write-only: nothing the API returns contains them.

Source: https://nodus-platform-site.pages.dev/docs/reference/python/nodus-secret/
Build revision: 211ad9f836655b1c3a2668c4693e442471f28614

<!-- Generated by scripts/gen-reference.mjs from the SDK docstrings (griffe). Do not edit: run make gen. -->

`Secret` references (resources.md §5.2). Values are write-only: nothing the API returns contains them.

## `Secret`

```python
class Secret(name: str | None = None, *, data: dict[str, str] | None = None, type: str = 'Opaque') -> None
```

A named Secret, or inline values that become one when first used.

`from_name` never touches the network. `from_dict` and `from_dotenv` are stored as `<app>-<hash8>` each time an App using them is published (owned by that App object and removed with it), or as `sdk-<hash8>` outside an App.

### `Secret.create`

```python
create(name: str, data: dict[str, str], type: str = 'Opaque', project: str | None = None) -> _Secret
```

Create the Secret, or write a new version when it exists (running attempts keep their pinned version).

### `Secret.from_dict`

```python
from_dict(data: dict[str, str]) -> _Secret
```

### `Secret.from_dotenv`

```python
from_dotenv(path: str | Path = '.env') -> _Secret
```

### `Secret.from_name`

```python
from_name(name: str) -> _Secret
```

### `Secret.name`

Type: `str | None`
