atproto_core.nsid.nsid¶
- class atproto_core.nsid.nsid.NSID(segments: ~typing.List[str] = <factory>)¶
Bases:
object
NameSpaced IDs (NSIDs).
Examples
com.example.status
io.social.getFeed
net.users.bob.ping
- property authority: str¶
Get authority of NSID.
com.example.thing ^^^^^^^^^^^——–> example.com
delim joined self.segments[:-1][::-1]
- property name: str¶
Get name.
- segments: List[str]¶
- atproto_core.nsid.nsid.get_nsid_segments(nsid: str) List[str] ¶
- atproto_core.nsid.nsid.validate_nsid(nsid: str, *, soft_fail: bool = False) bool ¶
Validate NSID.
- Parameters:
nsid – NSID to validate.
soft_fail – enable to return False on fall instead of exception
- Returns:
Validation result.
- Return type:
bool
- Raises:
atproto.exceptions.InvalidNsidError – Invalid NSID exception.