bovine.clients
This module contains functionality outside of the scope of ActivityPub, but useful in the FediVerse.
bovine.clients
fetch_nodeinfo
async
fetch_nodeinfo(
session: ClientSession, domain: str
) -> dict | None
Fetches the nodeinfo 2.0 object from domain using the /.well-known/nodeinfo endpoint
Source code in bovine/bovine/clients/__init__.py
lookup_account_with_webfinger
async
lookup_account_with_webfinger(
session: ClientSession, fediverse_handle: str
) -> str | None
Deprecated: Use lookup_uri_with_webfinger instead
Looks up the actor url associated with a FediVerse handle, i.e. an identifier of the form username@domain, using the webfinger endpoint
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session
|
ClientSession
|
the aiohttp.ClientSession to use |
required |
fediverse_handle
|
str
|
the FediVerse handle as a string |
required |
Source code in bovine/bovine/clients/__init__.py
lookup_did_with_webfinger
async
lookup_did_with_webfinger(
session: ClientSession, domain: str, did: str
)
Deprecated: Use lookup_uri_with_webfinger instead
Looks up the actor url associated with a did and domain using the webfinger endpoint
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session
|
ClientSession
|
the aiohttp.ClientSession to use |
required |
domain
|
str
|
the domain to perform the lookup from |
required |
did
|
str
|
the did key to perform lookup with |
required |
Source code in bovine/bovine/clients/__init__.py
lookup_uri_with_webfinger
async
lookup_uri_with_webfinger(
session: ClientSession,
uri: str,
domain: str | None = None,
) -> Tuple[Optional[str], Optional[bool]]
Looks up an actor URI associated with an URI and domain
using the webfinger endpoint following fep-4adb
<https://codeberg.org/fediverse/fep/src/branch/main/feps/fep-4adb.md>
_
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session
|
ClientSession
|
the aiohttp.ClientSession to use |
required |
uri
|
str
|
the uri to perform lookup with |
required |
domain
|
str | None
|
the domain to perform the lookup from |
None
|
Returns:
Type | Description |
---|---|
Tuple[Optional[str], Optional[bool]]
|
A tuple of |
Source code in bovine/bovine/clients/__init__.py
lookup_with_dns
async
lookup_with_dns(
session: ClientSession, domain: str
) -> str | None
Looks up the actor url associated with the dns entry for domain. See
FEP-612d: Identifying ActivityPub Objects through DNS
<https://codeberg.org/fediverse/fep/src/branch/main/feps/fep-612d.md>
_ for
the mechanism.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session
|
ClientSession
|
the aiohttp.ClientSession to use |
required |
domain
|
str
|
the domain to perform the lookup from |
required |