Skip to main content

aiosfstream

PyPI package Documentation Status Build status Coverage MIT license

aiosfstream is a Salesforce Streaming API client for asyncio. It can be used to receive push notifications about changes on Salesforce objects or notifications of general events sent through the Streaming API.

For detailed guidance on how to work with PushTopics or how to create Generic Streaming Channels please consult the Streaming API documentation. For working with Platform Events or Change Data Capture events check out the linked documentation.

Features

Usage

import asyncio

from aiosfstream import SalesforceStreamingClient


async def stream_events():
    # connect to Streaming API
    async with SalesforceStreamingClient(
            consumer_key="<consumer key>",
            consumer_secret="<consumer secret>",
            username="<username>",
            password="<password>") as client:

        # subscribe to topics
        await client.subscribe("/topic/one")
        await client.subscribe("/topic/two")

        # listen for incoming messages
        async for message in client:
            topic = message["channel"]
            data = message["data"]
            print(f"{topic}: {data}")

if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(stream_events())

Documentation

http://aiosfstream.readthedocs.io/

Changelog

0.5.0 (2019-03-08)

  • Add support for Change Data Capture events

  • Fix some typos in the documentation

0.4.0 (2019-01-06)

  • Add type hints

  • Configurable replay storage behavior

0.3.0 (2018-11-07)

  • Add support for sandbox orgs

0.2.5 (2018-11-06)

  • Add missing changelog entries

0.2.4 (2018-11-06)

  • Fix platform event message creation date extraction issue

0.2.3 (2018-09-19)

  • Fix asynchronous iterator bug in python 3.7

0.2.2 (2018-06-15)

  • Update aiocometd dependency to 0.3.1

0.2.1 (2018-05-25)

  • Fix replay issues on mass record delete operations

  • Improve the documentation of the Client.publish method

0.2.0 (2018-05-05)

  • Enable the usage of third party JSON libraries

  • Expose authentication results as public attributes in Authenticator classes

0.1.0 (2018-04-26)

Release files for aiosfstream 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiosfstream 0.5.0
File Size Uploaded
aiosfstream-0.5.0.tar.gz 62.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiosfstream 0.5.0
File Interpreter ABI Platform
aiosfstream-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 79.1 kB

Release files / aiosfstream-0.5.0.tar.gz

Download URL aiosfstream-0.5.0.tar.gz
Size 62.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9f15e766d29e98e9bd817ad2cb9c1c8ca6384727b875a4f051293310162e7964
BLAKE2b-256 checksum
How to use checksums
dfb2969d2e5b4ba7ed2d190ffa019d74e775fecf40b9402e8974e6cb471fe58b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

Release files / aiosfstream-0.5.0-py3-none-any.whl

Download URL aiosfstream-0.5.0-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8a251ae3d33f6cd9d522d27be23c234b56cf7b6d2a151376f359f7e0b08e0b4
BLAKE2b-256 checksum
How to use checksums
6082947528d182b7214a3f67100ad6c7e5c2dcfc5d4103d2c374bf6f83ee4d89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page