Skip to content

Commit

Permalink
Rename library from steempy to beem
Browse files Browse the repository at this point in the history
  • Loading branch information
holgern committed Feb 21, 2018
1 parent 47cf2b4 commit f166f7f
Show file tree
Hide file tree
Showing 87 changed files with 251 additions and 253 deletions.
6 changes: 3 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 17 additions & 17 deletions README.rst
Original file line number Diff line number Diff line change
@@ -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
============
Expand All @@ -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
Expand All @@ -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
=========
Expand All @@ -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
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions steempy/account.py → beem/account.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -257,7 +257,7 @@ def history(

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:
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions steempy/amount.py → beem/amount.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from steempy.instance import shared_steem_instance
from beem.instance import shared_steem_instance
from .asset import Asset


Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions steempy/asset.py → beem/asset.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions steempy/block.py → beem/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -51,8 +51,8 @@ def ops(self):

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:
Expand Down
10 changes: 5 additions & 5 deletions steempy/blockchain.py → beem/blockchain.py
Original file line number Diff line number Diff line change
@@ -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``)
Expand Down Expand Up @@ -201,8 +201,8 @@ def ops_statistics(self, start, stop=None, add_to_ops_stat=None, verbose=True):
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:
Expand Down
2 changes: 1 addition & 1 deletion steempy/blockchainobject.py → beem/blockchainobject.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion steempy/instance.py → beem/instance.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import steempy as stm
import beem as stm


class SharedInstance():
Expand Down
4 changes: 2 additions & 2 deletions steempy/market.py → beem/market.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
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)
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):
Expand Down
16 changes: 8 additions & 8 deletions steempy/memo.py → beem/memo.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
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


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
Expand All @@ -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"))
Expand All @@ -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"]))
Expand Down
6 changes: 3 additions & 3 deletions steempy/message.py → beem/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
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

Expand Down
16 changes: 8 additions & 8 deletions steempy/notify.py → beem/notify.py
Original file line number Diff line number Diff line change
@@ -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)

Expand All @@ -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"],
Expand Down Expand Up @@ -67,7 +67,7 @@ def __init__(

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,
Expand Down
Loading

0 comments on commit f166f7f

Please sign in to comment.