SchemaLoader
atmosphere.SchemaLoader(client)
Loads PackableSample schemas from ATProto.
This class fetches schema records from ATProto and can list available schemas from a repository.
Examples
>>> client = AtmosphereClient()
>>> client.login("handle", "password")
>>>
>>> loader = SchemaLoader(client)
>>> schema = loader.get("at://did:plc:.../ac.foundation.dataset.sampleSchema/...")
>>> print(schema["name"])
'MySample'
Methods
| get |
Fetch a schema record by AT URI. |
| list_all |
List schema records from a repository. |
get
atmosphere.SchemaLoader.get(uri)
Fetch a schema record by AT URI.
Parameters
| uri |
str | AtUri |
The AT URI of the schema record. |
required |
Returns
|
dict |
The schema record as a dictionary. |
list_all
atmosphere.SchemaLoader.list_all(repo=None, limit=100)
List schema records from a repository.
Parameters
| repo |
Optional[str] |
The DID of the repository. Defaults to authenticated user. |
None |
| limit |
int |
Maximum number of records to return. |
100 |