Skip to content

0.6.0 First stable release since the split from aleph-client

Compare
Choose a tag to compare
@hoh hoh released this 02 Mar 17:07
· 152 commits to main since this release

This is the first release of the Aleph.im Python SDK since the split from aleph-client.

The SDK is focused on bringing developers the best library to build tools on top of Aleph.im, while aleph-client provides the command line interface and will add new user features for using Aleph.im.

The main change is that you can now persist the HTTP(2) connection to the API of a Core Channel Node using the AlephClient object:

from aleph.sdk.client import AlephClient


async with AlephClient(api_server="https://api2.aleph.im") as client
    response: MessagesResponse = await client.get_messages(
        message_type="POST",
    )

    messages = response.messages
    for message in messages:
        print(message)

User accounts don't have to be passed to every call anymore, you can instantiate AuthenticatedAlephClient instead:

from aleph.sdk.chains.ethereum import ETHAccount, get_fallback_private_key
from aleph.sdk.client import AuthenticatedAlephClient

account = ETHAccount(private_key=get_fallback_private_key())
async with AuthenticatedAlephClient(
    account=account, api_server="https://api2.aleph.im"
) as client:
    post_message, message_status = await client.create_post(
        post_content="Hello Aleph!",
        post_type="POST",
        channel="TEST",
    )

What's Changed

  • Fix: Use of black was not enforced by @hoh in #1
  • Feature: full API refactoring by @odesenfans in #2
  • Test on more platforms, enforce code quality, code cleanup by @hoh in #5
  • Cleanup project metadata by @hoh in #6
  • Feature: remove deprecated aleph_client.main module by @odesenfans in #3
  • Fix: Rename aleph-client -> aleph-sdk-python by @hoh in #8
  • Cleanup: black and isort by @hoh in #14
  • Fix: GitHub actions failed on Ubuntu due to Grub by @hoh in #15
  • Rename project and UserSession by @hoh in #12
  • Dependencies: Update to aleph-message 0.3.1 by @hoh in #16
  • Add metadata parameter to create_program() by @MHHukiewitz in #11

New Contributors

Full Changelog: v0.5.1...0.6.0