13 lines
399 B
Python
13 lines
399 B
Python
|
|
# retoor <retoor@molodetz.nl>
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from typing import Any
|
||
|
|
|
||
|
|
from devplacepy_services.base.config import service_url
|
||
|
|
from devplacepy_services.base.http import internal_request
|
||
|
|
|
||
|
|
|
||
|
|
async def publish(topic: str, data: dict[str, Any]) -> None:
|
||
|
|
url = f"{service_url('pubsub')}/internal/publish"
|
||
|
|
await internal_request("POST", url, json={"topic": topic, "data": data})
|