com.atproto.repo.putRecord

Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.

class atproto_client.models.com.atproto.repo.put_record.Data

Bases: DataModelBase

Input data model for com.atproto.repo.putRecord.

field collection: Nsid [Required]

The NSID of the record collection.

field record: UnknownInputType [Required]

The record to write.

Constraints:
  • __module__ = atproto_client.models.unknown_union

  • __firstlineno__ = 72

  • __doc__ = Annotation for lexicon unknown fields: any registered record type, else DotDict. Record types are looked up in the runtime registry rather than in a union fixed at import time, so a record defined by a package generated from custom lexicons is decoded to its own model.

  • __get_pydantic_core_schema__ = <bound method UnknownRecordFallback.__get_pydantic_core_schema__ of <class ‘atproto_client.models.unknown_union.UnknownRecordFallback’>>

  • __static_attributes__ = ()

  • __dict__ = {‘__module__’: ‘atproto_client.models.unknown_union’, ‘__firstlineno__’: 72, ‘__doc__’: ‘Annotation for lexicon unknown fields: any registered record type, else DotDict.nnRecord types are looked up in the runtime registry rather than in a union fixed at import time,nso a record defined by a package generated from custom lexicons is decoded to its own model.n’, ‘__get_pydantic_core_schema__’: <classmethod(<function UnknownRecordFallback.__get_pydantic_core_schema__ at 0x7bdd14e57100>)>, ‘__static_attributes__’: (), ‘__dict__’: <attribute ‘__dict__’ of ‘UnknownRecordFallback’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘UnknownRecordFallback’ objects>}

  • __weakref__ = <attribute ‘__weakref__’ of ‘UnknownRecordFallback’ objects>

field repo: AtIdentifier [Required]

The handle or DID of the repo (aka, current account).

field rkey: RecordKey [Required]

The Record Key.

Constraints:
  • max_length = 512

field swap_commit: Cid | None = None

Compare and swap with the previous commit by CID.

field swap_record: Cid | None = None
field validate_: bool | None = None
class atproto_client.models.com.atproto.repo.put_record.DataDict

Bases: TypedDict

collection: Nsid

The NSID of the record collection.

record: Annotated[Any, UnknownRecordFallback]

The record to write.

repo: AtIdentifier

The handle or DID of the repo (aka, current account).

rkey: RecordKey

The Record Key.

swap_commit: NotRequired[Cid | None]

Compare and swap with the previous commit by CID.

swap_record: NotRequired[Cid | None]

Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation.

validate_: NotRequired[bool | None]

Can be set to ‘false’ to skip Lexicon schema validation of record data, ‘true’ to require it, or leave unset to validate only for known Lexicons.

class atproto_client.models.com.atproto.repo.put_record.Response

Bases: ResponseModelBase

Output data model for com.atproto.repo.putRecord.

field cid: Cid [Required]

Cid.

field commit: models.ComAtprotoRepoDefs.CommitMeta | None = None

Commit.

field uri: AtUri [Required]

Uri.

field validation_status: Literal['valid', 'unknown'] | str | None = None

Validation status.