coinex-api 0.0.7__py3-none-any.whl → 0.0.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {coinex_api-0.0.7.dist-info → coinex_api-0.0.8.dist-info}/METADATA +33 -14
- coinex_api-0.0.8.dist-info/RECORD +3 -0
- coinex_api/__init__.py +0 -7
- coinex_api/ccxt/__init__.py +0 -101
- coinex_api/ccxt/abstract/coinex.py +0 -237
- coinex_api/ccxt/async_support/__init__.py +0 -80
- coinex_api/ccxt/async_support/base/__init__.py +0 -1
- coinex_api/ccxt/async_support/base/exchange.py +0 -2100
- coinex_api/ccxt/async_support/base/throttler.py +0 -50
- coinex_api/ccxt/async_support/base/ws/__init__.py +0 -38
- coinex_api/ccxt/async_support/base/ws/aiohttp_client.py +0 -147
- coinex_api/ccxt/async_support/base/ws/cache.py +0 -213
- coinex_api/ccxt/async_support/base/ws/client.py +0 -214
- coinex_api/ccxt/async_support/base/ws/fast_client.py +0 -97
- coinex_api/ccxt/async_support/base/ws/functions.py +0 -59
- coinex_api/ccxt/async_support/base/ws/future.py +0 -69
- coinex_api/ccxt/async_support/base/ws/order_book.py +0 -78
- coinex_api/ccxt/async_support/base/ws/order_book_side.py +0 -174
- coinex_api/ccxt/async_support/coinex.py +0 -5833
- coinex_api/ccxt/base/__init__.py +0 -27
- coinex_api/ccxt/base/decimal_to_precision.py +0 -174
- coinex_api/ccxt/base/errors.py +0 -267
- coinex_api/ccxt/base/exchange.py +0 -6770
- coinex_api/ccxt/base/precise.py +0 -297
- coinex_api/ccxt/base/types.py +0 -577
- coinex_api/ccxt/coinex.py +0 -5832
- coinex_api/ccxt/pro/__init__.py +0 -21
- coinex_api/ccxt/pro/coinex.py +0 -1366
- coinex_api/ccxt/static_dependencies/README.md +0 -1
- coinex_api/ccxt/static_dependencies/__init__.py +0 -1
- coinex_api/ccxt/static_dependencies/ecdsa/__init__.py +0 -14
- coinex_api/ccxt/static_dependencies/ecdsa/_version.py +0 -520
- coinex_api/ccxt/static_dependencies/ecdsa/curves.py +0 -56
- coinex_api/ccxt/static_dependencies/ecdsa/der.py +0 -221
- coinex_api/ccxt/static_dependencies/ecdsa/ecdsa.py +0 -310
- coinex_api/ccxt/static_dependencies/ecdsa/ellipticcurve.py +0 -197
- coinex_api/ccxt/static_dependencies/ecdsa/keys.py +0 -332
- coinex_api/ccxt/static_dependencies/ecdsa/numbertheory.py +0 -531
- coinex_api/ccxt/static_dependencies/ecdsa/rfc6979.py +0 -100
- coinex_api/ccxt/static_dependencies/ecdsa/util.py +0 -266
- coinex_api/ccxt/static_dependencies/ethereum/__init__.py +0 -7
- coinex_api/ccxt/static_dependencies/ethereum/abi/__init__.py +0 -16
- coinex_api/ccxt/static_dependencies/ethereum/abi/abi.py +0 -19
- coinex_api/ccxt/static_dependencies/ethereum/abi/base.py +0 -152
- coinex_api/ccxt/static_dependencies/ethereum/abi/codec.py +0 -217
- coinex_api/ccxt/static_dependencies/ethereum/abi/constants.py +0 -3
- coinex_api/ccxt/static_dependencies/ethereum/abi/decoding.py +0 -565
- coinex_api/ccxt/static_dependencies/ethereum/abi/encoding.py +0 -720
- coinex_api/ccxt/static_dependencies/ethereum/abi/exceptions.py +0 -139
- coinex_api/ccxt/static_dependencies/ethereum/abi/grammar.py +0 -443
- coinex_api/ccxt/static_dependencies/ethereum/abi/packed.py +0 -13
- coinex_api/ccxt/static_dependencies/ethereum/abi/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/ethereum/abi/registry.py +0 -643
- coinex_api/ccxt/static_dependencies/ethereum/abi/tools/__init__.py +0 -3
- coinex_api/ccxt/static_dependencies/ethereum/abi/tools/_strategies.py +0 -230
- coinex_api/ccxt/static_dependencies/ethereum/abi/utils/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/ethereum/abi/utils/numeric.py +0 -83
- coinex_api/ccxt/static_dependencies/ethereum/abi/utils/padding.py +0 -27
- coinex_api/ccxt/static_dependencies/ethereum/abi/utils/string.py +0 -19
- coinex_api/ccxt/static_dependencies/ethereum/account/__init__.py +0 -3
- coinex_api/ccxt/static_dependencies/ethereum/account/encode_typed_data/__init__.py +0 -4
- coinex_api/ccxt/static_dependencies/ethereum/account/encode_typed_data/encoding_and_hashing.py +0 -239
- coinex_api/ccxt/static_dependencies/ethereum/account/encode_typed_data/helpers.py +0 -40
- coinex_api/ccxt/static_dependencies/ethereum/account/messages.py +0 -263
- coinex_api/ccxt/static_dependencies/ethereum/account/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/ethereum/hexbytes/__init__.py +0 -5
- coinex_api/ccxt/static_dependencies/ethereum/hexbytes/_utils.py +0 -54
- coinex_api/ccxt/static_dependencies/ethereum/hexbytes/main.py +0 -65
- coinex_api/ccxt/static_dependencies/ethereum/hexbytes/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/ethereum/typing/__init__.py +0 -63
- coinex_api/ccxt/static_dependencies/ethereum/typing/abi.py +0 -6
- coinex_api/ccxt/static_dependencies/ethereum/typing/bls.py +0 -7
- coinex_api/ccxt/static_dependencies/ethereum/typing/discovery.py +0 -5
- coinex_api/ccxt/static_dependencies/ethereum/typing/encoding.py +0 -7
- coinex_api/ccxt/static_dependencies/ethereum/typing/enums.py +0 -17
- coinex_api/ccxt/static_dependencies/ethereum/typing/ethpm.py +0 -9
- coinex_api/ccxt/static_dependencies/ethereum/typing/evm.py +0 -20
- coinex_api/ccxt/static_dependencies/ethereum/typing/networks.py +0 -1122
- coinex_api/ccxt/static_dependencies/ethereum/typing/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/ethereum/utils/__init__.py +0 -115
- coinex_api/ccxt/static_dependencies/ethereum/utils/abi.py +0 -72
- coinex_api/ccxt/static_dependencies/ethereum/utils/address.py +0 -171
- coinex_api/ccxt/static_dependencies/ethereum/utils/applicators.py +0 -151
- coinex_api/ccxt/static_dependencies/ethereum/utils/conversions.py +0 -190
- coinex_api/ccxt/static_dependencies/ethereum/utils/currency.py +0 -107
- coinex_api/ccxt/static_dependencies/ethereum/utils/curried/__init__.py +0 -269
- coinex_api/ccxt/static_dependencies/ethereum/utils/debug.py +0 -20
- coinex_api/ccxt/static_dependencies/ethereum/utils/decorators.py +0 -132
- coinex_api/ccxt/static_dependencies/ethereum/utils/encoding.py +0 -6
- coinex_api/ccxt/static_dependencies/ethereum/utils/exceptions.py +0 -4
- coinex_api/ccxt/static_dependencies/ethereum/utils/functional.py +0 -75
- coinex_api/ccxt/static_dependencies/ethereum/utils/hexadecimal.py +0 -74
- coinex_api/ccxt/static_dependencies/ethereum/utils/humanize.py +0 -188
- coinex_api/ccxt/static_dependencies/ethereum/utils/logging.py +0 -159
- coinex_api/ccxt/static_dependencies/ethereum/utils/module_loading.py +0 -31
- coinex_api/ccxt/static_dependencies/ethereum/utils/numeric.py +0 -43
- coinex_api/ccxt/static_dependencies/ethereum/utils/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/ethereum/utils/toolz.py +0 -76
- coinex_api/ccxt/static_dependencies/ethereum/utils/types.py +0 -54
- coinex_api/ccxt/static_dependencies/ethereum/utils/typing/__init__.py +0 -18
- coinex_api/ccxt/static_dependencies/ethereum/utils/typing/misc.py +0 -14
- coinex_api/ccxt/static_dependencies/ethereum/utils/units.py +0 -31
- coinex_api/ccxt/static_dependencies/keccak/__init__.py +0 -3
- coinex_api/ccxt/static_dependencies/keccak/keccak.py +0 -197
- coinex_api/ccxt/static_dependencies/lark/__init__.py +0 -38
- coinex_api/ccxt/static_dependencies/lark/__pyinstaller/__init__.py +0 -6
- coinex_api/ccxt/static_dependencies/lark/__pyinstaller/hook-lark.py +0 -14
- coinex_api/ccxt/static_dependencies/lark/ast_utils.py +0 -59
- coinex_api/ccxt/static_dependencies/lark/common.py +0 -86
- coinex_api/ccxt/static_dependencies/lark/exceptions.py +0 -292
- coinex_api/ccxt/static_dependencies/lark/grammar.py +0 -130
- coinex_api/ccxt/static_dependencies/lark/grammars/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/lark/grammars/common.lark +0 -59
- coinex_api/ccxt/static_dependencies/lark/grammars/lark.lark +0 -62
- coinex_api/ccxt/static_dependencies/lark/grammars/python.lark +0 -302
- coinex_api/ccxt/static_dependencies/lark/grammars/unicode.lark +0 -7
- coinex_api/ccxt/static_dependencies/lark/indenter.py +0 -143
- coinex_api/ccxt/static_dependencies/lark/lark.py +0 -658
- coinex_api/ccxt/static_dependencies/lark/lexer.py +0 -678
- coinex_api/ccxt/static_dependencies/lark/load_grammar.py +0 -1428
- coinex_api/ccxt/static_dependencies/lark/parse_tree_builder.py +0 -391
- coinex_api/ccxt/static_dependencies/lark/parser_frontends.py +0 -257
- coinex_api/ccxt/static_dependencies/lark/parsers/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/lark/parsers/cyk.py +0 -340
- coinex_api/ccxt/static_dependencies/lark/parsers/earley.py +0 -314
- coinex_api/ccxt/static_dependencies/lark/parsers/earley_common.py +0 -42
- coinex_api/ccxt/static_dependencies/lark/parsers/earley_forest.py +0 -801
- coinex_api/ccxt/static_dependencies/lark/parsers/grammar_analysis.py +0 -203
- coinex_api/ccxt/static_dependencies/lark/parsers/lalr_analysis.py +0 -332
- coinex_api/ccxt/static_dependencies/lark/parsers/lalr_interactive_parser.py +0 -158
- coinex_api/ccxt/static_dependencies/lark/parsers/lalr_parser.py +0 -122
- coinex_api/ccxt/static_dependencies/lark/parsers/lalr_parser_state.py +0 -110
- coinex_api/ccxt/static_dependencies/lark/parsers/xearley.py +0 -165
- coinex_api/ccxt/static_dependencies/lark/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/lark/reconstruct.py +0 -107
- coinex_api/ccxt/static_dependencies/lark/tools/__init__.py +0 -70
- coinex_api/ccxt/static_dependencies/lark/tools/nearley.py +0 -202
- coinex_api/ccxt/static_dependencies/lark/tools/serialize.py +0 -32
- coinex_api/ccxt/static_dependencies/lark/tools/standalone.py +0 -196
- coinex_api/ccxt/static_dependencies/lark/tree.py +0 -267
- coinex_api/ccxt/static_dependencies/lark/tree_matcher.py +0 -186
- coinex_api/ccxt/static_dependencies/lark/tree_templates.py +0 -180
- coinex_api/ccxt/static_dependencies/lark/utils.py +0 -343
- coinex_api/ccxt/static_dependencies/lark/visitors.py +0 -596
- coinex_api/ccxt/static_dependencies/marshmallow/__init__.py +0 -81
- coinex_api/ccxt/static_dependencies/marshmallow/base.py +0 -65
- coinex_api/ccxt/static_dependencies/marshmallow/class_registry.py +0 -94
- coinex_api/ccxt/static_dependencies/marshmallow/decorators.py +0 -231
- coinex_api/ccxt/static_dependencies/marshmallow/error_store.py +0 -60
- coinex_api/ccxt/static_dependencies/marshmallow/exceptions.py +0 -71
- coinex_api/ccxt/static_dependencies/marshmallow/fields.py +0 -2114
- coinex_api/ccxt/static_dependencies/marshmallow/orderedset.py +0 -89
- coinex_api/ccxt/static_dependencies/marshmallow/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/marshmallow/schema.py +0 -1228
- coinex_api/ccxt/static_dependencies/marshmallow/types.py +0 -12
- coinex_api/ccxt/static_dependencies/marshmallow/utils.py +0 -378
- coinex_api/ccxt/static_dependencies/marshmallow/validate.py +0 -678
- coinex_api/ccxt/static_dependencies/marshmallow/warnings.py +0 -2
- coinex_api/ccxt/static_dependencies/marshmallow_dataclass/__init__.py +0 -1047
- coinex_api/ccxt/static_dependencies/marshmallow_dataclass/collection_field.py +0 -51
- coinex_api/ccxt/static_dependencies/marshmallow_dataclass/lazy_class_attribute.py +0 -45
- coinex_api/ccxt/static_dependencies/marshmallow_dataclass/mypy.py +0 -71
- coinex_api/ccxt/static_dependencies/marshmallow_dataclass/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/marshmallow_dataclass/typing.py +0 -14
- coinex_api/ccxt/static_dependencies/marshmallow_dataclass/union_field.py +0 -82
- coinex_api/ccxt/static_dependencies/marshmallow_oneofschema/__init__.py +0 -1
- coinex_api/ccxt/static_dependencies/marshmallow_oneofschema/one_of_schema.py +0 -193
- coinex_api/ccxt/static_dependencies/marshmallow_oneofschema/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/msgpack/__init__.py +0 -55
- coinex_api/ccxt/static_dependencies/msgpack/_cmsgpack.pyx +0 -11
- coinex_api/ccxt/static_dependencies/msgpack/_packer.pyx +0 -374
- coinex_api/ccxt/static_dependencies/msgpack/_unpacker.pyx +0 -547
- coinex_api/ccxt/static_dependencies/msgpack/buff_converter.h +0 -8
- coinex_api/ccxt/static_dependencies/msgpack/exceptions.py +0 -48
- coinex_api/ccxt/static_dependencies/msgpack/ext.py +0 -168
- coinex_api/ccxt/static_dependencies/msgpack/fallback.py +0 -951
- coinex_api/ccxt/static_dependencies/msgpack/pack.h +0 -89
- coinex_api/ccxt/static_dependencies/msgpack/pack_template.h +0 -820
- coinex_api/ccxt/static_dependencies/msgpack/sysdep.h +0 -194
- coinex_api/ccxt/static_dependencies/msgpack/unpack.h +0 -391
- coinex_api/ccxt/static_dependencies/msgpack/unpack_define.h +0 -95
- coinex_api/ccxt/static_dependencies/msgpack/unpack_template.h +0 -464
- coinex_api/ccxt/static_dependencies/parsimonious/__init__.py +0 -10
- coinex_api/ccxt/static_dependencies/parsimonious/exceptions.py +0 -105
- coinex_api/ccxt/static_dependencies/parsimonious/expressions.py +0 -479
- coinex_api/ccxt/static_dependencies/parsimonious/grammar.py +0 -487
- coinex_api/ccxt/static_dependencies/parsimonious/nodes.py +0 -325
- coinex_api/ccxt/static_dependencies/parsimonious/utils.py +0 -40
- coinex_api/ccxt/static_dependencies/starknet/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/abi/v0/__init__.py +0 -2
- coinex_api/ccxt/static_dependencies/starknet/abi/v0/model.py +0 -44
- coinex_api/ccxt/static_dependencies/starknet/abi/v0/parser.py +0 -216
- coinex_api/ccxt/static_dependencies/starknet/abi/v0/schemas.py +0 -72
- coinex_api/ccxt/static_dependencies/starknet/abi/v0/shape.py +0 -63
- coinex_api/ccxt/static_dependencies/starknet/abi/v1/__init__.py +0 -2
- coinex_api/ccxt/static_dependencies/starknet/abi/v1/core_structures.json +0 -14
- coinex_api/ccxt/static_dependencies/starknet/abi/v1/model.py +0 -39
- coinex_api/ccxt/static_dependencies/starknet/abi/v1/parser.py +0 -220
- coinex_api/ccxt/static_dependencies/starknet/abi/v1/parser_transformer.py +0 -179
- coinex_api/ccxt/static_dependencies/starknet/abi/v1/schemas.py +0 -66
- coinex_api/ccxt/static_dependencies/starknet/abi/v1/shape.py +0 -47
- coinex_api/ccxt/static_dependencies/starknet/abi/v2/__init__.py +0 -2
- coinex_api/ccxt/static_dependencies/starknet/abi/v2/model.py +0 -89
- coinex_api/ccxt/static_dependencies/starknet/abi/v2/parser.py +0 -293
- coinex_api/ccxt/static_dependencies/starknet/abi/v2/parser_transformer.py +0 -192
- coinex_api/ccxt/static_dependencies/starknet/abi/v2/schemas.py +0 -132
- coinex_api/ccxt/static_dependencies/starknet/abi/v2/shape.py +0 -107
- coinex_api/ccxt/static_dependencies/starknet/cairo/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/cairo/data_types.py +0 -123
- coinex_api/ccxt/static_dependencies/starknet/cairo/deprecated_parse/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/cairo/deprecated_parse/cairo_types.py +0 -77
- coinex_api/ccxt/static_dependencies/starknet/cairo/deprecated_parse/parser.py +0 -46
- coinex_api/ccxt/static_dependencies/starknet/cairo/deprecated_parse/parser_transformer.py +0 -138
- coinex_api/ccxt/static_dependencies/starknet/cairo/felt.py +0 -64
- coinex_api/ccxt/static_dependencies/starknet/cairo/type_parser.py +0 -121
- coinex_api/ccxt/static_dependencies/starknet/cairo/v1/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/cairo/v1/type_parser.py +0 -59
- coinex_api/ccxt/static_dependencies/starknet/cairo/v2/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/cairo/v2/type_parser.py +0 -77
- coinex_api/ccxt/static_dependencies/starknet/ccxt_utils.py +0 -7
- coinex_api/ccxt/static_dependencies/starknet/common.py +0 -15
- coinex_api/ccxt/static_dependencies/starknet/constants.py +0 -39
- coinex_api/ccxt/static_dependencies/starknet/hash/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/hash/address.py +0 -79
- coinex_api/ccxt/static_dependencies/starknet/hash/compiled_class_hash_objects.py +0 -111
- coinex_api/ccxt/static_dependencies/starknet/hash/selector.py +0 -16
- coinex_api/ccxt/static_dependencies/starknet/hash/storage.py +0 -12
- coinex_api/ccxt/static_dependencies/starknet/hash/utils.py +0 -78
- coinex_api/ccxt/static_dependencies/starknet/models/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/models/typed_data.py +0 -45
- coinex_api/ccxt/static_dependencies/starknet/serialization/__init__.py +0 -24
- coinex_api/ccxt/static_dependencies/starknet/serialization/_calldata_reader.py +0 -40
- coinex_api/ccxt/static_dependencies/starknet/serialization/_context.py +0 -142
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/__init__.py +0 -10
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/_common.py +0 -82
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/array_serializer.py +0 -43
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/bool_serializer.py +0 -37
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/byte_array_serializer.py +0 -66
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/cairo_data_serializer.py +0 -71
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/enum_serializer.py +0 -71
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/felt_serializer.py +0 -50
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/named_tuple_serializer.py +0 -58
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/option_serializer.py +0 -43
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/output_serializer.py +0 -40
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/payload_serializer.py +0 -72
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/struct_serializer.py +0 -36
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/tuple_serializer.py +0 -36
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/uint256_serializer.py +0 -76
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/uint_serializer.py +0 -100
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/unit_serializer.py +0 -32
- coinex_api/ccxt/static_dependencies/starknet/serialization/errors.py +0 -10
- coinex_api/ccxt/static_dependencies/starknet/serialization/factory.py +0 -229
- coinex_api/ccxt/static_dependencies/starknet/serialization/function_serialization_adapter.py +0 -110
- coinex_api/ccxt/static_dependencies/starknet/serialization/tuple_dataclass.py +0 -59
- coinex_api/ccxt/static_dependencies/starknet/utils/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/utils/constructor_args_translator.py +0 -86
- coinex_api/ccxt/static_dependencies/starknet/utils/iterable.py +0 -13
- coinex_api/ccxt/static_dependencies/starknet/utils/schema.py +0 -13
- coinex_api/ccxt/static_dependencies/starknet/utils/typed_data.py +0 -182
- coinex_api/ccxt/static_dependencies/starkware/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starkware/crypto/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starkware/crypto/fast_pedersen_hash.py +0 -50
- coinex_api/ccxt/static_dependencies/starkware/crypto/math_utils.py +0 -78
- coinex_api/ccxt/static_dependencies/starkware/crypto/signature.py +0 -2344
- coinex_api/ccxt/static_dependencies/starkware/crypto/utils.py +0 -63
- coinex_api/ccxt/static_dependencies/sympy/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/sympy/core/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/sympy/core/intfunc.py +0 -35
- coinex_api/ccxt/static_dependencies/sympy/external/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/sympy/external/gmpy.py +0 -345
- coinex_api/ccxt/static_dependencies/sympy/external/importtools.py +0 -187
- coinex_api/ccxt/static_dependencies/sympy/external/ntheory.py +0 -637
- coinex_api/ccxt/static_dependencies/sympy/external/pythonmpq.py +0 -341
- coinex_api/ccxt/static_dependencies/toolz/__init__.py +0 -26
- coinex_api/ccxt/static_dependencies/toolz/_signatures.py +0 -784
- coinex_api/ccxt/static_dependencies/toolz/_version.py +0 -520
- coinex_api/ccxt/static_dependencies/toolz/compatibility.py +0 -30
- coinex_api/ccxt/static_dependencies/toolz/curried/__init__.py +0 -101
- coinex_api/ccxt/static_dependencies/toolz/curried/exceptions.py +0 -22
- coinex_api/ccxt/static_dependencies/toolz/curried/operator.py +0 -22
- coinex_api/ccxt/static_dependencies/toolz/dicttoolz.py +0 -339
- coinex_api/ccxt/static_dependencies/toolz/functoolz.py +0 -1049
- coinex_api/ccxt/static_dependencies/toolz/itertoolz.py +0 -1057
- coinex_api/ccxt/static_dependencies/toolz/recipes.py +0 -46
- coinex_api/ccxt/static_dependencies/toolz/utils.py +0 -9
- coinex_api/ccxt/static_dependencies/typing_inspect/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/typing_inspect/typing_inspect.py +0 -851
- coinex_api-0.0.7.dist-info/RECORD +0 -288
- {coinex_api-0.0.7.dist-info → coinex_api-0.0.8.dist-info}/WHEEL +0 -0
@@ -1,479 +0,0 @@
|
|
1
|
-
"""Subexpressions that make up a parsed grammar
|
2
|
-
|
3
|
-
These do the parsing.
|
4
|
-
|
5
|
-
"""
|
6
|
-
# TODO: Make sure all symbol refs are local--not class lookups or
|
7
|
-
# anything--for speed. And kill all the dots.
|
8
|
-
|
9
|
-
from inspect import getfullargspec, isfunction, ismethod, ismethoddescriptor
|
10
|
-
import re
|
11
|
-
|
12
|
-
from .exceptions import ParseError, IncompleteParseError
|
13
|
-
from .nodes import Node, RegexNode
|
14
|
-
from .utils import StrAndRepr
|
15
|
-
|
16
|
-
MARKER = object()
|
17
|
-
|
18
|
-
|
19
|
-
def is_callable(value):
|
20
|
-
criteria = [isfunction, ismethod, ismethoddescriptor]
|
21
|
-
return any([criterion(value) for criterion in criteria])
|
22
|
-
|
23
|
-
|
24
|
-
def expression(callable, rule_name, grammar):
|
25
|
-
"""Turn a plain callable into an Expression.
|
26
|
-
|
27
|
-
The callable can be of this simple form::
|
28
|
-
|
29
|
-
def foo(text, pos):
|
30
|
-
'''If this custom expression matches starting at text[pos], return
|
31
|
-
the index where it stops matching. Otherwise, return None.'''
|
32
|
-
if the expression matched:
|
33
|
-
return end_pos
|
34
|
-
|
35
|
-
If there child nodes to return, return a tuple::
|
36
|
-
|
37
|
-
return end_pos, children
|
38
|
-
|
39
|
-
If the expression doesn't match at the given ``pos`` at all... ::
|
40
|
-
|
41
|
-
return None
|
42
|
-
|
43
|
-
If your callable needs to make sub-calls to other rules in the grammar or
|
44
|
-
do error reporting, it can take this form, gaining additional arguments::
|
45
|
-
|
46
|
-
def foo(text, pos, cache, error, grammar):
|
47
|
-
# Call out to other rules:
|
48
|
-
node = grammar['another_rule'].match_core(text, pos, cache, error)
|
49
|
-
...
|
50
|
-
# Return values as above.
|
51
|
-
|
52
|
-
The return value of the callable, if an int or a tuple, will be
|
53
|
-
automatically transmuted into a :class:`~.Node`. If it returns
|
54
|
-
a Node-like class directly, it will be passed through unchanged.
|
55
|
-
|
56
|
-
:arg rule_name: The rule name to attach to the resulting
|
57
|
-
:class:`~.Expression`
|
58
|
-
:arg grammar: The :class:`~.Grammar` this expression will be a
|
59
|
-
part of, to make delegating to other rules possible
|
60
|
-
|
61
|
-
"""
|
62
|
-
|
63
|
-
# Resolve unbound methods; allows grammars to use @staticmethod custom rules
|
64
|
-
# https://stackoverflow.com/questions/41921255/staticmethod-object-is-not-callable
|
65
|
-
if ismethoddescriptor(callable) and hasattr(callable, '__func__'):
|
66
|
-
callable = callable.__func__
|
67
|
-
|
68
|
-
num_args = len(getfullargspec(callable).args)
|
69
|
-
if ismethod(callable):
|
70
|
-
# do not count the first argument (typically 'self') for methods
|
71
|
-
num_args -= 1
|
72
|
-
if num_args == 2:
|
73
|
-
is_simple = True
|
74
|
-
elif num_args == 5:
|
75
|
-
is_simple = False
|
76
|
-
else:
|
77
|
-
raise RuntimeError("Custom rule functions must take either 2 or 5 "
|
78
|
-
"arguments, not %s." % num_args)
|
79
|
-
|
80
|
-
class AdHocExpression(Expression):
|
81
|
-
def _uncached_match(self, text, pos, cache, error):
|
82
|
-
result = (callable(text, pos) if is_simple else
|
83
|
-
callable(text, pos, cache, error, grammar))
|
84
|
-
|
85
|
-
if isinstance(result, int):
|
86
|
-
end, children = result, None
|
87
|
-
elif isinstance(result, tuple):
|
88
|
-
end, children = result
|
89
|
-
else:
|
90
|
-
# Node or None
|
91
|
-
return result
|
92
|
-
return Node(self, text, pos, end, children=children)
|
93
|
-
|
94
|
-
def _as_rhs(self):
|
95
|
-
return '{custom function "%s"}' % callable.__name__
|
96
|
-
|
97
|
-
return AdHocExpression(name=rule_name)
|
98
|
-
|
99
|
-
|
100
|
-
class Expression(StrAndRepr):
|
101
|
-
"""A thing that can be matched against a piece of text"""
|
102
|
-
|
103
|
-
# Slots are about twice as fast as __dict__-based attributes:
|
104
|
-
# http://stackoverflow.com/questions/1336791/dictionary-vs-object-which-is-more-efficient-and-why
|
105
|
-
|
106
|
-
# Top-level expressions--rules--have names. Subexpressions are named ''.
|
107
|
-
__slots__ = ['name', 'identity_tuple']
|
108
|
-
|
109
|
-
def __init__(self, name=''):
|
110
|
-
self.name = name
|
111
|
-
self.identity_tuple = (self.name, )
|
112
|
-
|
113
|
-
def __hash__(self):
|
114
|
-
return hash(self.identity_tuple)
|
115
|
-
|
116
|
-
def __eq__(self, other):
|
117
|
-
return isinstance(other, self.__class__) and self.identity_tuple == other.identity_tuple
|
118
|
-
|
119
|
-
def __ne__(self, other):
|
120
|
-
return not (self == other)
|
121
|
-
|
122
|
-
def parse(self, text, pos=0):
|
123
|
-
"""Return a parse tree of ``text``.
|
124
|
-
|
125
|
-
Raise ``ParseError`` if the expression wasn't satisfied. Raise
|
126
|
-
``IncompleteParseError`` if the expression was satisfied but didn't
|
127
|
-
consume the full string.
|
128
|
-
|
129
|
-
"""
|
130
|
-
node = self.match(text, pos=pos)
|
131
|
-
if node.end < len(text):
|
132
|
-
raise IncompleteParseError(text, node.end, self)
|
133
|
-
return node
|
134
|
-
|
135
|
-
def match(self, text, pos=0):
|
136
|
-
"""Return the parse tree matching this expression at the given
|
137
|
-
position, not necessarily extending all the way to the end of ``text``.
|
138
|
-
|
139
|
-
Raise ``ParseError`` if there is no match there.
|
140
|
-
|
141
|
-
:arg pos: The index at which to start matching
|
142
|
-
|
143
|
-
"""
|
144
|
-
error = ParseError(text)
|
145
|
-
node = self.match_core(text, pos, {}, error)
|
146
|
-
if node is None:
|
147
|
-
raise error
|
148
|
-
return node
|
149
|
-
|
150
|
-
def match_core(self, text, pos, cache, error):
|
151
|
-
"""Internal guts of ``match()``
|
152
|
-
|
153
|
-
This is appropriate to call only from custom rules or Expression
|
154
|
-
subclasses.
|
155
|
-
|
156
|
-
:arg cache: The packrat cache::
|
157
|
-
|
158
|
-
{(oid, pos): Node tree matched by object `oid` at index `pos` ...}
|
159
|
-
|
160
|
-
:arg error: A ParseError instance with ``text`` already filled in but
|
161
|
-
otherwise blank. We update the error reporting info on this object
|
162
|
-
as we go. (Sticking references on an existing instance is faster
|
163
|
-
than allocating a new one for each expression that fails.) We
|
164
|
-
return None rather than raising and catching ParseErrors because
|
165
|
-
catching is slow.
|
166
|
-
|
167
|
-
"""
|
168
|
-
# TODO: Optimize. Probably a hot spot.
|
169
|
-
#
|
170
|
-
# Is there a way of looking up cached stuff that's faster than hashing
|
171
|
-
# this id-pos pair?
|
172
|
-
#
|
173
|
-
# If this is slow, think about the array module. It might (or might
|
174
|
-
# not!) use more RAM, but it'll likely be faster than hashing things
|
175
|
-
# all the time. Also, can we move all the allocs up front?
|
176
|
-
#
|
177
|
-
# To save space, we have lots of choices: (0) Quit caching whole Node
|
178
|
-
# objects. Cache just what you need to reconstitute them. (1) Cache
|
179
|
-
# only the results of entire rules, not subexpressions (probably a
|
180
|
-
# horrible idea for rules that need to backtrack internally a lot). (2)
|
181
|
-
# Age stuff out of the cache somehow. LRU? (3) Cuts.
|
182
|
-
expr_id = id(self)
|
183
|
-
node = cache.get((expr_id, pos), MARKER) # TODO: Change to setdefault to prevent infinite recursion in left-recursive rules.
|
184
|
-
if node is MARKER:
|
185
|
-
node = cache[(expr_id, pos)] = self._uncached_match(text,
|
186
|
-
pos,
|
187
|
-
cache,
|
188
|
-
error)
|
189
|
-
|
190
|
-
# Record progress for error reporting:
|
191
|
-
if node is None and pos >= error.pos and (
|
192
|
-
self.name or getattr(error.expr, 'name', None) is None):
|
193
|
-
# Don't bother reporting on unnamed expressions (unless that's all
|
194
|
-
# we've seen so far), as they're hard to track down for a human.
|
195
|
-
# Perhaps we could include the unnamed subexpressions later as
|
196
|
-
# auxiliary info.
|
197
|
-
error.expr = self
|
198
|
-
error.pos = pos
|
199
|
-
|
200
|
-
return node
|
201
|
-
|
202
|
-
def __str__(self):
|
203
|
-
return u'<%s %s>' % (
|
204
|
-
self.__class__.__name__,
|
205
|
-
self.as_rule())
|
206
|
-
|
207
|
-
def as_rule(self):
|
208
|
-
"""Return the left- and right-hand sides of a rule that represents me.
|
209
|
-
|
210
|
-
Return unicode. If I have no ``name``, omit the left-hand side.
|
211
|
-
|
212
|
-
"""
|
213
|
-
rhs = self._as_rhs().strip()
|
214
|
-
if rhs.startswith('(') and rhs.endswith(')'):
|
215
|
-
rhs = rhs[1:-1]
|
216
|
-
|
217
|
-
return (u'%s = %s' % (self.name, rhs)) if self.name else rhs
|
218
|
-
|
219
|
-
def _unicode_members(self):
|
220
|
-
"""Return an iterable of my unicode-represented children, stopping
|
221
|
-
descent when we hit a named node so the returned value resembles the
|
222
|
-
input rule."""
|
223
|
-
return [(m.name or m._as_rhs()) for m in self.members]
|
224
|
-
|
225
|
-
def _as_rhs(self):
|
226
|
-
"""Return the right-hand side of a rule that represents me.
|
227
|
-
|
228
|
-
Implemented by subclasses.
|
229
|
-
|
230
|
-
"""
|
231
|
-
raise NotImplementedError
|
232
|
-
|
233
|
-
|
234
|
-
class Literal(Expression):
|
235
|
-
"""A string literal
|
236
|
-
|
237
|
-
Use these if you can; they're the fastest.
|
238
|
-
|
239
|
-
"""
|
240
|
-
__slots__ = ['literal']
|
241
|
-
|
242
|
-
def __init__(self, literal, name=''):
|
243
|
-
super(Literal, self).__init__(name)
|
244
|
-
self.literal = literal
|
245
|
-
self.identity_tuple = (name, literal)
|
246
|
-
|
247
|
-
def _uncached_match(self, text, pos, cache, error):
|
248
|
-
if text.startswith(self.literal, pos):
|
249
|
-
return Node(self, text, pos, pos + len(self.literal))
|
250
|
-
|
251
|
-
def _as_rhs(self):
|
252
|
-
return repr(self.literal)
|
253
|
-
|
254
|
-
|
255
|
-
class TokenMatcher(Literal):
|
256
|
-
"""An expression matching a single token of a given type
|
257
|
-
|
258
|
-
This is for use only with TokenGrammars.
|
259
|
-
|
260
|
-
"""
|
261
|
-
def _uncached_match(self, token_list, pos, cache, error):
|
262
|
-
if token_list[pos].type == self.literal:
|
263
|
-
return Node(self, token_list, pos, pos + 1)
|
264
|
-
|
265
|
-
|
266
|
-
class Regex(Expression):
|
267
|
-
"""An expression that matches what a regex does.
|
268
|
-
|
269
|
-
Use these as much as you can and jam as much into each one as you can;
|
270
|
-
they're fast.
|
271
|
-
|
272
|
-
"""
|
273
|
-
__slots__ = ['re']
|
274
|
-
|
275
|
-
def __init__(self, pattern, name='', ignore_case=False, locale=False,
|
276
|
-
multiline=False, dot_all=False, unicode=False, verbose=False, ascii=False):
|
277
|
-
super(Regex, self).__init__(name)
|
278
|
-
self.re = re.compile(pattern, (ignore_case and re.I) |
|
279
|
-
(locale and re.L) |
|
280
|
-
(multiline and re.M) |
|
281
|
-
(dot_all and re.S) |
|
282
|
-
(unicode and re.U) |
|
283
|
-
(verbose and re.X) |
|
284
|
-
(ascii and re.A))
|
285
|
-
self.identity_tuple = (self.name, self.re)
|
286
|
-
|
287
|
-
def _uncached_match(self, text, pos, cache, error):
|
288
|
-
"""Return length of match, ``None`` if no match."""
|
289
|
-
m = self.re.match(text, pos)
|
290
|
-
if m is not None:
|
291
|
-
span = m.span()
|
292
|
-
node = RegexNode(self, text, pos, pos + span[1] - span[0])
|
293
|
-
node.match = m # TODO: A terrible idea for cache size?
|
294
|
-
return node
|
295
|
-
|
296
|
-
def _regex_flags_from_bits(self, bits):
|
297
|
-
"""Return the textual equivalent of numerically encoded regex flags."""
|
298
|
-
flags = 'ilmsuxa'
|
299
|
-
return ''.join(flags[i - 1] if (1 << i) & bits else '' for i in range(1, len(flags) + 1))
|
300
|
-
|
301
|
-
def _as_rhs(self):
|
302
|
-
return '~{!r}{}'.format(self.re.pattern,
|
303
|
-
self._regex_flags_from_bits(self.re.flags))
|
304
|
-
|
305
|
-
|
306
|
-
class Compound(Expression):
|
307
|
-
"""An abstract expression which contains other expressions"""
|
308
|
-
|
309
|
-
__slots__ = ['members']
|
310
|
-
|
311
|
-
def __init__(self, *members, **kwargs):
|
312
|
-
"""``members`` is a sequence of expressions."""
|
313
|
-
super(Compound, self).__init__(kwargs.get('name', ''))
|
314
|
-
self.members = members
|
315
|
-
|
316
|
-
def __hash__(self):
|
317
|
-
# Note we leave members out of the hash computation, since compounds can get added to
|
318
|
-
# sets, then have their members mutated. See RuleVisitor._resolve_refs.
|
319
|
-
# Equality should still work, but we want the rules to go into the correct hash bucket.
|
320
|
-
return hash((self.__class__, self.name))
|
321
|
-
|
322
|
-
def __eq__(self, other):
|
323
|
-
return (
|
324
|
-
isinstance(other, self.__class__) and
|
325
|
-
self.name == other.name and
|
326
|
-
self.members == other.members)
|
327
|
-
|
328
|
-
|
329
|
-
class Sequence(Compound):
|
330
|
-
"""A series of expressions that must match contiguous, ordered pieces of
|
331
|
-
the text
|
332
|
-
|
333
|
-
In other words, it's a concatenation operator: each piece has to match, one
|
334
|
-
after another.
|
335
|
-
|
336
|
-
"""
|
337
|
-
def _uncached_match(self, text, pos, cache, error):
|
338
|
-
new_pos = pos
|
339
|
-
length_of_sequence = 0
|
340
|
-
children = []
|
341
|
-
for m in self.members:
|
342
|
-
node = m.match_core(text, new_pos, cache, error)
|
343
|
-
if node is None:
|
344
|
-
return None
|
345
|
-
children.append(node)
|
346
|
-
length = node.end - node.start
|
347
|
-
new_pos += length
|
348
|
-
length_of_sequence += length
|
349
|
-
# Hooray! We got through all the members!
|
350
|
-
return Node(self, text, pos, pos + length_of_sequence, children)
|
351
|
-
|
352
|
-
def _as_rhs(self):
|
353
|
-
return u'({0})'.format(u' '.join(self._unicode_members()))
|
354
|
-
|
355
|
-
|
356
|
-
class OneOf(Compound):
|
357
|
-
"""A series of expressions, one of which must match
|
358
|
-
|
359
|
-
Expressions are tested in order from first to last. The first to succeed
|
360
|
-
wins.
|
361
|
-
|
362
|
-
"""
|
363
|
-
def _uncached_match(self, text, pos, cache, error):
|
364
|
-
for m in self.members:
|
365
|
-
node = m.match_core(text, pos, cache, error)
|
366
|
-
if node is not None:
|
367
|
-
# Wrap the succeeding child in a node representing the OneOf:
|
368
|
-
return Node(self, text, pos, node.end, children=[node])
|
369
|
-
|
370
|
-
def _as_rhs(self):
|
371
|
-
return u'({0})'.format(u' / '.join(self._unicode_members()))
|
372
|
-
|
373
|
-
|
374
|
-
class Lookahead(Compound):
|
375
|
-
"""An expression which consumes nothing, even if its contained expression
|
376
|
-
succeeds"""
|
377
|
-
|
378
|
-
# TODO: Merge this and Not for better cache hit ratios and less code.
|
379
|
-
# Downside: pretty-printed grammars might be spelled differently than what
|
380
|
-
# went in. That doesn't bother me.
|
381
|
-
|
382
|
-
def _uncached_match(self, text, pos, cache, error):
|
383
|
-
node = self.members[0].match_core(text, pos, cache, error)
|
384
|
-
if node is not None:
|
385
|
-
return Node(self, text, pos, pos)
|
386
|
-
|
387
|
-
def _as_rhs(self):
|
388
|
-
return u'&%s' % self._unicode_members()[0]
|
389
|
-
|
390
|
-
|
391
|
-
class Not(Compound):
|
392
|
-
"""An expression that succeeds only if the expression within it doesn't
|
393
|
-
|
394
|
-
In any case, it never consumes any characters; it's a negative lookahead.
|
395
|
-
|
396
|
-
"""
|
397
|
-
def _uncached_match(self, text, pos, cache, error):
|
398
|
-
# FWIW, the implementation in Parsing Techniques in Figure 15.29 does
|
399
|
-
# not bother to cache NOTs directly.
|
400
|
-
node = self.members[0].match_core(text, pos, cache, error)
|
401
|
-
if node is None:
|
402
|
-
return Node(self, text, pos, pos)
|
403
|
-
|
404
|
-
def _as_rhs(self):
|
405
|
-
# TODO: Make sure this parenthesizes the member properly if it's an OR
|
406
|
-
# or AND.
|
407
|
-
return u'!%s' % self._unicode_members()[0]
|
408
|
-
|
409
|
-
|
410
|
-
# Quantifiers. None of these is strictly necessary, but they're darn handy.
|
411
|
-
|
412
|
-
class Optional(Compound):
|
413
|
-
"""An expression that succeeds whether or not the contained one does
|
414
|
-
|
415
|
-
If the contained expression succeeds, it goes ahead and consumes what it
|
416
|
-
consumes. Otherwise, it consumes nothing.
|
417
|
-
|
418
|
-
"""
|
419
|
-
def _uncached_match(self, text, pos, cache, error):
|
420
|
-
node = self.members[0].match_core(text, pos, cache, error)
|
421
|
-
return (Node(self, text, pos, pos) if node is None else
|
422
|
-
Node(self, text, pos, node.end, children=[node]))
|
423
|
-
|
424
|
-
def _as_rhs(self):
|
425
|
-
return u'%s?' % self._unicode_members()[0]
|
426
|
-
|
427
|
-
|
428
|
-
# TODO: Merge with OneOrMore.
|
429
|
-
class ZeroOrMore(Compound):
|
430
|
-
"""An expression wrapper like the * quantifier in regexes."""
|
431
|
-
|
432
|
-
def _uncached_match(self, text, pos, cache, error):
|
433
|
-
new_pos = pos
|
434
|
-
children = []
|
435
|
-
while True:
|
436
|
-
node = self.members[0].match_core(text, new_pos, cache, error)
|
437
|
-
if node is None or not (node.end - node.start):
|
438
|
-
# Node was None or 0 length. 0 would otherwise loop infinitely.
|
439
|
-
return Node(self, text, pos, new_pos, children)
|
440
|
-
children.append(node)
|
441
|
-
new_pos += node.end - node.start
|
442
|
-
|
443
|
-
def _as_rhs(self):
|
444
|
-
return u'%s*' % self._unicode_members()[0]
|
445
|
-
|
446
|
-
|
447
|
-
class OneOrMore(Compound):
|
448
|
-
"""An expression wrapper like the + quantifier in regexes.
|
449
|
-
|
450
|
-
You can also pass in an alternate minimum to make this behave like "2 or
|
451
|
-
more", "3 or more", etc.
|
452
|
-
|
453
|
-
"""
|
454
|
-
__slots__ = ['min']
|
455
|
-
|
456
|
-
# TODO: Add max. It should probably succeed if there are more than the max
|
457
|
-
# --just not consume them.
|
458
|
-
|
459
|
-
def __init__(self, member, name='', min=1):
|
460
|
-
super(OneOrMore, self).__init__(member, name=name)
|
461
|
-
self.min = min
|
462
|
-
|
463
|
-
def _uncached_match(self, text, pos, cache, error):
|
464
|
-
new_pos = pos
|
465
|
-
children = []
|
466
|
-
while True:
|
467
|
-
node = self.members[0].match_core(text, new_pos, cache, error)
|
468
|
-
if node is None:
|
469
|
-
break
|
470
|
-
children.append(node)
|
471
|
-
length = node.end - node.start
|
472
|
-
if length == 0: # Don't loop infinitely.
|
473
|
-
break
|
474
|
-
new_pos += length
|
475
|
-
if len(children) >= self.min:
|
476
|
-
return Node(self, text, pos, new_pos, children)
|
477
|
-
|
478
|
-
def _as_rhs(self):
|
479
|
-
return u'%s+' % self._unicode_members()[0]
|