Skip to content

Instantly share code, notes, and snippets.

View annatisch's full-sized avatar

Anna Tisch annatisch

  • Microsoft
  • New Zealand
View GitHub Profile
@annatisch
annatisch / readme.md
Last active April 23, 2020 20:15
Storage recursive ACL proposal

Current API for long running polling operations is as follows:

    def status(self):
        # type: () -> Any
        ...

    def result(self, timeout=None):
        # type: (Optional[int]) -> Model
        ...
@annatisch
annatisch / readme.md
Last active April 20, 2020 15:00
Service Bus multi-session receive in Python

Track 1 SDK used a sample, rather than an API to support this scenario:

async def message_processing(queue_client):
    while True:
        try:
            async with queue_client.get_receiver(session=NEXT_AVAILABLE, idle_timeout=1) as session:
                await session.set_session_state("OPEN")
                async for message in session:
                    print("Message: {}".format(message))
@annatisch
annatisch / sample.md
Last active February 27, 2020 15:59
ServiceBus clients via entity factory

Customer code: Message send

from azure.servicebus import Queue, Topic

# Sending to a queue
with Queue.sender(namespace='foo', queue_name='bar', credential='sas') as sender:
  sender.send(Message('Hello World'))
  
# Sending with a connection string