Skip to content

Commit

Permalink
python separated
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Oct 31, 2017
1 parent 1d58fa8 commit 27bbf55
Show file tree
Hide file tree
Showing 100 changed files with 339 additions and 20,156 deletions.
13 changes: 11 additions & 2 deletions export-exchanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ try {
// fs.truncateSync (ccxtpyFilename)
// fs.writeFileSync (ccxtpyFilename, ccxtpyNewContent)

const pad = function (string, n) {
return (string + ' '.repeat (n)).slice (0, n)
};

[
{
file: './python/ccxt/__init__.py',
Expand All @@ -71,8 +75,13 @@ try {
},
{
file: './python/ccxt/__init__.py',
regex: /(?:from ccxt\.[^\.]+ import [^\s]+[\n])+/,
replacement: ids.map (id => 'from ccxt.' + id + ' import ' + id).join ("\n") + "\n",
regex: /(?:from ccxt\.[^\.]+ import [^\s]+\s+\# noqa\: F401[\n])+\nexchanges/,
replacement: ids.map (id => pad ('from ccxt.' + id + ' import ' + id, 60) + '# noqa: F401').join ("\n") + "\n\nexchanges",
},
{
file: './python/ccxt/async/__init__.py',
regex: /(?:from ccxt\.async\.[^\.]+ import [^\s]+\s+\# noqa\: F401[\n])+\nexchanges/,
replacement: ids.map (id => pad ('from ccxt.async.' + id + ' import ' + id, 64) + '# noqa: F401').join ("\n") + "\n\nexchanges",
},
{
file: './python/ccxt/async/__init__.py',
Expand Down
210 changes: 105 additions & 105 deletions python/ccxt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,112 +8,112 @@

# ----------------------------------------------------------------------------

from ccxt.base.exchange import Exchange # noqa: F401
from ccxt.base.exchange import Exchange # noqa: F401

from ccxt.base import errors # noqa: F401
from ccxt.base.errors import BaseError # noqa: F401
from ccxt.base.errors import ExchangeError # noqa: F401
from ccxt.base.errors import NotSupported # noqa: F401
from ccxt.base.errors import AuthenticationError # noqa: F401
from ccxt.base.errors import InsufficientFunds # noqa: F401
from ccxt.base.errors import InvalidOrder # noqa: F401
from ccxt.base.errors import OrderNotFound # noqa: F401
from ccxt.base.errors import OrderNotCached # noqa: F401
from ccxt.base.errors import NetworkError # noqa: F401
from ccxt.base.errors import DDoSProtection # noqa: F401
from ccxt.base.errors import RequestTimeout # noqa: F401
from ccxt.base.errors import ExchangeNotAvailable # noqa: F401
from ccxt.base import errors # noqa: F401
from ccxt.base.errors import BaseError # noqa: F401
from ccxt.base.errors import ExchangeError # noqa: F401
from ccxt.base.errors import NotSupported # noqa: F401
from ccxt.base.errors import AuthenticationError # noqa: F401
from ccxt.base.errors import InsufficientFunds # noqa: F401
from ccxt.base.errors import InvalidOrder # noqa: F401
from ccxt.base.errors import OrderNotFound # noqa: F401
from ccxt.base.errors import OrderNotCached # noqa: F401
from ccxt.base.errors import NetworkError # noqa: F401
from ccxt.base.errors import DDoSProtection # noqa: F401
from ccxt.base.errors import RequestTimeout # noqa: F401
from ccxt.base.errors import ExchangeNotAvailable # noqa: F401

from ccxt._1broker import _1broker
from ccxt._1btcxe import _1btcxe
from ccxt.acx import acx
from ccxt.allcoin import allcoin
from ccxt.anxpro import anxpro
from ccxt.binance import binance
from ccxt.bit2c import bit2c
from ccxt.bitbay import bitbay
from ccxt.bitcoincoid import bitcoincoid
from ccxt.bitfinex import bitfinex
from ccxt.bitfinex2 import bitfinex2
from ccxt.bitflyer import bitflyer
from ccxt.bithumb import bithumb
from ccxt.bitlish import bitlish
from ccxt.bitmarket import bitmarket
from ccxt.bitmex import bitmex
from ccxt.bitso import bitso
from ccxt.bitstamp1 import bitstamp1
from ccxt.bitstamp import bitstamp
from ccxt.bittrex import bittrex
from ccxt.bl3p import bl3p
from ccxt.bleutrade import bleutrade
from ccxt.btcbox import btcbox
from ccxt.btcchina import btcchina
from ccxt.btcmarkets import btcmarkets
from ccxt.btctradeua import btctradeua
from ccxt.btcturk import btcturk
from ccxt.btcx import btcx
from ccxt.bter import bter
from ccxt.bxinth import bxinth
from ccxt.ccex import ccex
from ccxt.cex import cex
from ccxt.chbtc import chbtc
from ccxt.chilebit import chilebit
from ccxt.coincheck import coincheck
from ccxt.coinfloor import coinfloor
from ccxt.coingi import coingi
from ccxt.coinmarketcap import coinmarketcap
from ccxt.coinmate import coinmate
from ccxt.coinsecure import coinsecure
from ccxt.coinspot import coinspot
from ccxt.cryptopia import cryptopia
from ccxt.dsx import dsx
from ccxt.exmo import exmo
from ccxt.flowbtc import flowbtc
from ccxt.foxbit import foxbit
from ccxt.fybse import fybse
from ccxt.fybsg import fybsg
from ccxt.gatecoin import gatecoin
from ccxt.gateio import gateio
from ccxt.gdax import gdax
from ccxt.gemini import gemini
from ccxt.hitbtc import hitbtc
from ccxt.hitbtc2 import hitbtc2
from ccxt.huobi import huobi
from ccxt.huobicny import huobicny
from ccxt.huobipro import huobipro
from ccxt.independentreserve import independentreserve
from ccxt.itbit import itbit
from ccxt.jubi import jubi
from ccxt.kraken import kraken
from ccxt.kuna import kuna
from ccxt.lakebtc import lakebtc
from ccxt.livecoin import livecoin
from ccxt.liqui import liqui
from ccxt.luno import luno
from ccxt.mercado import mercado
from ccxt.mixcoins import mixcoins
from ccxt.nova import nova
from ccxt.okcoincny import okcoincny
from ccxt.okcoinusd import okcoinusd
from ccxt.okex import okex
from ccxt.paymium import paymium
from ccxt.poloniex import poloniex
from ccxt.quadrigacx import quadrigacx
from ccxt.qryptos import qryptos
from ccxt.quoine import quoine
from ccxt.southxchange import southxchange
from ccxt.surbitcoin import surbitcoin
from ccxt.tidex import tidex
from ccxt.therock import therock
from ccxt.urdubit import urdubit
from ccxt.vaultoro import vaultoro
from ccxt.vbtc import vbtc
from ccxt.virwox import virwox
from ccxt.wex import wex
from ccxt.xbtce import xbtce
from ccxt.yobit import yobit
from ccxt.yunbi import yunbi
from ccxt.zaif import zaif
from ccxt._1broker import _1broker # noqa: F401
from ccxt._1btcxe import _1btcxe # noqa: F401
from ccxt.acx import acx # noqa: F401
from ccxt.allcoin import allcoin # noqa: F401
from ccxt.anxpro import anxpro # noqa: F401
from ccxt.binance import binance # noqa: F401
from ccxt.bit2c import bit2c # noqa: F401
from ccxt.bitbay import bitbay # noqa: F401
from ccxt.bitcoincoid import bitcoincoid # noqa: F401
from ccxt.bitfinex import bitfinex # noqa: F401
from ccxt.bitfinex2 import bitfinex2 # noqa: F401
from ccxt.bitflyer import bitflyer # noqa: F401
from ccxt.bithumb import bithumb # noqa: F401
from ccxt.bitlish import bitlish # noqa: F401
from ccxt.bitmarket import bitmarket # noqa: F401
from ccxt.bitmex import bitmex # noqa: F401
from ccxt.bitso import bitso # noqa: F401
from ccxt.bitstamp1 import bitstamp1 # noqa: F401
from ccxt.bitstamp import bitstamp # noqa: F401
from ccxt.bittrex import bittrex # noqa: F401
from ccxt.bl3p import bl3p # noqa: F401
from ccxt.bleutrade import bleutrade # noqa: F401
from ccxt.btcbox import btcbox # noqa: F401
from ccxt.btcchina import btcchina # noqa: F401
from ccxt.btcmarkets import btcmarkets # noqa: F401
from ccxt.btctradeua import btctradeua # noqa: F401
from ccxt.btcturk import btcturk # noqa: F401
from ccxt.btcx import btcx # noqa: F401
from ccxt.bter import bter # noqa: F401
from ccxt.bxinth import bxinth # noqa: F401
from ccxt.ccex import ccex # noqa: F401
from ccxt.cex import cex # noqa: F401
from ccxt.chbtc import chbtc # noqa: F401
from ccxt.chilebit import chilebit # noqa: F401
from ccxt.coincheck import coincheck # noqa: F401
from ccxt.coinfloor import coinfloor # noqa: F401
from ccxt.coingi import coingi # noqa: F401
from ccxt.coinmarketcap import coinmarketcap # noqa: F401
from ccxt.coinmate import coinmate # noqa: F401
from ccxt.coinsecure import coinsecure # noqa: F401
from ccxt.coinspot import coinspot # noqa: F401
from ccxt.cryptopia import cryptopia # noqa: F401
from ccxt.dsx import dsx # noqa: F401
from ccxt.exmo import exmo # noqa: F401
from ccxt.flowbtc import flowbtc # noqa: F401
from ccxt.foxbit import foxbit # noqa: F401
from ccxt.fybse import fybse # noqa: F401
from ccxt.fybsg import fybsg # noqa: F401
from ccxt.gatecoin import gatecoin # noqa: F401
from ccxt.gateio import gateio # noqa: F401
from ccxt.gdax import gdax # noqa: F401
from ccxt.gemini import gemini # noqa: F401
from ccxt.hitbtc import hitbtc # noqa: F401
from ccxt.hitbtc2 import hitbtc2 # noqa: F401
from ccxt.huobi import huobi # noqa: F401
from ccxt.huobicny import huobicny # noqa: F401
from ccxt.huobipro import huobipro # noqa: F401
from ccxt.independentreserve import independentreserve # noqa: F401
from ccxt.itbit import itbit # noqa: F401
from ccxt.jubi import jubi # noqa: F401
from ccxt.kraken import kraken # noqa: F401
from ccxt.kuna import kuna # noqa: F401
from ccxt.lakebtc import lakebtc # noqa: F401
from ccxt.livecoin import livecoin # noqa: F401
from ccxt.liqui import liqui # noqa: F401
from ccxt.luno import luno # noqa: F401
from ccxt.mercado import mercado # noqa: F401
from ccxt.mixcoins import mixcoins # noqa: F401
from ccxt.nova import nova # noqa: F401
from ccxt.okcoincny import okcoincny # noqa: F401
from ccxt.okcoinusd import okcoinusd # noqa: F401
from ccxt.okex import okex # noqa: F401
from ccxt.paymium import paymium # noqa: F401
from ccxt.poloniex import poloniex # noqa: F401
from ccxt.quadrigacx import quadrigacx # noqa: F401
from ccxt.qryptos import qryptos # noqa: F401
from ccxt.quoine import quoine # noqa: F401
from ccxt.southxchange import southxchange # noqa: F401
from ccxt.surbitcoin import surbitcoin # noqa: F401
from ccxt.tidex import tidex # noqa: F401
from ccxt.therock import therock # noqa: F401
from ccxt.urdubit import urdubit # noqa: F401
from ccxt.vaultoro import vaultoro # noqa: F401
from ccxt.vbtc import vbtc # noqa: F401
from ccxt.virwox import virwox # noqa: F401
from ccxt.wex import wex # noqa: F401
from ccxt.xbtce import xbtce # noqa: F401
from ccxt.yobit import yobit # noqa: F401
from ccxt.yunbi import yunbi # noqa: F401
from ccxt.zaif import zaif # noqa: F401

exchanges = [
'_1broker',
Expand Down Expand Up @@ -213,4 +213,4 @@
'exchanges',
]

__all__ = base + errors.__all__ + exchanges
__all__ = base + errors.__all__ + exchanges
2 changes: 1 addition & 1 deletion python/ccxt/async/_1broker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

from ccxt.base.exchange import Exchange
from ccxt.async.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationError

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async/_1btcxe.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

from ccxt.base.exchange import Exchange
from ccxt.async.base.exchange import Exchange
from ccxt.base.errors import ExchangeError


Expand Down
Loading

0 comments on commit 27bbf55

Please sign in to comment.