# Services (/docs/python-sdk/services)

> For AI agents: the complete documentation index is at https://www.daytona.com/llms.txt.

## RegistriesService [#registriesservice]

```python
class RegistriesService()
```

Project container-registry credentials, which image pulls and builds
use to reach private registries.

Passwords are write-only: the API never returns them, and the SDK keeps no
copy of one it sends.

#### RegistriesService.\_\_init\_\_ [#registriesservice__init__]

```python
def __init__() -> None
```

#### RegistriesService.delete [#registriesservicedelete]

```python
def delete(host: str, /) -> None
```

Delete the credential for `host`.

#### RegistriesService.get [#registriesserviceget]

```python
def get(host: str, /) -> Registry
```

Fetch one registry credential's metadata (never its password).

Daytona Cloud does not serve this read yet: until it does, it raises
`NotFoundError` even for a credential that exists; use
`list` or `iter` there.

#### RegistriesService.iter [#registriesserviceiter]

```python
def iter(*,
         cursor: Optional[str] = None,
         limit: Optional[int] = None) -> Iterator[Registry]
```

#### RegistriesService.list [#registriesservicelist]

```python
def list(*,
         cursor: Optional[str] = None,
         limit: Optional[int] = None) -> ListResult[Registry]
```

List one page of registry credential metadata (never passwords).

#### RegistriesService.set [#registriesserviceset]

```python
def set(host: str,
        /,
        *,
        username: str,
        kind: SetRegistryKind,
        password: Optional[str] = None,
        description: Optional[str] = None) -> Registry
```

Create or replace the credential for `host` and return its metadata.

The API replaces the whole credential, so each call states all of it,
with one request: `kind` is required (`basic` for a plain username
and password), and `description` omitted (or `None`) leaves the
credential without one. `password` (write-only, never returned) is
required for every kind but `ecr_role`, whose `username` is the IAM
role ARN the platform assumes.

## AsyncRegistriesService [#asyncregistriesservice]

```python
class AsyncRegistriesService()
```

Project container-registry credentials, which image pulls and builds
use to reach private registries.

Passwords are write-only: the API never returns them, and the SDK keeps no
copy of one it sends.

#### AsyncRegistriesService.\_\_init\_\_ [#asyncregistriesservice__init__]

```python
def __init__() -> None
```

#### AsyncRegistriesService.list [#asyncregistriesservicelist]

```python
async def list(*,
               cursor: Optional[str] = None,
               limit: Optional[int] = None) -> ListResult[Registry]
```

List one page of registry credential metadata (never passwords).

#### AsyncRegistriesService.iter [#asyncregistriesserviceiter]

```python
async def iter(*,
               cursor: Optional[str] = None,
               limit: Optional[int] = None) -> AsyncIterator[Registry]
```

#### AsyncRegistriesService.get [#asyncregistriesserviceget]

```python
async def get(host: str, /) -> Registry
```

Fetch one registry credential's metadata (never its password).

Daytona Cloud does not serve this read yet: until it does, it raises
`NotFoundError` even for a credential that exists; use
`list` or `iter` there.

#### AsyncRegistriesService.set [#asyncregistriesserviceset]

```python
async def set(host: str,
              /,
              *,
              username: str,
              kind: SetRegistryKind,
              password: Optional[str] = None,
              description: Optional[str] = None) -> Registry
```

Create or replace the credential for `host` and return its metadata.

The API replaces the whole credential, so each call states all of it,
with one request: `kind` is required (`basic` for a plain username
and password), and `description` omitted (or `None`) leaves the
credential without one. `password` (write-only, never returned) is
required for every kind but `ecr_role`, whose `username` is the IAM
role ARN the platform assumes.

#### AsyncRegistriesService.delete [#asyncregistriesservicedelete]

```python
async def delete(host: str, /) -> None
```

Delete the credential for `host`.

## Registry [#registry]

```python
@dataclass(frozen=True, slots=True, kw_only=True)
class Registry()
```

A project registry credential's metadata; the password is write-only and never returned.

**Attributes**:

- `host` _str_
- `kind` _RegistryKind_
- `raw_kind` _str_
- `username` _str_
- `created_at` _datetime_
- `updated_at` _datetime_
- `description` _Optional\[str\] = None_

## SetRegistryKind [#setregistrykind]

```python
SetRegistryKind = Literal['basic', 'ghcr', 'gcr', 'ecr', 'ecr_role']
```

The kinds `registries.set()` takes; for `ecr_role` the username is the
IAM role ARN the platform assumes, and no password is needed.
