import _pulsar
import pulsar

class PulsarException(BaseException):
    def __init__(self, result: pulsar.Result) -> None: ...
    def error(self) -> pulsar.Result: ...

class Producer:
    def __init__(self, producer: _pulsar.Producer) -> None: ...
    async def send(self, content: bytes) -> pulsar.MessageId: ...
    async def close(self) -> None: ...

class Client:
    def __init__(self, service_url, **kwargs) -> None: ...
    async def create_producer(self, topic: str) -> Producer: ...
    async def close(self) -> None: ...
