Skip to content

Releases: Privex/steem-async

2.1.0 - CLI Tool, Benchmarks, Dynamic Methods, and more!

30 Sep 09:36
Compare
Choose a tag to compare
  • Added some new methods to SteemAsync

    • get_witness - Get data for a given witness name

    • get_witness_list - Get the ordered witness list (i.e. top 20) including their metadata

    • wrapped_call - Easier way to call condenser_api/database_api prefixed methods. Primarily used by getattr to handle dynamic methods.

  • Added __getattr__ to SteemAsync to allow for dynamically generated methods - e.g. calling SteemAsync().lookup_account_names(["someguy123", true]) will be transparently converted into .wrapped_call('lookup_account_names', ["someguy123", true]) - allowing users to call same-named RPC methods just like a fully implemented method, instead of having to use json_call or api_call

  • Added privex.steem.cli and __main__ - which allows using steem-async straight from the CLI, which can be helpful for developers/node admins who need to check if a specific method is working properly, or to check what it outputs. It can also be used for shellscripting and other uses.

  • Added privex.steem.benchmarks - which contains bench_async (steem-async benchmark) and bench_beem (beem benchmark), to allow developers to see and verify the performance difference between beem and steem-async.

  • Added rich to setup.py + Pipfile, as well as the bench extra to setup.py

  • Added info to the README about using the new CLI tool, as well as the benchmarks

  • Probably some other stuff too :)

2.0.0 - New features (e.g. stream_blocks) + various improvements

30 Sep 05:42
Compare
Choose a tag to compare

2.0.0 - New features (e.g. stream_blocks) + various improvements

  • Fixed issue with reusing httpx.AsyncClient - now makes a fresh AsyncClient for each call, instead of re-using the same client for the instance (which causes issues).
    • Methods which use AsyncClient - now use it in a context manager (async with)
  • Added ability to adjust the configuration for HTTPX, including kwargs timeout and http2 , and master config dict httpx_config
  • Fixed get_accounts by adding key_sbd and key_steem attributes, which control whether balance keys are referred to by steem/sbd, hive/hbd, or something else. The attributes are auto-adjusted depending on your network choice, but you can also specify key_sbd/steem as kwargs to manually override it.
  • Added comments to every public method (afaik)
  • Added new stream_blocks method, which allows you to stream newly produced blocks via an async generator, either using a block limit (stop after X blocks), or using the stop_streaming method to abort an indefinite block stream.
  • Fixed HTTPError handling in json_call, so that it doesn't break if .request / .response are missing from the exception.
  • Added relative_head_block method, which gets you the head block, and relative block numbers from the head based on the diffs you specify (e.g. -100 will get you the block number 100 blocks before head).
  • Added relative block support to get_blocks , so you can query for e.g. 100 blocks before head until head.
  • Added get_blocks_solo which is similar to get_blocks - it makes bulk RPC calls for getting blocks, but unlike get_blocks, it doesn't chunk the requests - it sends them only to a single node in one request.
  • Updated all objects from Dictable to the modern DictDataClass
  • Added raw_data field to Account
  • Added hbd_balance and savings_hbd_balance to Account , with a post init function to handle copying raw_data HBD balances into the SBD balance attributes if detected.
  • Overhauled unit tests
    • Moved tests from tests.py into tests/ folder, with test_appbase and test_legacy modules
    • Converted the unit tests from class-based unit tests using the hacky async_sync decorator, to function-based unit tests which use pytest-asyncio for more native and clean asyncio unit testing.
    • General cleanup of testing.
  • Added a Pipfile for setting up a dev environment with pipenv
  • Updated the requirements in setup.py + excluded tests files from the package
  • Probably some other nice things which I forgot to mention :)