Releases: Privex/steem-async
2.1.0 - CLI Tool, Benchmarks, Dynamic Methods, and more!
-
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__
toSteemAsync
to allow for dynamically generated methods - e.g. callingSteemAsync().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 usejson_call
orapi_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 containsbench_async
(steem-async benchmark) andbench_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 thebench
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
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
andhttp2
, and master config dicthttpx_config
- Fixed
get_accounts
by addingkey_sbd
andkey_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 yournetwork
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 thestop_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 thediffs
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 toget_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
fromDictable
to the modernDictDataClass
- Added
raw_data
field toAccount
- Added
hbd_balance
andsavings_hbd_balance
toAccount
, 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
intotests/
folder, withtest_appbase
andtest_legacy
modules - Converted the unit tests from class-based unit tests using the hacky
async_sync
decorator, to function-based unit tests which usepytest-asyncio
for more native and clean asyncio unit testing. - General cleanup of testing.
- Moved tests from
- Added a
Pipfile
for setting up a dev environment withpipenv
- Updated the requirements in setup.py + excluded tests files from the package
- Probably some other nice things which I forgot to mention :)