Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split customer-facing calls from technology source #10

Open
lockefox opened this issue Nov 21, 2017 · 3 comments
Open

Split customer-facing calls from technology source #10

lockefox opened this issue Nov 21, 2017 · 3 comments

Comments

@lockefox
Copy link
Contributor

pandas-datareader splits their API calls from the specific platform (Yahoo, Google, Quandl, etc). Expand paths like datareader/coins/ to datareader/coins/hitbtc/ and datareader/coins/cryptocompare/

Full paths may not be required. But make private platform-specific libraries for separating concerns.

@lockefox
Copy link
Contributor Author

lockefox commented Nov 21, 2017

Expect API pathing something like:

import prosper.warehouse.coins as coins

coins.get_orderbook_hitbtc('BTC', 'asks')

but allow get_orderbook_hitbtc() to source deeper:

"""prosper.datareader.coins.__init__.py?"""
from . import hitbtc
from . import cryptocompare

def get_orderbook_hitbtc(coin, which_book, currency, logger=DEFAULT_LOGGER):
    """get the current orderbook from hitbtc"""
    coin_info = hitbtc.get_coin_info(coin)
    ...

Move all the __all__ scoped functions to be easier to reach, and platform-weirdness segregated by provider rather than type

@lockefox
Copy link
Contributor Author

@lockefox
Copy link
Contributor Author

lockefox commented Jan 3, 2018

released in v2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant