Skip to content

Releases: aleph-im/aleph-sdk-python

1.1.0

14 Oct 10:20
d54e9ac
Compare
Choose a tag to compare

We're excited to announce the release of version 1.1.0. This version brings new features, enhancements, and fixes that improve the functionality and user experience. Here's what's new:

Recent Updates to the Aleph SDK Python

New Features

  • Account Handler: A new Account Handler feature has been introduced, providing enhanced functionality for managing accounts. (PR #175)

Dependency Management and Updates

  • Automated dependency updates: Dependabot has been configured to automatically update dependencies, ensuring the SDK always uses the latest, most secure versions of its dependencies. (PR #166)
  • ledgereth update: The ledgereth library, which is used for interacting with Ledger hardware wallets, has been updated from version 0.9.0 to 0.9.1. (PR #168)

Improvements

  • Code formatting: pyproject-fmt has been integrated to ensure consistent code formatting throughout the project. (PR #173)
  • Post-Solana fixes: Various fixes have been implemented to improve the interaction with Solana. (PR #178)

Overall, this update focuses on:

  • Improving dependency management
  • Enhancing code quality and maintainability
  • Introducing new features for account management
  • Addressing issues related to Solana interactions

Change list

New Contributors

Full Changelog: 1.0.1...1.1.0

1.0.1

04 Sep 09:59
c62fbb7
Compare
Choose a tag to compare

We're excited to announce the release of version 1.0.1. This version brings new features, enhancements, and fixes that improve the functionality and user experience. Here's what's new:

New Features:

  • Introduced the get_message_status function and overloaded the get_message function to return message status. (PR #163)

Bug Fixes:

  • Resolved an issue with the _load_account function when both a string and path for the private key were provided. (PR #160)
  • Ensured the correct type is used in the create_session function. (PR #159)
  • Fixed configuration settings. (PR #162)

Overall, this update focuses on fixing bugs, enhancing functionality, and keeping the library up-to-date with dependencies.

What's Changed

Full Changelog: 1.0.0...1.0.1

1.0.0

26 Aug 16:21
991670c
Compare
Choose a tag to compare

Key Highlights of the Aleph SDK Python Commit History

This commit history focuses on improvements to the Aleph SDK Python library, including:

New Features and Functionality

  • Added the ability for users to control their VMs. (PR #124)
  • Introduced methods for calculating firmware hash and handling confidential instances. (PR #140, #137)
  • Integrated Superfluid and PAYG functionality. (PR #144)
  • Implemented get_program_price to retrieve program pricing information. (PR #143)

Dependency Management and Build Process

  • Migrated project management to Hatch. (PR #111)
  • Updated dependencies and supported systems in CI. (PR #122)
  • Fixed hashing issues for caching dependencies in build wheels. (PR #116)
  • Removed support for Python 3.8 and Ubuntu 20.04. (PR #155)

Testing and Code Quality

  • Added tests for file storage. (PR #106)
  • Implemented daily test runs to catch dependency updates. (PR #117)
  • Improved code quality by fixing type hints, addressing deprecation warnings, and removing unused code. (PR #121, #123, #125, #126)
  • Updated documentation to reflect changes. (PR #134)

Security

  • Deprecated encryption methods and made the eciespy dependency optional. (PR #110)
  • Fixed issues related to authenticated clients and manager override. (PR #149)

Other Changes

  • Removed the rootfs_name instance creation field. (PR #112)
  • Added a parameter to directly download files to disk with download_file(). (PR #115)
  • Updated the PR Difficulty Rating action and CI configurations. (PR #118, #139)
  • Resolved various bugs related to library usage, compatibility, and dependency conflicts. (PR #119, #120, #127, #128, #129, #131, #132, #142, #145, #146, #150)

New Contributors

Overall, this commit history demonstrates a focus on enhancing the Aleph SDK Python's functionality, security, maintainability, and developer experience.

In detail

  • Fix create_instance docstring by @MHHukiewitz in #105
  • Implement Hypervisor field on instances by @nesitor in #107
  • Loosen eth-abi dependency by @MHHukiewitz in #108
  • Removed rootfs_name instance creation field by @nesitor in #112
  • Deprecate encryption methods and make eciespy dependency optional by @MHHukiewitz in #110
  • Use Hatch for Project Management by @MHHukiewitz in #111
  • Add itest_store.py to test file storage by @MHHukiewitz in #106
  • Fix Hashing for Caching Dependencies in Build Wheel GH Action by @MHHukiewitz in #116
  • Run tests daily in order to catch dependency updates by @hoh in #117
  • Updated PR Difficulty Rating action to v2 by @MHHukiewitz in #118
  • Add file_path param to download_file() to directly download files to disk by @MHHukiewitz in #115
  • Fix: No notification when dependency update breaks by @hoh in #119
  • Fix: Could not generate signed messages outside HTTP client by @hoh in #120
  • Fix: 'called_once' is not a valid assertion. by @hoh in #123
  • Fix: pkg_resources is obsolete to get package version by @hoh in #125
  • Fix: Ruff did not check code quality by @hoh in #126
  • Update dependencies and supported systems in CI by @hoh in #122
  • Fix type hints by @hoh in #121
  • Fix: Release eciespy 0.4.2 solves the conflicts with coincurve by @hoh in #127
  • Fix: Coverage only looked at test files by @hoh in #128
  • Fix: aiohttp issues a DeprecationWarning by @hoh in #129
  • Update aleph-message, fix compatibility issues by @hoh in #131
  • Fix: Pythom 3.12 fails setup libsecp256k1 by @hoh in #132
  • doc(README): command to launch tests was incorrect by @Psycojoker in #134
  • small improvements extracted from #113 by @Psycojoker in #136
  • ci: remove macos-11 build since it's not supported anymore by @Psycojoker in #139
  • Feature: Allow User to control their VM by @1yam in #124
  • Confidential: Provide method to calculate firmware hash by @olethanh in #140
  • Add new Confidential fields by @nesitor in #137
  • Fix typo by @olethanh in #141
  • Fix: Bump aleph-message version to 0.4.8 by @hoh in #142
  • Fix to ensure no trailing slash in crn node url by @philogicae in #145
  • ci: test jobs used to be call 'build' while they are tests jobs by @Psycojoker in #147
  • fix: aiohttp.ClientSession needs to be created inside an async function by @Psycojoker in #146
  • Fix 146: Autenticated client was overriding the manager and it was causing issue by @olethanh in #149
  • Feature: get_program_price by @1yam in #143
  • Fix: confest _http_session instead of http_session by @1yam in #150
  • Feature: Superfluid integrations by @1yam in #144
  • Upgrade to web3py, fixes on ETHAccount/PAYG, EVM configs by @philogicae in #154
  • Remove support for python 3.8 and Ubuntu 20.04 by @nesitor in #155
  • Reload the official superfluid dependency. by @nesitor in #156

Full Changelog: 0.9.0...1.0.0

0.9.0 : Payment streams, ETH account from mnemonics

23 Feb 14:44
@hoh hoh
Compare
Choose a tag to compare

We're excited to announce the release of version 0.9.0. This version brings several new features, enhancements, and fixes that improve the functionality and user experience. Here's what's new:

New Features

  • Payment Specification for Instances: It's now possible to specify a payment method, such as token streams, when creating instances with the AuthenticatedAlephClient. This addition is optional and defaults to "hold" on "ETH" for backward compatibility.
  • ETH Account Initialization from Mnemonic: Users can now easily import or migrate accounts using their mnemonic representation. This feature is a step towards extending behavior to more chains in the future.

Enhancements

  • Message and Post Filter Sorting: Introduced sort_by and sort_order arguments to MessageFilter and PostFilter for enhanced sorting capabilities.
  • Deprecation Message and Dependency Updates: Improved flexibility by loosening the aleph-message dependency to accept compatible versions up to 0.4.2. Also added a deprecation message to guide users through the transition.

Fixes

  • SSL Certificate Authority Specification: Addressed an SSL certificate verification issue on some macOS systems by allowing users to specify specific SSL certificates when using AuthenticatedAlephHttpClient.
  • Various Bug Fixes: Resolved issues with instance creation, including the removal of unnecessary program encoding arguments and ensuring payment methods can be specified.
  • Formatting and Code Quality Improvements: Updated the codebase to comply with the latest version of black for formatting and adjusted the flake8 rule to avoid conflicts.

New Contributors

  • @Antonyjin: Addressed and fixed an SSL certificate issue.
  • @philogicae: Contributed to fixing message types and adding sorting functionality.

Thank you to all contributors for making this release possible! Your hard work and dedication are greatly appreciated.

v0.8.0: AlephDNS, Creating Instances, Breaking Changes & More

14 Dec 15:53
Compare
Choose a tag to compare

Packed with an impressive array of new features, this release of Aleph SDK Python marks a significant step forward, offering enhanced support for the latest instances and DNS records functionalities, a seamless authenticated file upload process, and much more.

We improved the architecture of the framework and had some breaking changes. Expect to update your code if you relied on aleph-sdk-python<=0.7.0; check out the "Breaking Changes" section below for guidance on how to it.

New Features

  • Aleph Domain Name System (#55): Introduced AlephDNS for domain name system functionalities to link your VMs with your own domains.
  • IPFS Downloading & Better File Handling (#36): Directly download from IPFS using download_file_ipfs() into files and buffers.
  • AlephApp VM Hash (#53): Added property to retrieve item_hash of the Aleph message that created the current VM.
  • Enhanced Message Types Filtering (#32): Added msgTypes parameter to filter by multiple message types, deprecating msgType.
  • Raw Data Signing (#50): Implemented BaseAccount.sign_raw() for signing arbitrary data.
  • Authenticated File Upload (#69): Streamlined file upload process, allowing atomic operation of file upload and STORE message sending, while checking for ALEPH balances.
  • Instance Creation and SSH Access (#78): Enabled instance creation complete with SSH pubkey upload.
  • Simplified Message Retrieval (#81): Reduced get_message() parameters and introduced ForgottenMessageError.
  • Insufficient Funds Error Handling (#86): Added error handling for low funds during instance creation.

Breaking Changes

  • Client Class Refactoring (#54): Transitioned AlephClient and AuthenticatedAlephClient to non-functional abstract classes.
    Use AlephHttpClient and AuthenticatedAlephHttpClient instead. This is in preparation to new client-types in upcoming releases (i.e. message caching).
  • Client Interface Changes (#32, #54, #65):
    • Introduced MessageFilter and PostFilter to reduce parameter duplication
    • Removed the obsolete limit parameter in fetch_aggregate() and fetch_aggregates().
    • pagination is now page_size.
    • Harmonized query parameters in get_messages() and watch_messages().
    • Deprecated msgType in favor of msgTypes.

Fixes and Improvements

  • Code Quality Enhancements (#49, #70, #71, #73, #81): Addressed flake8 bugs, import issues, improved workflow and testing processes.
  • Functionality Improvements (#56, #60, #61, #62, #64, #74, #75): Enhanced optional value handling, resolved issues with POST /messages, datetime/UUID objects, RAM size, default runtime, MacOS builds, and date filtering.
  • Client and API Refinements (#54, #65, #81, #86): Improved message iteration functions, simplified get_message, and refined submit() and broadcast() methods.
  • Dependency and Build Fixes (#83, #84, #74): Upgraded aleph-message, set extended_json_encoder as default, and fixed MacOS build issues.

All Pull Requests

  • Feature: download on ipfs client by @1yam in #36
  • Fix:sync version of download_file_to_buffer and download_file_ipfs_to_buffer by @1yam in #48
  • fix formatting, flake8 bugs and imports by @MHHukiewitz in #49
  • Add support for signing messages using LedgerHQ wallet on Ethereum by @hoh in #51
  • Fix: Invalid handling of optional value by @hoh in #56
  • Add AlephApp.vm_hash by @MHHukiewitz in #52
  • Allow multiple message types by @MHHukiewitz in #32
  • Add sign_raw() by @MHHukiewitz in #50
  • Fix: support 405 from POST /messages in broadcast fallback by @odesenfans in #60
  • Fix: allow user to specify datetime and UUID objects in post content by @odesenfans in #61
  • Fix: 128 MB of RAM was too small by @hoh in #62
  • AlephClientBase and AuthenticatedAlephClientBase by @MHHukiewitz in #54
  • Fix: Default runtime was obsolete by @hoh in #64
  • Fix: add ledgereth to "testing" install target by @odesenfans in #66
  • further aleph.im renaming by @hoh in #67
  • Refactor AlephClient classes by @MHHukiewitz in #65
  • Feature: authenticated file upload SDK by @1yam in #69
  • Hotfix: Formatting and mypy issues were not tested in PR workflow by @MHHukiewitz in #70
  • Fix workflow triggers for Forked-Repo-PRs by @MHHukiewitz in #71
  • Fix: macos 11 & 12 build by @1yam in #74
  • Fix: Upload Test wasn't mocked by @1yam in #73
  • Problem: Filtering by start_date or end_date would fail assertion by @MHHukiewitz in #75
  • PR Difficulty Rating Workflow by @MHHukiewitz in #76
  • Add allow_amend, internet and aleph_api parameters to create_program by @MHHukiewitz in #77
  • Add create_instance method by @MHHukiewitz in #78
  • Update PR Difficulty Rating action to always use the latest version. by @MHHukiewitz in #80
  • Feature : AlephDNS (2nd attempt) by @hoh in #55
  • Refactor: Simplify and improve get_messages; use mocked responses by @MHHukiewitz in #81
  • Add extended JSON encoder for datetime objects in message encoding by @MHHukiewitz in #82
  • Upgrade aleph-message to v0.4.1 by @MHHukiewitz in #83
  • Use extended_json_encoder as default in ClientSession by @MHHukiewitz in #84
  • Refactor: Add InsufficientFundsError in create_instance by @MHHukiewitz in #86

Full Changelog: 0.7.0...v0.8.0

0.7.0 A summer full of features

11 Jul 15:30
@hoh hoh
Compare
Choose a tag to compare

Many new features and fixes in this new release of the SDK, including the support for Python 3.11, verifying Ethereum and Solana signatures, new version of aleph-message.

What's Changed

  • Fix: support for Python 3.11 by @odesenfans in #7
  • Feature: Signature verification for Solana and Ethereum messages by @MHHukiewitz in #19
  • Fix: Relay startup event through AlephApp by @MHHukiewitz in #22
  • Refactor: Simplify opening of files for reading or writing by @hoh in #28
  • Minor fixes by @hoh in #27
  • Fix: asyncio.run cannot run inside a loop by @hoh in #26
  • Fix: AlephClient class could not use unix sockets by @hoh in #24
  • Fix: ETH verify_signature fails on checksummed addresses by @MHHukiewitz in #29
  • Fix: SDK error when retrieving fallback private key, but the symlink was dead. by @1yam in #33
  • Feature: VM cache did not support connecting through a Unix socket by @odesenfans in #35
  • Chore: bump aleph-message to 0.4.0a3 by @odesenfans in #39
  • Fix: CI was broken because of aiomqtt update by @odesenfans in #40
  • Problem: Signatures generated with Python 3.11 are invalid by @hoh in #30
  • Fix: Optional argument requires default value by @hoh in #41
  • Fix: aleph-message 0.4.0 has been released by @hoh in #42
  • Fix: Scripts used renamed Dockerfile by @hoh in #43
  • Fix: package could not be published to Pypi by @odesenfans in #45

New Contributors

  • @1yam made their first contribution in #33

Full Changelog: 0.6.0...0.7.0

0.7.0b1 beta

16 May 14:54
@hoh hoh
Compare
Choose a tag to compare
0.7.0b1 beta Pre-release
Pre-release

What's Changed

  • Fix: support for Python 3.11 by @odesenfans in #7
  • Feature: Signature verification for Solana and Ethereum messages by @MHHukiewitz in #19
  • Fix: Relay startup event through AlephApp by @MHHukiewitz in #22
  • Refactor: Simplify opening of files for reading or writing by @hoh in #28
  • Minor fixes by @hoh in #27
  • Fix: asyncio.run cannot run inside a loop by @hoh in #26
  • Fix: AlephClient class could not use unix sockets by @hoh in #24

Full Changelog: 0.6.0...0.7.0b1

0.6.0 First stable release since the split from aleph-client

02 Mar 17:07
@hoh hoh
Compare
Choose a tag to compare

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