Steem-async

Latest version: v2.0.0

Safety actively analyzes 685525 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

2.0.0

- 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 :)

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.