diff --git a/MANIFEST.in b/MANIFEST.in index 67d240081e66ee7fce980ecc092cabc1afdc1193..28ec6dc9f48db76f253cdcf8ec4be83d6de4c800 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,9 +5,9 @@ include *.txt include MANIFEST.in # All source files -recursive-include steempy * -recursive-include steempybase * -recursive-include steempyapi * +recursive-include beem * +recursive-include beembase * +recursive-include beemapi * # All documentation recursive-include docs * # recursive-include demo * diff --git a/Makefile b/Makefile index a3a8ac03065977cc5678e91f1f57fa0a9b21358f..f71bacf3ed75a315ba11ded88fda0b964a941b28 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ clean-pyc: find . -name '*~' -exec rm -f {} + lint: - flake8 steempyapi/ steempybase/ steempy/ + flake8 beemapi/ beembase/ beem/ test: python3 setup.py test diff --git a/README.rst b/README.rst index 253cbdb94e4e4e246877dd2a088605d8f2365141..bce7a7cea04778d11091db78b7d7c91b7e1f4969 100644 --- a/README.rst +++ b/README.rst @@ -1,24 +1,24 @@ -steempy - Unofficial Python 3 Library for Steem +beem - Unofficial Python 3 Library for Steem =============================================== !!!Alpha-State, be carefull!!! steemi is an unofficial python 3 library for steem, which is created new from scratch from https://github.com/xeroc/python-bitshares. -.. image:: https://travis-ci.org/holgern/steempy.svg?branch=master - :target: https://travis-ci.org/holgern/steempy +.. image:: https://travis-ci.org/holgern/beem.svg?branch=master + :target: https://travis-ci.org/holgern/beem .. image:: https://ci.appveyor.com/api/projects/status/lnk5385dv0c2j28l?svg=true - :target: https://ci.appveyor.com/project/holger80/steempy + :target: https://ci.appveyor.com/project/holger80/beem -.. image:: https://circleci.com/gh/holgern/steempy.svg?style=svg - :target: https://circleci.com/gh/holgern/steempy +.. image:: https://circleci.com/gh/holgern/beem.svg?style=svg + :target: https://circleci.com/gh/holgern/beem -.. image:: https://codecov.io/gh/holgern/steempy/branch/master/graph/badge.svg - :target: https://codecov.io/gh/holgern/steempy +.. image:: https://codecov.io/gh/holgern/beem/branch/master/graph/badge.svg + :target: https://codecov.io/gh/holgern/beem -.. image:: https://readthedocs.org/projects/steempy/badge/?version=latest - :target: http://steempy.readthedocs.org/en/latest/?badge=latest +.. image:: https://readthedocs.org/projects/beem/badge/?version=latest + :target: http://beem.readthedocs.org/en/latest/?badge=latest Installation ============ @@ -40,15 +40,15 @@ For OSX, please do the following:: export CFLAGS="-I$(brew --prefix openssl)/include $CFLAGS" export LDFLAGS="-L$(brew --prefix openssl)/lib $LDFLAGS" -Install steempy by pip:: +Install beem by pip:: - pip install -U steempy + pip install -U beem -You can install steempy from this repository if you want the latest +You can install beem from this repository if you want the latest but possibly non-compiling version:: - git clone https://github.com/holgern/steempy.git - cd steempy + git clone https://github.com/holgern/beem.git + cd beem python setup.py build python setup.py install --user @@ -59,7 +59,7 @@ Run tests after install:: Documentation ============= -Documentation is available at http://steempy.readthedocs.io/en/latest/ +Documentation is available at http://beem.readthedocs.io/en/latest/ Changelog ========= @@ -83,7 +83,7 @@ Changelog * Replaced all BitShares by Steem * Flake8 fixed * Unit tests are working -* renamed to steempy +* renamed to beem * Docs fixed * Signing fixed * pysteem: Account, Amount, Asset, Block, Blockchain, Instance, Memo, Message, Notify, Price, Steem, Transactionbuilder, Vote, Witness are working diff --git a/steempy/__init__.py b/beem/__init__.py similarity index 100% rename from steempy/__init__.py rename to beem/__init__.py diff --git a/steempy/account.py b/beem/account.py similarity index 97% rename from steempy/account.py rename to beem/account.py index 8001df1afa0bcc12b0ecd204f863dbf7d435b5cf..ef8241a0a81970ab19d18712364df4bdeb9ad673 100644 --- a/steempy/account.py +++ b/beem/account.py @@ -1,4 +1,4 @@ -from steempy.instance import shared_steem_instance +from beem.instance import shared_steem_instance from .exceptions import AccountDoesNotExistsException from .blockchainobject import BlockchainObject from .utils import formatTimeString @@ -18,7 +18,7 @@ class Account(BlockchainObject): etc. :returns: Account data :rtype: dictionary - :raises steempy.exceptions.AccountDoesNotExistsException: if account + :raises beem.exceptions.AccountDoesNotExistsException: if account does not exist Instances of this class are dictionaries that come with additional @@ -27,7 +27,7 @@ class Account(BlockchainObject): .. code-block:: python - from steempy.account import Account + from beem.account import Account account = Account("test") print(account) @@ -257,7 +257,7 @@ class Account(BlockchainObject): class AccountUpdate(dict): """ This purpose of this class is to keep track of account updates - as they are pushed through by :class:`steempy.notify.Notify`. + as they are pushed through by :class:`beem.notify.Notify`. Instances of this class are dictionaries and take the following form: diff --git a/steempy/aes.py b/beem/aes.py similarity index 100% rename from steempy/aes.py rename to beem/aes.py diff --git a/steempy/amount.py b/beem/amount.py similarity index 98% rename from steempy/amount.py rename to beem/amount.py index c370cc5932b1b97f06311f80dd5231f43544e2b6..43a227285cfb68057325925d90eb3eca2171ab5e 100644 --- a/steempy/amount.py +++ b/beem/amount.py @@ -1,4 +1,4 @@ -from steempy.instance import shared_steem_instance +from beem.instance import shared_steem_instance from .asset import Asset @@ -21,14 +21,14 @@ class Amount(dict): * ``args`` can be a dictionary containing ``amount`` and ``asset_id`` * ``args`` can be a dictionary containing ``amount`` and ``asset`` * ``args`` can be a list of a ``float`` and ``str`` (symbol) - * ``args`` can be a list of a ``float`` and a :class:`steempy.asset.Asset` + * ``args`` can be a list of a ``float`` and a :class:`beem.asset.Asset` * ``amount`` and ``asset`` are defined manually An instance is a dictionary and comes with the following keys: * ``amount`` (float) * ``symbol`` (str) - * ``asset`` (instance of :class:`steempy.asset.Asset`) + * ``asset`` (instance of :class:`beem.asset.Asset`) Instances of this class can be used in regular mathematical expressions (``+-*/%``) such as: diff --git a/steempy/asset.py b/beem/asset.py similarity index 94% rename from steempy/asset.py rename to beem/asset.py index 33b45f54a3b20e95a833e70231bb424a7d88ad87..b1f37ec515933fd30fc8de0c97b8283dea0e1ebb 100644 --- a/steempy/asset.py +++ b/beem/asset.py @@ -1,6 +1,6 @@ import json -from steempy.account import Account -from steempybase import operations +from beem.account import Account +from beembase import operations from .exceptions import AssetDoesNotExistsException from .blockchainobject import BlockchainObject @@ -12,7 +12,7 @@ class Asset(BlockchainObject): :param str Asset: Symbol name or object id of an asset :param bool lazy: Lazy loading :param bool full: Also obtain bitasset-data and dynamic asset dat - :param steempy.steem.Steem steem_instance: Steem + :param beem.steem.Steem steem_instance: Steem instance :returns: All data of an asset :rtype: dict diff --git a/steempy/block.py b/beem/block.py similarity index 92% rename from steempy/block.py rename to beem/block.py index 1b76eba0425116822843c67782446522d21ad60c..c1d873dc465026893be983079a8f67c442a5eecc 100644 --- a/steempy/block.py +++ b/beem/block.py @@ -7,7 +7,7 @@ class Block(BlockchainObject): """ Read a single block from the chain :param int block: block number - :param steempy.steem.Steem steem_instance: Steem + :param beem.steem.Steem steem_instance: Steem instance :param bool lazy: Use lazy loading @@ -17,7 +17,7 @@ class Block(BlockchainObject): .. code-block:: python - from steempy.block import Block + from beem.block import Block block = Block(1) print(block) @@ -51,8 +51,8 @@ class Block(BlockchainObject): def ops_statistics(self, add_to_ops_stat=None): if add_to_ops_stat is None: - import steempybase.operationids - ops_stat = steempybase.operationids.operations.copy() + import beembase.operationids + ops_stat = beembase.operationids.operations.copy() for key in ops_stat: ops_stat[key] = 0 else: diff --git a/steempy/blockchain.py b/beem/blockchain.py similarity index 97% rename from steempy/blockchain.py rename to beem/blockchain.py index e624a0894adff60c9971c84f71b1e3d9d1c7f2f2..fd73725b58af50e72e3a874cd27bc0f7376c6e81 100644 --- a/steempy/blockchain.py +++ b/beem/blockchain.py @@ -1,14 +1,14 @@ import time from .block import Block -from steempy.instance import shared_steem_instance -from steempybase.operationids import getOperationNameForId +from beem.instance import shared_steem_instance +from beembase.operationids import getOperationNameForId class Blockchain(object): """ This class allows to access the blockchain and read data from it - :param steempy.steem.Steem steem_instance: Steem + :param beem.steem.Steem steem_instance: Steem instance :param str mode: (default) Irreversible block (``irreversible``) or actual head block (``head``) @@ -201,8 +201,8 @@ class Blockchain(object): This call returns a dict with all possible operations and their occurence. """ if add_to_ops_stat is None: - import steempybase.operationids - ops_stat = steempybase.operationids.operations.copy() + import beembase.operationids + ops_stat = beembase.operationids.operations.copy() for key in ops_stat: ops_stat[key] = 0 else: diff --git a/steempy/blockchainobject.py b/beem/blockchainobject.py similarity index 98% rename from steempy/blockchainobject.py rename to beem/blockchainobject.py index 9b6df8252669033a55a116bbff0086ec446a2ae9..c5f432c5d9b228e335a691811e8eac2e55307b74 100644 --- a/steempy/blockchainobject.py +++ b/beem/blockchainobject.py @@ -1,4 +1,4 @@ -from steempy.instance import shared_steem_instance +from beem.instance import shared_steem_instance from datetime import datetime, timedelta import json diff --git a/steempy/comment.py b/beem/comment.py similarity index 100% rename from steempy/comment.py rename to beem/comment.py diff --git a/steempy/discussions.py b/beem/discussions.py similarity index 100% rename from steempy/discussions.py rename to beem/discussions.py diff --git a/steempy/exceptions.py b/beem/exceptions.py similarity index 100% rename from steempy/exceptions.py rename to beem/exceptions.py diff --git a/steempy/instance.py b/beem/instance.py similarity index 97% rename from steempy/instance.py rename to beem/instance.py index cc4eefb9f9e6d9ea6ee3ba2e527ed32cd0298d5b..b50b4fcdfd99e22fd6d28624cd3e7742ded94831 100644 --- a/steempy/instance.py +++ b/beem/instance.py @@ -1,4 +1,4 @@ -import steempy as stm +import beem as stm class SharedInstance(): diff --git a/steempy/market.py b/beem/market.py similarity index 99% rename from steempy/market.py rename to beem/market.py index c2f973e726c4bda9c96ac179367778d221c9f4b1..7b2b82cedc2f52ec23efade5d31be60e708672d2 100644 --- a/steempy/market.py +++ b/beem/market.py @@ -1,4 +1,4 @@ -from steempy.instance import shared_steem_instance +from beem.instance import shared_steem_instance from datetime import datetime, timedelta from .utils import ( formatTimeFromNow, formatTime, formatTimeString, assets_from_string) @@ -6,7 +6,7 @@ from .asset import Asset from .amount import Amount from .price import Price, Order, FilledOrder from .account import Account -from steempybase import operations +from beembase import operations class Market(dict): diff --git a/steempy/memo.py b/beem/memo.py similarity index 89% rename from steempy/memo.py rename to beem/memo.py index c3d81831c6aff046975b55e1b3edb7d5c27f558d..58523903e80f8b596aba4aed4032c90b2ed1bfca 100644 --- a/steempy/memo.py +++ b/beem/memo.py @@ -1,7 +1,7 @@ -from steempy.instance import shared_steem_instance +from beem.instance import shared_steem_instance import random -from steempybase import memo as BtsMemo -from steempybase.account import PrivateKey, PublicKey +from beembase import memo as BtsMemo +from beembase.account import PrivateKey, PublicKey from .account import Account from .exceptions import MissingKeyError, KeyNotFound @@ -9,9 +9,9 @@ from .exceptions import MissingKeyError, KeyNotFound class Memo(object): """ Deals with Memos that are attached to a transfer - :param steempy.account.Account from_account: Account that has sent the memo - :param steempy.account.Account to_account: Account that has received the memo - :param steempy.steem.Steem steem_instance: Steem instance + :param beem.account.Account from_account: Account that has sent the memo + :param beem.account.Account to_account: Account that has received the memo + :param beem.steem.Steem steem_instance: Steem instance A memo is encrypted with a shared secret derived from a private key of the sender and a public key of the receiver. Due to the underlying @@ -21,7 +21,7 @@ class Memo(object): .. code-block:: python - from steempy.memo import Memo + from beem.memo import Memo m = Memo("steemeu", "wallet.xeroc") m.steem.wallet.unlock("secret") enc = (m.encrypt("foobar")) @@ -34,7 +34,7 @@ class Memo(object): .. code-block:: python - from steempy.memo import Memo + from beem.memo import Memo m = Memo() m.steem.wallet.unlock("secret") print(memo.decrypt(op_data["memo"])) diff --git a/steempy/message.py b/beem/message.py similarity index 96% rename from steempy/message.py rename to beem/message.py index 9256167d971c3b7e2aa827b5988a6bbdd411a1d4..c3c43376f4b7dbf373c381c37d038e6ad91faea6 100644 --- a/steempy/message.py +++ b/beem/message.py @@ -2,9 +2,9 @@ import re import logging from binascii import hexlify, unhexlify from graphenebase.ecdsa import verify_message, sign_message -from steempybase.account import PublicKey -from steempy.instance import shared_steem_instance -from steempy.account import Account +from beembase.account import PublicKey +from beem.instance import shared_steem_instance +from beem.account import Account from .exceptions import InvalidMessageSignature from .storage import configStorage as config diff --git a/steempy/notify.py b/beem/notify.py similarity index 82% rename from steempy/notify.py rename to beem/notify.py index 523d0b2e241500e63a180cb94ad097e074ef9f8f..60823177ae85ae49f526bba53f902c916c440ceb 100644 --- a/steempy/notify.py +++ b/beem/notify.py @@ -1,10 +1,10 @@ import logging from events import Events -from steempyapi.websocket import SteemWebsocket -from steempy.instance import shared_steem_instance -from steempy.blockchain import Blockchain -from steempy.price import Order, FilledOrder, UpdateCallOrder -from steempy.account import AccountUpdate +from beemapi.websocket import SteemWebsocket +from beem.instance import shared_steem_instance +from beem.blockchain import Blockchain +from beem.price import Order, FilledOrder, UpdateCallOrder +from beem.account import AccountUpdate log = logging.getLogger(__name__) # logging.basicConfig(level=logging.DEBUG) @@ -16,14 +16,14 @@ class Notify(Events): :param fnt on_tx: Callback that will be called for each transaction received :param fnt on_block: Callback that will be called for each block received :param fnt on_account: Callback that will be called for changes of the listed accounts - :param steempy.steem.Steem steem_instance: Steem instance + :param beem.steem.Steem steem_instance: Steem instance **Example** .. code-block:: python from pprint import pprint - from steempy.notify import Notify + from beem.notify import Notify notify = Notify( accounts=["test"], @@ -67,7 +67,7 @@ class Notify(Events): def process_account(self, message): """ This is used for processing of account Updates. It will - return instances of :class:steempy.account.AccountUpdate` + return instances of :class:beem.account.AccountUpdate` """ self.on_account(AccountUpdate( message, diff --git a/steempy/price.py b/beem/price.py similarity index 97% rename from steempy/price.py rename to beem/price.py index bddd22ccd34eb5a85d3f0ad57f48281637945f41..1dac290f6b7c03598ba97fc3933e1035207b092a 100644 --- a/steempy/price.py +++ b/beem/price.py @@ -1,5 +1,5 @@ from fractions import Fraction -from steempy.instance import shared_steem_instance +from beem.instance import shared_steem_instance from .exceptions import InvalidAssetException from .account import Account from .amount import Amount @@ -14,7 +14,7 @@ class Price(dict): (quote, base) - each being an instance of :class:`steempy.amount.Amount`. The + each being an instance of :class:`beem.amount.Amount`. The amount themselves define the price. .. note:: @@ -22,23 +22,23 @@ class Price(dict): The price (floating) is derived as ``base/quote`` :param list args: Allows to deal with different representations of a price - :param steempy.asset.Asset base: Base asset - :param steempy.asset.Asset quote: Quote asset - :param steempy.steem.Steem steem_instance: Steem instance + :param beem.asset.Asset base: Base asset + :param beem.asset.Asset quote: Quote asset + :param beem.steem.Steem steem_instance: Steem instance :returns: All data required to represent a price :rtype: dict Way to obtain a proper instance: * ``args`` is a str with a price and two assets - * ``args`` can be a floating number and ``base`` and ``quote`` being instances of :class:`steempy.asset.Asset` + * ``args`` can be a floating number and ``base`` and ``quote`` being instances of :class:`beem.asset.Asset` * ``args`` can be a floating number and ``base`` and ``quote`` being instances of ``str`` * ``args`` can be dict with keys ``price``, ``base``, and ``quote`` (*graphene balances*) * ``args`` can be dict with keys ``base`` and ``quote`` * ``args`` can be dict with key ``receives`` (filled orders) - * ``args`` being a list of ``[quote, base]`` both being instances of :class:`steempy.amount.Amount` + * ``args`` being a list of ``[quote, base]`` both being instances of :class:`beem.amount.Amount` * ``args`` being a list of ``[quote, base]`` both being instances of ``str`` (``amount symbol``) - * ``base`` and ``quote`` being instances of :class:`steempy.asset.Amount` + * ``base`` and ``quote`` being instances of :class:`beem.asset.Amount` This allows instanciations like: @@ -56,7 +56,7 @@ class Price(dict): .. code-block:: python - >>> from steempy.price import Price + >>> from beem.price import Price >>> Price("0.3314 SBD/STEEM") * 2 0.662600000 SBD/STEEM diff --git a/steempy/steem.py b/beem/steem.py similarity index 97% rename from steempy/steem.py rename to beem/steem.py index a74438605fbb4196ed8b3db6adcec409c60ce134..c5c6ea030ec75f467ec85339b38114516db5d827 100644 --- a/steempy/steem.py +++ b/beem/steem.py @@ -2,10 +2,10 @@ import json import logging from datetime import datetime, timedelta -from steempyapi.steemnoderpc import SteemNodeRPC -from steempyapi.exceptions import NoAccessApi -from steempybase.account import PrivateKey, PublicKey -from steempybase import transactions, operations +from beemapi.steemnoderpc import SteemNodeRPC +from beemapi.exceptions import NoAccessApi +from beembase.account import PrivateKey, PublicKey +from beembase import transactions, operations from .asset import Asset from .account import Account from .amount import Amount @@ -83,7 +83,7 @@ class Steem(object): .. code-block:: python - from steempy import Steem + from beem import Steem steem = Steem() print(steem.info()) @@ -179,7 +179,7 @@ class Steem(object): @property def chain_params(self): if self.offline: - from steempybase.chains import known_chains + from beembase.chains import known_chains return known_chains["STEEM"] else: return self.rpc.chain_params @@ -221,8 +221,8 @@ class Steem(object): posting permission. Neither can you use different accounts for different operations! - ... note:: This uses ``steempy.txbuffer`` as instance of - :class:`steempy.transactionbuilder.TransactionBuilder`. + ... note:: This uses ``beem.txbuffer`` as instance of + :class:`beem.transactionbuilder.TransactionBuilder`. You may want to use your own txbuffer """ if "append_to" in kwargs and kwargs["append_to"]: @@ -295,10 +295,10 @@ class Steem(object): # ------------------------------------------------------------------------- def newWallet(self, pwd): """ Create a new wallet. This method is basically only calls - :func:`steempy.wallet.create`. + :func:`beem.wallet.create`. :param str pwd: Password to use for the new wallet - :raises steempy.exceptions.WalletExists: if there is already a + :raises beem.exceptions.WalletExists: if there is already a wallet created """ return self.wallet.create(pwd) @@ -404,7 +404,7 @@ class Steem(object): """ Create new account on Steem The brainkey/password can be used to recover all generated keys - (see `steempybase.account` for more details. + (see `beembase.account` for more details. By default, this call will use ``default_account`` to register a new name ``account_name`` with all keys being @@ -465,7 +465,7 @@ class Steem(object): # creator = Account(creator, steem_instance=self) " Generate new keys from password" - from steempybase.account import PasswordKey, PublicKey + from beembase.account import PasswordKey, PublicKey if password: active_key = PasswordKey(account_name, password, role="active") owner_key = PasswordKey(account_name, password, role="owner") diff --git a/steempy/storage.py b/beem/storage.py similarity index 99% rename from steempy/storage.py rename to beem/storage.py index 730a1281ae28aa487ef2111763ed9cd856dafb38..3686a229f030c257041d4475a17b90c7354a4eae 100644 --- a/steempy/storage.py +++ b/beem/storage.py @@ -37,9 +37,9 @@ class DataDir(object): Furthermore, it offers an interface to generated backups in the `backups/` directory every now and then. """ - appname = "steempy" - appauthor = "steempy" - storageDatabase = "steempy.sqlite" + appname = "beem" + appauthor = "beem" + storageDatabase = "beem.sqlite" data_dir = user_data_dir(appname, appauthor) sqlDataBaseFile = os.path.join(data_dir, storageDatabase) diff --git a/steempy/transactionbuilder.py b/beem/transactionbuilder.py similarity index 97% rename from steempy/transactionbuilder.py rename to beem/transactionbuilder.py index d7505ade4edef562c8ccf66e4148a17b1a31cadd..7a8e1e1484f12cda37f867977dfc509ff418d2e6 100644 --- a/steempy/transactionbuilder.py +++ b/beem/transactionbuilder.py @@ -1,15 +1,15 @@ from .account import Account -from steempybase.objects import Operation -from steempybase.account import PrivateKey, PublicKey -from steempybase.signedtransactions import Signed_Transaction -from steempybase import transactions, operations +from beembase.objects import Operation +from beembase.account import PrivateKey, PublicKey +from beembase.signedtransactions import Signed_Transaction +from beembase import transactions, operations from .exceptions import ( InsufficientAuthorityError, MissingKeyError, InvalidWifError, WalletLocked ) -from steempy.instance import shared_steem_instance +from beem.instance import shared_steem_instance import logging log = logging.getLogger(__name__) diff --git a/steempy/utils.py b/beem/utils.py similarity index 100% rename from steempy/utils.py rename to beem/utils.py diff --git a/steempy/vote.py b/beem/vote.py similarity index 100% rename from steempy/vote.py rename to beem/vote.py diff --git a/steempy/wallet.py b/beem/wallet.py similarity index 100% rename from steempy/wallet.py rename to beem/wallet.py diff --git a/steempy/witness.py b/beem/witness.py similarity index 100% rename from steempy/witness.py rename to beem/witness.py diff --git a/steempyapi/__init__.py b/beemapi/__init__.py similarity index 100% rename from steempyapi/__init__.py rename to beemapi/__init__.py diff --git a/steempyapi/exceptions.py b/beemapi/exceptions.py similarity index 100% rename from steempyapi/exceptions.py rename to beemapi/exceptions.py diff --git a/steempyapi/steemnoderpc.py b/beemapi/steemnoderpc.py similarity index 98% rename from steempyapi/steemnoderpc.py rename to beemapi/steemnoderpc.py index 79bc81a6d2524b44859962ee0e6d6990721952b2..3da3a00b268713741bc5545dfc877ab2f32390d2 100644 --- a/steempyapi/steemnoderpc.py +++ b/beemapi/steemnoderpc.py @@ -7,7 +7,7 @@ import json import time from itertools import cycle from grapheneapi.graphenewsrpc import GrapheneWebsocketRPC -from steempybase.chains import known_chains +from beembase.chains import known_chains from . import exceptions import logging log = logging.getLogger(__name__) diff --git a/steempyapi/websocket.py b/beemapi/websocket.py similarity index 100% rename from steempyapi/websocket.py rename to beemapi/websocket.py diff --git a/steempybase/__init__.py b/beembase/__init__.py similarity index 100% rename from steempybase/__init__.py rename to beembase/__init__.py diff --git a/steempybase/account.py b/beembase/account.py similarity index 100% rename from steempybase/account.py rename to beembase/account.py diff --git a/steempybase/bip38.py b/beembase/bip38.py similarity index 100% rename from steempybase/bip38.py rename to beembase/bip38.py diff --git a/steempybase/chains.py b/beembase/chains.py similarity index 100% rename from steempybase/chains.py rename to beembase/chains.py diff --git a/steempybase/memo.py b/beembase/memo.py similarity index 100% rename from steempybase/memo.py rename to beembase/memo.py diff --git a/steempybase/objects.py b/beembase/objects.py similarity index 99% rename from steempybase/objects.py rename to beembase/objects.py index 10238b627285cb3da5563945a8fddf87261cfe99..2f5257065ab8635ea20fb5f9a84ec56330d2adbd 100644 --- a/steempybase/objects.py +++ b/beembase/objects.py @@ -81,7 +81,7 @@ class Operation(GPHOperation): super(Operation, self).__init__(*args, **kwargs) def _getklass(self, name): - module = __import__("steempybase.operations", fromlist=["operations"]) + module = __import__("beembase.operations", fromlist=["operations"]) class_ = getattr(module, name) return class_ diff --git a/steempybase/objecttypes.py b/beembase/objecttypes.py similarity index 100% rename from steempybase/objecttypes.py rename to beembase/objecttypes.py diff --git a/steempybase/operationids.py b/beembase/operationids.py similarity index 100% rename from steempybase/operationids.py rename to beembase/operationids.py diff --git a/steempybase/operations.py b/beembase/operations.py similarity index 100% rename from steempybase/operations.py rename to beembase/operations.py diff --git a/steempybase/signedtransactions.py b/beembase/signedtransactions.py similarity index 100% rename from steempybase/signedtransactions.py rename to beembase/signedtransactions.py diff --git a/steempybase/transactions.py b/beembase/transactions.py similarity index 100% rename from steempybase/transactions.py rename to beembase/transactions.py diff --git a/docs/account.rst b/docs/account.rst index 20826dbe55d737c1f5efcc48a5e7b25e7eda0726..aa7c9cd566e01be3509ebe1240c4499facdbda88 100644 --- a/docs/account.rst +++ b/docs/account.rst @@ -5,13 +5,13 @@ Obtaining data of an account. .. code-block:: python - from steempy.account import Account + from beem.account import Account account = Account("test") print(account) print(account.balances) -.. autoclass:: steempy.account.Account +.. autoclass:: beem.account.Account :members: -.. autoclass:: steempy.account.AccountUpdate +.. autoclass:: beem.account.AccountUpdate :members: diff --git a/docs/amount.rst b/docs/amount.rst index 2412943dff41399620607f30378bfc692149b0b8..a982990a0dbdd9d8145505c19b839b8c4e84766a 100644 --- a/docs/amount.rst +++ b/docs/amount.rst @@ -5,8 +5,8 @@ For the sake of easier handling of Assets on the blockchain .. code-block:: python - from steempy.amount import Amount - from steempy.asset import Asset + from beem.amount import Amount + from beem.asset import Asset a = Amount("1 USD") b = Amount(1, "USD") c = Amount("20", Asset("USD")) @@ -15,5 +15,5 @@ For the sake of easier handling of Assets on the blockchain a += b a /= 2.0 -.. autoclass:: steempy.amount.Amount +.. autoclass:: beem.amount.Amount :members: diff --git a/docs/asset.rst b/docs/asset.rst index f4b2888020815b4a3d6783c2c9213d599de06d8a..b9e1b0d4e0a2956f66d318b52f1f965321274e3e 100644 --- a/docs/asset.rst +++ b/docs/asset.rst @@ -1,5 +1,5 @@ Asset ~~~~~~ -.. autoclass:: steempy.asset.Asset +.. autoclass:: beem.asset.Asset :members: diff --git a/docs/block.rst b/docs/block.rst index 1819eadb581a91aab82ceb32a6e61ae2c8bfa018..ccc63c9bf05d181ee1454f5c9a52264bf118fb1e 100644 --- a/docs/block.rst +++ b/docs/block.rst @@ -5,9 +5,9 @@ Easily read data in a Block .. code-block:: python - from steempy.block import Block + from beem.block import Block from pprint import pprint pprint(Block(1)) -.. autoclass:: steempy.block.Block +.. autoclass:: beem.block.Block :members: diff --git a/docs/blockchain.rst b/docs/blockchain.rst index 56f986bf41cfd74c02d1a3edbcd4101a32eb80c0..4ee750518e6fe732138414a8c37c1631718cdc1a 100644 --- a/docs/blockchain.rst +++ b/docs/blockchain.rst @@ -5,7 +5,7 @@ Read blockchain related data- .. code-block:: python - from steempy.blockchain import Blockchain + from beem.blockchain import Blockchain chain = Blockchain() Read current block and blockchain info @@ -29,5 +29,5 @@ Monitor for new blocks .. for operations in chain.ops(): print(operations) -.. autoclass:: steempy.blockchain.Blockchain +.. autoclass:: beem.blockchain.Blockchain :members: diff --git a/docs/comment.rst b/docs/comment.rst index c68ec25312a14e3d6342a835f34b36b4c5957aed..c320d9a145d49cadd3f155c5af627f55a00136bf 100644 --- a/docs/comment.rst +++ b/docs/comment.rst @@ -5,13 +5,13 @@ Read data about a Comment/Post .. code-block:: python - from steempy.comment import Comment + from beem.comment import Comment Witness("gtg") -.. autoclass:: steempy.comment.Comment +.. autoclass:: beem.comment.Comment :members: -.. autoclass:: steempy.comment.Comments +.. autoclass:: beem.comment.Comments :members: diff --git a/docs/conf.py b/docs/conf.py index cf0d95bcb5a8cd1c6d61d30b2973b0304d59624d..d185a8399afb286928b55a1481616fc39333ceb4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# steempy documentation build configuration file, created by +# beem documentation build configuration file, created by # sphinx-quickstart on Fri Jun 5 14:06:38 2015. # # This file is execfile()d with the current directory set to its @@ -48,7 +48,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = 'steempy' +project = 'beem' copyright = '2017, ChainSquad GmbH, 2018, Holger Nahrstaedt' author = 'Holger Nahrstaedt' @@ -202,7 +202,7 @@ html_static_path = ['_static'] #html_search_scorer = 'scorer.js' # Output file base name for HTML help builder. -htmlhelp_basename = 'steempydoc' +htmlhelp_basename = 'beemdoc' # -- Options for LaTeX output --------------------------------------------- @@ -224,7 +224,7 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'steempy.tex', 'steempy Documentation', + (master_doc, 'beem.tex', 'beem Documentation', author, 'manual'), ] @@ -254,7 +254,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'steempy', 'steempy Documentation', + (master_doc, 'beem', 'beem Documentation', [author], 1) ] @@ -268,8 +268,8 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'steempy', 'steempy Documentation', - author, 'steempy', 'One line description of project.', + (master_doc, 'beem', 'beem Documentation', + author, 'beem', 'One line description of project.', 'Miscellaneous'), ] diff --git a/docs/configuration.rst b/docs/configuration.rst index ea9e1240290c4a9c55d0fbf7ccbb8510041c8359..db9d6b8a15b85924f292d4e19f6ece575dde2acd 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -15,7 +15,7 @@ You can access those variables like a regular dictionary by using .. code-block:: python - from steempy import Steem + from beem import Steem steem = Steem() print(steem.config.items()) @@ -26,9 +26,9 @@ can load the configuration directly by using: .. code-block:: python - from steempy.storage import configStorage as config + from beem.storage import configStorage as config API --- -.. autoclass:: steempy.storage.Configuration +.. autoclass:: beem.storage.Configuration :members: diff --git a/docs/contribute.rst b/docs/contribute.rst index db73514416f9822396eae79d7d3392a8ccd50370..6342ee31583ac45db801cb2e77eff45c78a8bbcc 100644 --- a/docs/contribute.rst +++ b/docs/contribute.rst @@ -8,7 +8,7 @@ Repository The *main* repository of python-steem is currently located at: - https://github.com/holgern/steempy + https://github.com/holgern/beem Flow ---- diff --git a/docs/exceptions.rst b/docs/exceptions.rst index 67d0496ab6793de4315ce70d27e09c35e7c4039c..36b2e1f53f6a7a9e94f2bb4e5096761b5281be38 100644 --- a/docs/exceptions.rst +++ b/docs/exceptions.rst @@ -1,8 +1,8 @@ Exceptions ~~~~~~~~~~ -.. autoclass:: steempy.exceptions +.. autoclass:: beem.exceptions :members: -.. autoclass:: steempyapi.exceptions +.. autoclass:: beemapi.exceptions :members: diff --git a/docs/index.rst b/docs/index.rst index c358cba8e460e1862a2d5901eb16cd3a2cac6d86..83f62cfe3c1dc0bfd8cd02bd1a40c39496caa1e7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,7 +9,7 @@ http://openalea.gforge.inria.fr/doc/openalea/doc/_build/html/source/sphinx/rest_syntax.html http://rest-sphinx-memo.readthedocs.org/en/latest/ReST.html -Welcome to steempy's documentation! +Welcome to beem's documentation! =============================================== Steem is a blockchain-based rewards platform for publishers to monetize @@ -23,7 +23,7 @@ content. About this Library ------------------ -The purpose of *steempy* is to simplify development of products and +The purpose of *beem* is to simplify development of products and services that use the Steem blockchain. It comes with * it's own (bip32-encrypted) wallet @@ -51,26 +51,26 @@ Quickstart .. code-block:: python - from steempy import Steem + from beem import Steem steem = Steem() steem.wallet.unlock("wallet-passphrase") steem.transfer("<to>", "<amount>", "<asset>", "<memo>", account="<from>") .. code-block:: python - from steempy.blockchain import Blockchain + from beem.blockchain import Blockchain blockchain = Blockchain() for op in Blockchain.ops(): print(op) .. code-block:: python - from steempy.block import Block + from beem.block import Block print(Block(1)) .. code-block:: python - from steempy.account import Account + from beem.account import Account account = Account("test") print(account.balances) for h in account.history(): @@ -78,7 +78,7 @@ Quickstart .. code-block:: python - from steempy.market import Market + from beem.market import Market # Not working at the moment # market = Market("STEEM:SBD") # print(market.ticker()) @@ -87,7 +87,7 @@ Quickstart .. code-block:: python - from steempy.dex import Dex + from beem.dex import Dex # not working at the moment # dex = Dex() # dex.steem.wallet.unlock("wallet-passphrase") @@ -105,7 +105,7 @@ General contribute support -steempy Libraries +beem Libraries -------------------------- .. toctree:: diff --git a/docs/installation.rst b/docs/installation.rst index 833b109ffbee89a79fa088f388df4db33d5cd5af..dae3b2e4ad601c92f2ac77595c2d8c31c4ffabd6 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -10,20 +10,20 @@ Install with `pip3`: :: $ sudo apt-get install libffi-dev libssl-dev python-dev - $ pip3 install steempy + $ pip3 install beem or the with `pip`: :: - $ pip install -U steempy + $ pip install -U beem Manual installation: :: - $ git clone https://github.com/holgern/steempy/ - $ cd steempy + $ git clone https://github.com/holgern/beem/ + $ cd beem $ python setup.py build $ python setup.py install --user diff --git a/docs/instances.rst b/docs/instances.rst index 9b0ef55a7ae69057b091e22ab0efe9a05e88cf1b..571bd5fad8b2cdc3e298658d0d8a57ae62028415 100644 --- a/docs/instances.rst +++ b/docs/instances.rst @@ -6,11 +6,11 @@ the Objects! .. code-block:: python - from steempy.instance import shared_steem_instance + from beem.instance import shared_steem_instance account = Account("test") # is equivalent with account = Account("test", steem_instance=shared_steem_instance()) -.. automethod:: steempy.instance.shared_steem_instance -.. automethod:: steempy.instance.set_shared_steem_instance +.. automethod:: beem.instance.shared_steem_instance +.. automethod:: beem.instance.set_shared_steem_instance diff --git a/docs/market.rst b/docs/market.rst index 722fe7b5898cf0645799212745e8c4ec04488e91..3a0ec86bf0b3bd1d50c9250d16b485f51f73e98f 100644 --- a/docs/market.rst +++ b/docs/market.rst @@ -1,5 +1,5 @@ Market ~~~~~~~ -.. autoclass:: steempy.market.Market +.. autoclass:: beem.market.Market :members: diff --git a/docs/memo.rst b/docs/memo.rst index d39e1f055b839b16350483e4f41c711a635c0694..6a287ce6e15a704fc0ef8ad2195643fda9755b79 100644 --- a/docs/memo.rst +++ b/docs/memo.rst @@ -58,8 +58,8 @@ for the corresponding accounts. .. code-block:: python - from steempy.memo import Memo - from steempy.account import Account + from beem.memo import Memo + from beem.account import Account memoObj = Memo( from_account=Account(from_account), @@ -73,8 +73,8 @@ Decoding of a received memo .. code-block:: python from getpass import getpass - from steempy.block import Block - from steempy.memo import Memo + from beem.block import Block + from beem.memo import Memo # Obtain a transfer from the blockchain block = Block(23755086) # block @@ -96,5 +96,5 @@ Decoding of a received memo API ### -.. automodule:: steempybase.memo +.. automodule:: beembase.memo :members: diff --git a/docs/notify.rst b/docs/notify.rst index f760195947f371df920de63bc5bfac3039efab21..cc6945c9864b91dc3499a73a884700f6baea0fc7 100644 --- a/docs/notify.rst +++ b/docs/notify.rst @@ -4,5 +4,5 @@ Notify This modules allows yout to be notified of events taking place on the blockchain. -.. autoclass:: steempy.notify.Notify +.. autoclass:: beem.notify.Notify :members: diff --git a/docs/price.rst b/docs/price.rst index baafefd004fc1da9edc1d3133a4294bb30eeae2a..b10a1b59d9b9de292f82b8aa4a48457cad3849cb 100644 --- a/docs/price.rst +++ b/docs/price.rst @@ -1,5 +1,5 @@ Price ~~~~~~ -.. autoclass:: steempy.price.Price +.. autoclass:: beem.price.Price :members: diff --git a/docs/steem.rst b/docs/steem.rst index b7e8cf603bc6aabb9a530132a38a3bf97078de57..7db40e7cfed9ee704a3590cb5dd7076db2285efe 100644 --- a/docs/steem.rst +++ b/docs/steem.rst @@ -7,5 +7,5 @@ the related blockchain technology and cryptography. This library can be used to do anything that is allowed according to the Steem blockchain protocol. -.. autoclass:: steempy.steem.Steem +.. autoclass:: beem.steem.Steem :members: diff --git a/docs/transactionbuilder.rst b/docs/transactionbuilder.rst index 146e34f978d16a2d628a677a286d116d3b1b1999..4f20f4273735b5f6f9beea38af550b78501a209e 100644 --- a/docs/transactionbuilder.rst +++ b/docs/transactionbuilder.rst @@ -5,8 +5,8 @@ To build your own transactions and sign them .. code-block:: python - from steempy.transactionbuilder import TransactionBuilder - from steempybase.operations import Transfer + from beem.transactionbuilder import TransactionBuilder + from beembase.operations import Transfer tx = TransactionBuilder() tx.appendOps(Transfer(**{ "from": "test", @@ -18,5 +18,5 @@ To build your own transactions and sign them tx.sign() tx.broadcast() -.. autoclass:: steempy.transactionbuilder.TransactionBuilder +.. autoclass:: beem.transactionbuilder.TransactionBuilder :members: diff --git a/docs/transactions.rst b/docs/transactions.rst index a124e7c941f6890bacf60d310b3ebb20c341e97a..f838aa8539a7d82acd1c71767dad7bca08a3966e 100644 --- a/docs/transactions.rst +++ b/docs/transactions.rst @@ -16,7 +16,7 @@ We load the class for manual transaction construction via: .. code-block:: python - from steempybase import transactions, operations + from beembase import transactions, operations Construction ############ diff --git a/docs/tutorials.rst b/docs/tutorials.rst index 3559569db93eea5365666000834461300eecc865..db41326f855192f10e694b5d300073ffc40b8710 100644 --- a/docs/tutorials.rst +++ b/docs/tutorials.rst @@ -14,7 +14,7 @@ executed in the same order as they are added to the transaction. .. code-block:: python from pprint import pprint - from steempy import Steem + from beem import Steem testnet = Steem( "wss://testnet.steem.vc", @@ -43,7 +43,7 @@ attribute: .. code-block:: python from pprint import pprint - from steempy import Steem + from beem import Steem testnet = Steem( "wss://testnet.steem.vc", @@ -57,10 +57,10 @@ Simple Sell Script .. code-block:: python - from steempy import Steem - from steempy.market import Market - from steempy.price import Price - from steempy.amount import Amount + from beem import Steem + from beem.market import Market + from beem.price import Price + from beem.amount import Amount # # Instanciate Steem (pick network via API node) @@ -100,10 +100,10 @@ Sell at a timely rate .. code-block:: python import threading - from steempy import Steem - from steempy.market import Market - from steempy.price import Price - from steempy.amount import Amount + from beem import Steem + from beem.market import Market + from beem.price import Price + from beem.amount import Amount def sell(): diff --git a/docs/utils.rst b/docs/utils.rst index 190a5d331968b515677722979e61b8794d0bbe3d..f29628449aa26e9b4e04b3218441cb84b1f9f3c2 100644 --- a/docs/utils.rst +++ b/docs/utils.rst @@ -1,5 +1,5 @@ Utilities ~~~~~~~~~~~~~~~~~~~ -.. autoclass:: steempy.utils +.. autoclass:: beem.utils :members: diff --git a/docs/vote.rst b/docs/vote.rst index 08e508755c7ee67bd8bf7cd759b7992cee8f98a4..e1fbf2f0a103c205301703809a6c74127a92b962 100644 --- a/docs/vote.rst +++ b/docs/vote.rst @@ -5,10 +5,10 @@ Read data about a vote .. code-block:: python - from steempy.vote import Vote + from beem.vote import Vote Witness("gtg") -.. autoclass:: steempy.vote.Vote +.. autoclass:: beem.vote.Vote :members: diff --git a/docs/wallet.rst b/docs/wallet.rst index 208a7ff80fa243f020cba1c57aeaf86485b81173..f6092fae68a052fe02ea6a38fabdb77d960e63c8 100644 --- a/docs/wallet.rst +++ b/docs/wallet.rst @@ -8,7 +8,7 @@ A new wallet can be created by using: .. code-block:: python - from steempy import Steem + from beem import Steem steem = Steem() steem.wallet.create("supersecret-passphrase") @@ -21,7 +21,7 @@ The wallet can be unlocked for signing using .. code-block:: python - from steempy import Steem + from beem import Steem steem = Steem() steem.wallet.unlock("supersecret-passphrase") @@ -34,7 +34,7 @@ A private key can be added by using the .. code-block:: python - from steempy import Steem + from beem import Steem steem = Steem() steem.wallet.unlock("supersecret-passphrase") steem.wallet.addPrivateKey("5xxxxxxxxxxxxxxxxxxxx") @@ -45,5 +45,5 @@ A private key can be added by using the API --- -.. autoclass:: steempy.wallet.Wallet +.. autoclass:: beem.wallet.Wallet :members: diff --git a/docs/websocket.rst b/docs/websocket.rst index 5d44fc67be3afcc228a086ae0d89bb3984cf9f00..f13e69aff3930d663cdc3c471ad6f4aec052eda4 100644 --- a/docs/websocket.rst +++ b/docs/websocket.rst @@ -8,21 +8,19 @@ node. .. code-block:: python from pprint import pprint - from steempyapi.websocket import SteemWebsocket + from beemapi.websocket import SteemWebsocket ws = SteemWebsocket( "wss://gtg.steem.house:8090", accounts=["test"], - # on_market=pprint, - # on_block=print, - on_account=print, + on_block=print, ) ws.run_forever() Defintion ========= -.. autoclass:: steempyapi.websocket.SteemWebsocket +.. autoclass:: beemapi.websocket.SteemWebsocket :members: :undoc-members: :private-members: diff --git a/docs/websocketrpc.rst b/docs/websocketrpc.rst index af242b111b4ec1187c715ec6ff4c88d66bc66012..ce6b0aa1987d37e6097f4bf93079295015cee11b 100644 --- a/docs/websocketrpc.rst +++ b/docs/websocketrpc.rst @@ -7,5 +7,5 @@ websockets. Defintion ========= -.. autoclass:: steempyapi.steemnoderpc.SteemNodeRPC +.. autoclass:: beemapi.steemnoderpc.SteemNodeRPC :members: rpcexec, __getattr__ diff --git a/docs/witness.rst b/docs/witness.rst index f32607765c5cf9257870e5baa2a0e66a7bd53fcc..554585021a72b1602b7f26fc984bfcc8ffaf557d 100644 --- a/docs/witness.rst +++ b/docs/witness.rst @@ -5,24 +5,24 @@ Read data about a witness .. code-block:: python - from steempy.witness import Witness + from beem.witness import Witness Witness("gtg") -.. autoclass:: steempy.witness.Witness +.. autoclass:: beem.witness.Witness :members: -.. autoclass:: steempy.witness.Witnesses +.. autoclass:: beem.witness.Witnesses :members: -.. autoclass:: steempy.witness.WitnessesVotedByAccount +.. autoclass:: beem.witness.WitnessesVotedByAccount :members: -.. autoclass:: steempy.witness.WitnessesRankedByVote +.. autoclass:: beem.witness.WitnessesRankedByVote :members: -.. autoclass:: steempy.witness.WitnessesByIds +.. autoclass:: beem.witness.WitnessesByIds :members: -.. autoclass:: steempy.witness.LookupWitnesses +.. autoclass:: beem.witness.LookupWitnesses :members: diff --git a/setup.py b/setup.py index d51e992bbe1c4b2ea696cef8e5b127060f201b27..7607fd4a14a370576a80bde016e09b1161b8e8da 100755 --- a/setup.py +++ b/setup.py @@ -29,26 +29,26 @@ version = '%(version)s' if __name__ == '__main__': # Rewrite the version file everytime - write_version_py('steempy/version.py') - write_version_py('steempybase/version.py') - write_version_py('steempyapi/version.py') + write_version_py('beem/version.py') + write_version_py('beembase/version.py') + write_version_py('beemapi/version.py') setup( - name='steempy', + name='beem', version=VERSION, description='Unofficial Python library for STEEM', long_description=open('README.rst').read(), - download_url='https://github.com/holgern/steempy/tarball/' + VERSION, + download_url='https://github.com/holgern/beem/tarball/' + VERSION, author='Holger Nahrstaedt', author_email='holger@nahrstaedt.de', maintainer='Holger Nahrstaedt', maintainer_email='holger@nahrstaedt.de', - url='http://www.github.com/holgern/steempy', + url='http://www.github.com/holgern/beem', keywords=['steem', 'library', 'api', 'rpc'], packages=[ - "steempy", - "steempyapi", - "steempybase" + "beem", + "beemapi", + "beembase" ], classifiers=[ 'License :: OSI Approved :: MIT License', diff --git a/tests/test_account.py b/tests/test_account.py index 71b9397be43b67f3afb4044f86d9dc08ed1fb335..34eead4435de2b4c606ae961b6046ecb4856e8cb 100644 --- a/tests/test_account.py +++ b/tests/test_account.py @@ -1,12 +1,12 @@ import unittest import mock from pprint import pprint -from steempy import Steem, exceptions -from steempy.account import Account -from steempy.amount import Amount -from steempy.asset import Asset -from steempy.instance import set_shared_steem_instance -from steempybase.operationids import getOperationNameForId +from beem import Steem, exceptions +from beem.account import Account +from beem.amount import Amount +from beem.asset import Asset +from beem.instance import set_shared_steem_instance +from beembase.operationids import getOperationNameForId wif = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3" nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io", diff --git a/tests/test_aes.py b/tests/test_aes.py index 6f04fcba4a9a42b2da85e05029622253b5233b97..fc770a6c8d1af142bb48cc996229c181f71bb175 100644 --- a/tests/test_aes.py +++ b/tests/test_aes.py @@ -3,7 +3,7 @@ import random import unittest import base64 from pprint import pprint -from steempy.aes import AESCipher +from beem.aes import AESCipher class Testcases(unittest.TestCase): diff --git a/tests/test_amount.py b/tests/test_amount.py index be447fdc19d14daafea6b46c2a321af509fc8bb8..06b6d8eca0399764752bb210c816d229e2efa3c1 100644 --- a/tests/test_amount.py +++ b/tests/test_amount.py @@ -1,8 +1,8 @@ import unittest -from steempy import Steem -from steempy.amount import Amount -from steempy.asset import Asset -from steempy.instance import set_shared_steem_instance, SharedInstance +from beem import Steem +from beem.amount import Amount +from beem.asset import Asset +from beem.instance import set_shared_steem_instance, SharedInstance nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io", "wss://rpc.steemviz.com", "wss://seed.bitcoiner.me", "wss://node.steem.ws", "wss://steemd.steemgigs.org", "wss://steemd.steemit.com", "wss://steemd.minnowsupportproject.org"] diff --git a/tests/test_asset.py b/tests/test_asset.py index 8bc3b91668f57e6382599d6ae77f583876732608..7f7e2054c9115aad8c41edb6e38f2543cb1eb7fb 100644 --- a/tests/test_asset.py +++ b/tests/test_asset.py @@ -1,8 +1,8 @@ import unittest -from steempy import Steem -from steempy.asset import Asset -from steempy.instance import set_shared_steem_instance -from steempy.exceptions import AssetDoesNotExistsException +from beem import Steem +from beem.asset import Asset +from beem.instance import set_shared_steem_instance +from beem.exceptions import AssetDoesNotExistsException nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io", "wss://rpc.steemviz.com", "wss://seed.bitcoiner.me", "wss://node.steem.ws", "wss://steemd.steemgigs.org", "wss://steemd.steemit.com", "wss://steemd.minnowsupportproject.org"] diff --git a/tests/test_base_objects.py b/tests/test_base_objects.py index 67871657ca6c3d0f83daa2b31f0c3b89ddcf5878..349aeb5555cca06fb5c8fd4e0a67fc8223f9f94d 100644 --- a/tests/test_base_objects.py +++ b/tests/test_base_objects.py @@ -1,8 +1,8 @@ import unittest -from steempy import Steem, exceptions -from steempy.instance import set_shared_steem_instance -from steempy.account import Account -from steempy.witness import Witness +from beem import Steem, exceptions +from beem.instance import set_shared_steem_instance +from beem.account import Account +from beem.witness import Witness nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io", "wss://rpc.steemviz.com", "wss://seed.bitcoiner.me", "wss://node.steem.ws", "wss://steemd.steemgigs.org", "wss://steemd.steemit.com", "wss://steemd.minnowsupportproject.org"] diff --git a/tests/test_bip38.py b/tests/test_bip38.py index ccd39c6713f593da62348ac74ad1ec929848da11..13f1948e5c84bc254aa5fc85d0c1960af1737ec8 100644 --- a/tests/test_bip38.py +++ b/tests/test_bip38.py @@ -1,7 +1,7 @@ import unittest -from steempybase.account import PrivateKey -from steempybase.bip38 import encrypt, decrypt +from beembase.account import PrivateKey +from beembase.bip38 import encrypt, decrypt class Testcases(unittest.TestCase): diff --git a/tests/test_memo.py b/tests/test_memo.py index 4ed409e3b5ff55edd2beec77f25c8c34fde8921e..4a58dc87e07015c9660e1b886f899b531734bbb6 100644 --- a/tests/test_memo.py +++ b/tests/test_memo.py @@ -1,8 +1,8 @@ import unittest import os from pprint import pprint -from steempybase.account import BrainKey, Address, PublicKey, PrivateKey -from steempybase.memo import ( +from beembase.account import BrainKey, Address, PublicKey, PrivateKey +from beembase.memo import ( get_shared_secret, _pad, _unpad, diff --git a/tests/test_message.py b/tests/test_message.py index 5e577c72f3cea6f063a6deda68c570b287038d99..09465d580872eed26999743c702521784b26cf9d 100644 --- a/tests/test_message.py +++ b/tests/test_message.py @@ -1,9 +1,9 @@ import unittest import mock -from steempy import Steem -from steempy.message import Message -from steempy.account import Account -from steempy.instance import set_shared_steem_instance +from beem import Steem +from beem.message import Message +from beem.account import Account +from beem.instance import set_shared_steem_instance wif = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3" core_unit = "STM" @@ -35,7 +35,7 @@ class Testcases(unittest.TestCase): }) with mock.patch( - "steempy.account.Account.refresh", + "beem.account.Account.refresh", new=new_refresh ): account = Account("test") @@ -54,7 +54,7 @@ class Testcases(unittest.TestCase): }) with mock.patch( - "steempy.account.Account.refresh", + "beem.account.Account.refresh", new=new_refresh ): Message( diff --git a/tests/test_objectcache.py b/tests/test_objectcache.py index a2254987873d2f24b3cd298ef9d8f01e2feeb13f..b0c7700132b7dec0cd110328d759d40098fe14be 100644 --- a/tests/test_objectcache.py +++ b/tests/test_objectcache.py @@ -1,8 +1,8 @@ import time import unittest -from steempy import Steem, exceptions -from steempy.instance import set_shared_steem_instance -from steempy.blockchainobject import ObjectCache +from beem import Steem, exceptions +from beem.instance import set_shared_steem_instance +from beem.blockchainobject import ObjectCache nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io", "wss://rpc.steemviz.com", "wss://seed.bitcoiner.me", "wss://node.steem.ws", "wss://steemd.steemgigs.org", "wss://steemd.steemit.com", "wss://steemd.minnowsupportproject.org"] diff --git a/tests/test_price.py b/tests/test_price.py index 0e57d8f1358a737403af87ca8ddad6fa8f256caa..4c59f9446067379b1b950f63a51b3c9a86776b69 100644 --- a/tests/test_price.py +++ b/tests/test_price.py @@ -1,8 +1,8 @@ -from steempy import Steem -from steempy.instance import set_shared_steem_instance -from steempy.amount import Amount -from steempy.price import Price -from steempy.asset import Asset +from beem import Steem +from beem.instance import set_shared_steem_instance +from beem.amount import Amount +from beem.price import Price +from beem.asset import Asset import unittest nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io", "wss://rpc.steemviz.com", "wss://seed.bitcoiner.me", "wss://node.steem.ws", "wss://steemd.steemgigs.org", "wss://steemd.steemit.com", diff --git a/tests/test_proposals.py b/tests/test_proposals.py index c063b5e2935e0017f2ff8d20b9f34211b3270112..90d634c44454042017f2967e9b57be05b29a2f19 100644 --- a/tests/test_proposals.py +++ b/tests/test_proposals.py @@ -1,8 +1,8 @@ import unittest from pprint import pprint -from steempy import Steem -from steempybase.operationids import getOperationNameForId -from steempy.instance import set_shared_steem_instance +from beem import Steem +from beembase.operationids import getOperationNameForId +from beem.instance import set_shared_steem_instance wif = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3" nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io", diff --git a/tests/test_steem.py b/tests/test_steem.py index 0efd5ca54e11450d86fe78915c4a8efd217302a5..a7d5f28f89799f8025b70fe244caf2a5ff7c5971 100644 --- a/tests/test_steem.py +++ b/tests/test_steem.py @@ -3,11 +3,11 @@ import string import unittest import random from pprint import pprint -from steempy import Steem -from steempybase.operationids import getOperationNameForId -from steempy.amount import Amount -from steempybase.account import PrivateKey -from steempy.instance import set_shared_steem_instance +from beem import Steem +from beembase.operationids import getOperationNameForId +from beem.amount import Amount +from beembase.account import PrivateKey +from beem.instance import set_shared_steem_instance wif = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3" core_unit = "STM" diff --git a/tests/test_transactions.py b/tests/test_transactions.py index ac5708caca83b447b7eaafd8b86068be1c56bb08..8f0864e0d5562eef85c1d68ff183a25d9e70ac1c 100644 --- a/tests/test_transactions.py +++ b/tests/test_transactions.py @@ -1,4 +1,4 @@ -from steempybase import ( +from beembase import ( transactions, memo, account, @@ -6,12 +6,12 @@ from steempybase import ( objects ) from collections import OrderedDict -from steempybase.objects import Operation -from steempybase.signedtransactions import Signed_Transaction -from steempybase.account import PrivateKey -from steempybase.operationids import getOperationNameForId -from steempy.amount import Amount -from steempy.asset import Asset +from beembase.objects import Operation +from beembase.signedtransactions import Signed_Transaction +from beembase.account import PrivateKey +from beembase.operationids import getOperationNameForId +from beem.amount import Amount +from beem.asset import Asset import random import unittest from pprint import pprint diff --git a/tests/test_txbuffers.py b/tests/test_txbuffers.py index f92b24659cf5ff76883da4eaf52246f239e0e815..072d28da9c81fe71d007d25506cb028cde271dc1 100644 --- a/tests/test_txbuffers.py +++ b/tests/test_txbuffers.py @@ -1,7 +1,7 @@ import unittest -from steempy import Steem -from steempybase import operations -from steempy.instance import set_shared_steem_instance +from beem import Steem +from beembase import operations +from beem.instance import set_shared_steem_instance wif = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3" nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io", diff --git a/tests/test_utils.py b/tests/test_utils.py index 9137b12d8667d7b583e96bbccd5e6694ec1cce78..0394075000855c1e2689599466fb8e6d5571290f 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,5 +1,5 @@ import unittest -from steempy.utils import ( +from beem.utils import ( assets_from_string, resolve_authorperm, resolve_authorpermvoter, diff --git a/tests/test_wallet.py b/tests/test_wallet.py index 781f59a15f8e112ff628a292e945f5a6aa6565c3..f558e292f5d97910bb27708f868709061e36357b 100644 --- a/tests/test_wallet.py +++ b/tests/test_wallet.py @@ -1,13 +1,13 @@ import unittest import mock from pprint import pprint -from steempy import Steem -from steempy.account import Account -from steempy.amount import Amount -from steempy.asset import Asset -from steempy.wallet import Wallet -from steempy.instance import set_shared_steem_instance -from steempybase.operationids import getOperationNameForId +from beem import Steem +from beem.account import Account +from beem.amount import Amount +from beem.asset import Asset +from beem.wallet import Wallet +from beem.instance import set_shared_steem_instance +from beembase.operationids import getOperationNameForId wif = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3" nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io", diff --git a/tox.ini b/tox.ini index 4d80aba31cf8540c894f183c5ddb000fe28cd9e3..cd2589fcb838d4bd56cff1347765dc212e5a5a24 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ commands= deps= flake8 commands= - flake8 --ignore=E501,F401 steempyapi steempybase examples + flake8 --ignore=E501,F401 beemapi beembase examples [testenv:docs] basepython=