> ## Documentation Index
> Fetch the complete documentation index at: https://pdsx.zzstoatzz.io/llms.txt
> Use this file to discover all available pages before exploring further.

# operations

# `pdsx._internal.operations`

atproto record operations.

## Functions

### `list_records` <sup><a href="https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/_internal/operations.py#L22" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
list_records(client: AsyncClient, collection: str, limit: int, repo: str | None = None, cursor: str | None = None) -> models.ComAtprotoRepoListRecords.Response
```

list records in a collection.

**Args:**

* `client`: authenticated atproto client
* `collection`: collection name
* `limit`: maximum number of records
* `repo`: optional repo DID (defaults to authenticated user)
* `cursor`: optional pagination cursor

**Returns:**

* response with records and optional cursor for next page

### `get_record` <sup><a href="https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/_internal/operations.py#L57" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
get_record(client: AsyncClient, uri: str, repo: str | None = None) -> models.ComAtprotoRepoGetRecord.Response
```

get a specific record.

**Args:**

* `client`: authenticated atproto client
* `uri`: record AT-URI (can be shorthand like 'collection/rkey' if authenticated or repo provided)
* `repo`: repository DID/handle (enables shorthand URIs with -r flag)

**Returns:**

* record response

### `create_record` <sup><a href="https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/_internal/operations.py#L100" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
create_record(client: AsyncClient, collection: str, record: dict[str, RecordValue], rkey: str | None = None) -> models.ComAtprotoRepoCreateRecord.Response
```

create a new record.

**Args:**

* `client`: authenticated atproto client
* `collection`: collection name
* `record`: record data
* `rkey`: optional record key (e.g. 'self' for profile records)

**Returns:**

* created record response

### `update_record` <sup><a href="https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/_internal/operations.py#L140" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
update_record(client: AsyncClient, uri: str, updates: dict[str, RecordValue]) -> models.ComAtprotoRepoPutRecord.Response
```

update an existing record.

**Args:**

* `client`: authenticated atproto client
* `uri`: record AT-URI (can be shorthand like 'collection/rkey' if authenticated)
* `updates`: fields to update

**Returns:**

* updated record response

### `delete_record` <sup><a href="https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/_internal/operations.py#L184" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
delete_record(client: AsyncClient, uri: str) -> None
```

delete a record.

**Args:**

* `client`: authenticated atproto client
* `uri`: record AT-URI (can be shorthand like 'collection/rkey' if authenticated)

### `describe_repo` <sup><a href="https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/_internal/operations.py#L205" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
describe_repo(client: AsyncClient, repo: str) -> models.ComAtprotoRepoDescribeRepo.Response
```

describe a repo, listing its collections.

**Args:**

* `client`: atproto client (no auth required)
* `repo`: handle or DID to describe

**Returns:**

* response with handle, did, didDoc, collections, handleIsCorrect

### `upload_blob` <sup><a href="https://github.com/zzstoatzz/pdsx/blob/main/src/pdsx/_internal/operations.py#L221" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
upload_blob(client: AsyncClient, file_path: str | Path) -> models.ComAtprotoRepoUploadBlob.Response
```

upload a blob (image, video, etc.).

**Args:**

* `client`: authenticated atproto client
* `file_path`: path to file to upload

**Returns:**

* upload response with blob reference
