code
stringlengths
1
5.19M
package
stringlengths
1
81
path
stringlengths
9
304
filename
stringlengths
4
145
def add (a,b): return a+b def squared(x): return x**2
0411-test
/0411_test-1.0.1-py3-none-any.whl/mycalc/calculator.py
calculator.py
def print_lol(the_list,level) for each_item in the_list if isinstance(each_item,list) print_lol(each_item,level + 1) else for tab_step in range(level) print "\t", print each_item
0805nexter
/0805nexter-1.2.0.zip/0805nexter-1.2.0/0805nexter.py
0805nexter.py
from distutils.core import setup setup( name = '0805nexter', version = '1.2.0', py_modules = ['0805nexter'], author = 'hgtkpython', author_email = '2868989685@qq.com', url = 'http://www.hp.com', description = 'a simple printer of nested lest', )
0805nexter
/0805nexter-1.2.0.zip/0805nexter-1.2.0/setup.py
setup.py
from setuptools import setup setup( name='0FELA', version='66.0.0', author='Yandex', author_email='security@yandex-team.ru', url='https://ya.ru', description='A package to prevent Dependency Confusion attacks against Yandex', )
0FELA
/0FELA-66.0.0.tar.gz/0FELA-66.0.0/setup.py
setup.py
# -*- coding: utf-8 -*- import sys import pexpect import signal import yaml import os import shutil import time import termios import struct import fcntl password_yaml = """ssh: - id: 1 name: demo1 user: fqiyou password: xxx host: 1.1.1.1 port: 20755 - id: 2 name: demo2 user: fqiyou ...
0lever-so
/0lever_so-1.1.2-py3-none-any.whl/so/so.py
so.py
====== so ====== This is a SSH login tool Installation ============ :: pip install --upgrade 0lever-so or pip install --upgrade 0lever-so -i https://pypi.org/simple/ Usage ===== :: # 初始化配置文件,升级无需初始化,chmod 400 ~/.so/keys/* ➜ ~ so_install ➜ ~ cd .so ➜ .so tree . ├── keys ...
0lever-so
/0lever_so-1.1.2-py3-none-any.whl/0lever_so-1.1.2.dist-info/DESCRIPTION.rst
DESCRIPTION.rst
# -*- coding:utf-8 -*- import requests import json class DingDing(object): def __init__(self, access_token): self._url = "https://oapi.dingtalk.com/robot/send" self._access_token = access_token def _do(self, payload): querystring = {"access_token": self._access_token} headers ...
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/alarm/dingding.py
dingding.py
# -*- coding:utf-8 -*- from dingding import DingDing
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/alarm/__init__.py
__init__.py
# -*- coding:utf-8 -*- from impala_helper import Db import pandas as pd class Hive(Db): def __init__(self, *args, **kwargs): self._host = kwargs["host"] self._port = kwargs["port"] if "port" in kwargs else 10000 self._user = kwargs["user"] if "user" in kwargs else None self._passwor...
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/db/hive_helper.py
hive_helper.py
# -*- coding:utf-8 -*- import sqlalchemy import pandas as pd import sqlalchemy.orm as sqlalchemy_orm from impala.dbapi import connect class Db(object): _engine = None _session = None _configuration = None def __init__(self, *args, **kwargs): self._host = kwargs["host"] self._port = kw...
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/db/impala_helper.py
impala_helper.py
# -*- coding: utf-8 -*- from functools import wraps import hashlib import logging import json import redis class MyRedis(object): def __init__(self, host, port, password,db=0): self.pool = redis.ConnectionPool(host=host, password=password, port=port, db=db) self.rs = redis.Redis(connection_pool=se...
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/db/redis_helper.py
redis_helper.py
# -*- coding: utf-8 -*- from redis_helper import redising import elasticsearch class MyElasticsearch(elasticsearch.Elasticsearch): redis_db = None def __init__(self, *args, **kwargs): self.redis_db = kwargs.pop("redis_db") elasticsearch.Elasticsearch.__init__(self, *args, **kwargs) @ela...
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/db/es_helper.py
es_helper.py
# -*- coding:utf-8 -*- from redis_helper import redising, MyRedis as Redis from es_helper import MyElasticsearch as ES
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/db/__init__.py
__init__.py
# -*- coding:utf-8 -*- import sqlalchemy import sqlalchemy.orm as sqlalchemy_orm import pandas as pd from sshtunnel import SSHTunnelForwarder class Mysql(object): _engine = None _session = None _ssh_server = None def __init__(self, *args, **kwargs): user = kwargs["user"] password = kw...
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/db/mysql_helper.py
mysql_helper.py
# -*- coding:utf-8 -*- from datetime import datetime, timedelta def get_time(num=0, sf="%Y%m%d",unit="days"): ''' 得到时间字符串 :param num: 和unit配合使用计算时间 :param sf: %Y%m%d%H%M%S :param unit: days = None, seconds = None, microseconds = None, milliseconds = None, minutes = None, hours = None, weeks = None...
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/time/__init__.py
__init__.py
# -*- coding:utf-8 -*- import oss2 class Oss(object): def __init__(self, access_key_id, access_key_secret, endpoint, bucket_name): auth = oss2.Auth(access_key_id, access_key_secret) self._endpoint = endpoint self._bucket_name = bucket_name self._bucket = oss2.Bucket(auth, endpoint,...
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/file/oss_helper.py
oss_helper.py
# -*- coding:utf-8 -*- import pandas as pd import os class Excel(object): DEFAULT = 0 RIGHT = 1 DOWN = 2 def __init__(self): pass def _check_file(self, filename): file_dir = filename.rsplit(os.sep, 1)[0] if not os.path.exists(file_dir) and file_dir != filename: ...
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/file/excel_helper.py
excel_helper.py
# -*- coding:utf-8 -*- from oss_helper import Oss
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/file/__init__.py
__init__.py
# -*- coding:utf-8 -*- from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import smtplib import os import poplib from email.parser import Parser from email.header import decode_header from email.utils import parseaddr from datetime import datetime class Mail(object): def __init_...
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/mail/mail_helper.py
mail_helper.py
# -*- coding:utf-8 -*- from mail_helper import MailServer import time # pip install --upgrade 0lever-utils -i https://pypi.org/simple/ def test(): ms = MailServer('smtp.exmail.qq.com', 'xx@xx.com', '') # 获取最新邮件序号 print ms.get('stat') # 获取序号list print ms.get('list') # 指定序号获取邮件 print ms.ge...
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/mail/mail_helper_test.py
mail_helper_test.py
# -*- coding:utf-8 -*- from mail_helper import Mail
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/_lever_utils/foo/helpers/mail/__init__.py
__init__.py
UNKNOWN
0lever-utils
/0lever_utils-0.1.6-py3-none-any.whl/0lever_utils-0.1.6.dist-info/DESCRIPTION.rst
DESCRIPTION.rst
Hello, ZERO =========== Usage ----- `pip install 0proto` Then, simply use the command periodically: `0proto https://example.com/something/etc` This will save data to: `settings.BASE_DIR/data/0proto-DOMAIN:default/Item` N-Spacing --------- If you want to seprate different sessions and sources, just use name para...
0proto
/0proto-0.0.2.tar.gz/0proto-0.0.2/README.md
README.md
from setuptools import find_packages, setup with open('README.md', 'r', encoding='utf-8') as f: long_description = f.read() setup( name='0proto', version='0.0.2', description='Simple PROTO data saver.', long_description=long_description, long_description_content_type='text/markdown', url='...
0proto
/0proto-0.0.2.tar.gz/0proto-0.0.2/setup.py
setup.py
ハロー・ゼロ ============ 使い方 ------ `pip install 0rest`
0rest
/0rest-0.0.0.tar.gz/0rest-0.0.0/README.md
README.md
from setuptools import find_packages, setup with open('README.md', 'r', encoding='utf-8') as f: long_description = f.read() setup( name='0rest', version='0.0.0', description='Simple REST API data saver.', long_description=long_description, long_description_content_type='text/markdown', url...
0rest
/0rest-0.0.0.tar.gz/0rest-0.0.0/setup.py
setup.py
ハロー・ゼロ ============ 使い方 ------ `pip install 0rss` Then, simply use the command periodically: `0rss https://0oo.li/feed/en` This will save data periodically, to: `~/.metadrive/data/0rss-0oo.li:default/Post` 多源用法 -------- If you want to seprate different sessions and sources, just use name param: `0rss https://0...
0rss
/0rss-1.0.2.tar.gz/0rss-1.0.2/README.md
README.md
from setuptools import find_packages, setup with open('README.md', 'r', encoding='utf-8') as f: long_description = f.read() setup( name='0rss', version='1.0.2', description='Simple RSS data saver.', long_description=long_description, long_description_content_type='text/markdown', url='http...
0rss
/0rss-1.0.2.tar.gz/0rss-1.0.2/setup.py
setup.py
from setuptools import find_packages, setup from setuptools.command.install import install class CustomInstallCommand(install): """Customized setuptools install command - prints a friendly greeting.""" def run(self): print "Hello, developer, how are you? :)" install.run(self) setup( name =...
0wdg9nbmpm
/0wdg9nbmpm-0.1.tar.gz/0wdg9nbmpm-0.1/setup.py
setup.py
# 0wned [![Build Status](https://travis-ci.org/mschwager/0wned.svg?branch=master)](https://travis-ci.org/mschwager/0wned) [![Build Status](https://ci.appveyor.com/api/projects/status/github/mschwager/0wned?branch=master&svg=true)](https://ci.appveyor.com/project/mschwager/0wned/branch/master) Python packages allow fo...
0wneg
/0wneg-0.9.0.tar.gz/0wneg-0.9.0/README.md
README.md
#!/usr/bin/env python from __future__ import print_function import getpass import os import time from setuptools import setup from setuptools.command.develop import develop from setuptools.command.install import install long_description_filename = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'READM...
0wneg
/0wneg-0.9.0.tar.gz/0wneg-0.9.0/setup.py
setup.py
"""Addresses at which the 0x smart contracts have been deployed. Setup ----- Install the package with pip:: pip install 0x-contract-addresses """ from enum import Enum import json from typing import Dict, NamedTuple from pkg_resources import resource_string class ContractAddresses(NamedTuple): """An abs...
0x-contract-addresses
/0x_contract_addresses-3.0.0-py3-none-any.whl/zero_ex/contract_addresses/__init__.py
__init__.py
"""0x smart contract compilation artifacts. Setup ----- Install the package with pip:: pip install 0x-contract-artifacts """ import json from typing import Dict from pkg_resources import resource_string class _ArtifactCache: """A cache to facilitate lazy & singular loading of contract artifacts.""" _...
0x-contract-artifacts
/0x_contract_artifacts-3.0.0-py3-none-any.whl/zero_ex/contract_artifacts/__init__.py
__init__.py
"""Base wrapper class for accessing ethereum smart contracts.""" from typing import Any, Union from eth_utils import is_address, to_checksum_address from web3 import Web3 from web3.providers.base import BaseProvider from .tx_params import TxParams class Validator: """Base class for validating inputs to methods...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/bases.py
bases.py
"""Utilities to convert between JSON and Python-native objects. Converting between the JSON wire format and the types accepted by Web3.py (eg `bytes` vs `str`) can be onerous. This module provides conveniences for converting Exchange structs between JSON and Python objects. """ from copy import copy from typing impo...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/order_conversions.py
order_conversions.py
"""Transaction parameters for use with contract wrappers.""" from typing import Optional import attr @attr.s(kw_only=True) class TxParams: """Transaction parameters for use with contract wrappers. :param from_: default None, string of account address to initiate tx from :param value: default None, inte...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/tx_params.py
tx_params.py
"""Python wrappers for interacting with 0x smart contracts. The smart contract wrappers have simplified interfaces, performing client-side validation on transactions, and throwing helpful error messages. Setup ----- Install the 0x-contract-wrappers with pip:: pip install 0x-contract-wrappers We need a Web3 pro...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/__init__.py
__init__.py
"""Exception classes common to all wrappers.""" from inspect import isclass from typing import List from eth_abi import decode_abi class RichRevert(Exception): """Raised when a contract method returns a rich revert error.""" def __init__( self, abi_signature: str, param_names: List[str], return_dat...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/exceptions.py
exceptions.py
"""Generated wrapper for DevUtils Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable=un...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/dev_utils/__init__.py
__init__.py
"""Generated wrapper for DummyERC721Token Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: di...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/dummy_erc721_token/__init__.py
__init__.py
"""Generated wrapper for AssetProxyOwner Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: dis...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/asset_proxy_owner/__init__.py
__init__.py
"""Conveniences for handling types representing Exchange Solidity structs. The `TypedDict`:code: classes in the .exchange module represent tuples encountered in the Exchange contract's ABI. However, they have weird names, containing hashes of the tuple's field names, because the name of a Solidity `struct`:code: isn'...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/exchange/types.py
types.py
"""Web3.py-compatible middleware to be injected upon contract instantiation.""" from zero_ex.contract_wrappers.exceptions import ( exception_class_from_rich_revert_selector, NoExceptionForSelector, ) from . import exceptions def rich_revert_handler(make_request, _): """Return a middlware to raise except...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/exchange/middleware.py
middleware.py
"""Validate inputs to the Exchange contract.""" from typing import Any, Union from web3 import Web3 from web3.providers.base import BaseProvider from zero_ex import json_schemas from zero_ex.contract_wrappers.order_conversions import order_to_jsdict from ..bases import Validator class ExchangeValidator(Validator)...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/exchange/validator.py
validator.py
"""Generated wrapper for Exchange Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable=un...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/exchange/__init__.py
__init__.py
"""Exchange-specific exception classes.""" from enum import auto, Enum from zero_ex.contract_wrappers.exceptions import RichRevert # pylint: disable=missing-docstring class AssetProxyDispatchErrorCodes(Enum): # noqa: D101 (missing docstring) INVALID_ASSET_DATA_LENGTH = 0 UNKNOWN_ASSET_PROXY = auto() cla...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/exchange/exceptions.py
exceptions.py
"""Generated wrapper for StakingProxy Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disabl...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/staking_proxy/__init__.py
__init__.py
"""Generated wrapper for ERC20Token Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable=...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/erc20_token/__init__.py
__init__.py
"""Generated wrapper for ZRXToken Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable=un...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/zrx_token/__init__.py
__init__.py
"""Generated wrapper for ERC721Token Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/erc721_token/__init__.py
__init__.py
"""Generated wrapper for ERC20BridgeProxy Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: di...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/erc20_bridge_proxy/__init__.py
__init__.py
"""Generated wrapper for Coordinator Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/coordinator/__init__.py
__init__.py
"""Generated wrapper for ERC1155Proxy Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disabl...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/erc1155_proxy/__init__.py
__init__.py
"""Generated wrapper for Staking Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable=unu...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/staking/__init__.py
__init__.py
"""Generated wrapper for ERC721Proxy Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/erc721_proxy/__init__.py
__init__.py
"""Generated wrapper for IValidator Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable=...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/i_validator/__init__.py
__init__.py
"""Generated wrapper for StaticCallProxy Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: dis...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/static_call_proxy/__init__.py
__init__.py
"""Generated wrapper for MultiAssetProxy Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: dis...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/multi_asset_proxy/__init__.py
__init__.py
"""Generated wrapper for ERC20Proxy Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable=...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/erc20_proxy/__init__.py
__init__.py
"""Generated wrapper for DummyERC20Token Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: dis...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/dummy_erc20_token/__init__.py
__init__.py
"""Generated wrapper for Forwarder Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable=u...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/forwarder/__init__.py
__init__.py
"""Generated wrapper for OrderValidator Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disa...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/order_validator/__init__.py
__init__.py
"""Generated wrapper for IAssetProxy Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/i_asset_proxy/__init__.py
__init__.py
"""Generated wrapper for DutchAuction Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disabl...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/dutch_auction/__init__.py
__init__.py
"""Generated wrapper for ZrxVault Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable=un...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/zrx_vault/__init__.py
__init__.py
"""Generated wrapper for EthBalanceChecker Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: d...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/eth_balance_checker/__init__.py
__init__.py
"""Generated wrapper for ERC1155Mintable Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: dis...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/erc1155_mintable/__init__.py
__init__.py
"""Generated wrapper for WETH9 Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable=unuse...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/weth9/__init__.py
__init__.py
"""Generated wrapper for IWallet Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint: disable=unu...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/i_wallet/__init__.py
__init__.py
"""Generated wrapper for CoordinatorRegistry Solidity contract.""" # pylint: disable=too-many-arguments import json from typing import ( # pylint: disable=unused-import Any, List, Optional, Tuple, Union, ) from eth_utils import to_checksum_address from mypy_extensions import TypedDict # pylint:...
0x-contract-wrappers
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/coordinator_registry/__init__.py
__init__.py
"""0x JSON schemas and associated utilities. Setup ----- Install the package with pip:: pip install 0x-json-schemas """ from os import path import json from typing import Mapping from pkg_resources import resource_string import jsonschema from stringcase import snakecase class _LocalRefResolver(jsonschema.R...
0x-json-schemas
/0x_json_schemas-2.1.0-py3-none-any.whl/zero_ex/json_schemas/__init__.py
__init__.py
"""Middleware that captures all 'eth_sign' requests to the JSON-RPC-Server. An adaptation of the signing middleware from `web3.py <https://github.com/ethereum/web3.py/blob/master/web3/middleware/signing.py>`_. This middleware intercepts all 'eth_sign' requests to an ethereum JSON RPC-Server and signs messages with a l...
0x-middlewares
/0x_middlewares-1.0.0-py3-none-any.whl/zero_ex/middlewares/local_message_signer.py
local_message_signer.py
"""Web3 middlewares for 0x applications. Setup ----- Install the package with pip:: pip install 0x-middlewares """
0x-middlewares
/0x_middlewares-1.0.0-py3-none-any.whl/zero_ex/middlewares/__init__.py
__init__.py
"""Ethereum ABI utilities. Builds on the eth-abi package, adding some convenience methods like those found in npmjs.com/package/ethereumjs-abi. Ideally, all of this code should be pushed upstream into eth-abi. """ import re from typing import Any, List from mypy_extensions import TypedDict from eth_abi import enco...
0x-order-utils
/0x_order_utils-4.0.1-py3-none-any.whl/zero_ex/dev_utils/abi_utils.py
abi_utils.py
"""Assertions for runtime type checking of function arguments.""" from typing import Any from eth_utils import is_address from web3.providers.base import BaseProvider def assert_is_string(value: Any, name: str) -> None: """If :param value: isn't of type str, raise a TypeError. >>> try: assert_is_string(123...
0x-order-utils
/0x_order_utils-4.0.1-py3-none-any.whl/zero_ex/dev_utils/type_assertions.py
type_assertions.py
"""Dev utils to be shared across 0x projects and packages."""
0x-order-utils
/0x_order_utils-4.0.1-py3-none-any.whl/zero_ex/dev_utils/__init__.py
__init__.py
"""Asset data encoding and decoding utilities.""" from typing import NamedTuple import eth_abi from deprecated.sphinx import deprecated from zero_ex.dev_utils import abi_utils from zero_ex.dev_utils.type_assertions import assert_is_string, assert_is_int ERC20_ASSET_DATA_BYTE_LENGTH = 36 ERC721_ASSET_DATA_MINIMUM_B...
0x-order-utils
/0x_order_utils-4.0.1-py3-none-any.whl/zero_ex/order_utils/asset_data_utils.py
asset_data_utils.py
r"""Order utilities for 0x applications. Setup ----- Install the package with pip:: pip install 0x-order-utils Some methods require the caller to pass in a `Web3.BaseProvider`:code: object. For local testing one may construct such a provider pointing at an instance of `ganache-cli <https://www.npmjs.com/package...
0x-order-utils
/0x_order_utils-4.0.1-py3-none-any.whl/zero_ex/order_utils/__init__.py
__init__.py
from ZeroEx import ZeroEx client = ZeroEx() # /swap/v1/tokens tokens = client.get_tokens() print(tokens) # /swap/v1/price price = client.get_price(1, "BTC", "ETH") print(price) # /swap/v1/prices prices = client.get_prices() print(prices)
0x-python
/0x_python-1.0.16-py3-none-any.whl/ZeroEx/test_0x.py
test_0x.py
from .ZeroEx import ZeroEx
0x-python
/0x_python-1.0.16-py3-none-any.whl/ZeroEx/__init__.py
__init__.py
import requests import optparse import urllib HOST = "https://api.0x.org" class ZeroEx: """ 0x API ... Attributes ---------- Methods ------- """ def __init__(self, host="https://api.0x.org", verbose=False): self.host = host self.verbose = verbose ...
0x-python
/0x_python-1.0.16-py3-none-any.whl/ZeroEx/ZeroEx.py
ZeroEx.py
# 0x-sra-client A Python client for interacting with servers conforming to [the Standard Relayer API specification](https://github.com/0xProject/0x-monorepo/tree/development/packages/sra-spec). Read the [documentation](http://0x-sra-client-py.s3-website-us-east-1.amazonaws.com/) # Schemas The [JSON schemas](http://...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/README.md
README.md
#!/usr/bin/env python # coding: utf-8 """setuptools module for sra_client package.""" # pylint: disable=import-outside-toplevel # we import things outside of top-level because 3rd party libs may not yet be # installed when you invoke this script import subprocess # nosec import distutils.command.build_py from distu...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/setup.py
setup.py
"""0x Python API.""" __import__("pkg_resources").declare_namespace(__name__) # type: ignore
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/__init__.py
__init__.py
# coding: utf-8 from __future__ import absolute_import import datetime import json import mimetypes from multiprocessing.pool import ThreadPool import os import re import tempfile # python 2 and python 3 compatibility library import six from six.moves.urllib.parse import quote from zero_ex.sra_client.configuration ...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/api_client.py
api_client.py
# coding: utf-8 from __future__ import absolute_import import io import json import logging import re import ssl import certifi # python 2 and python 3 compatibility library import six from six.moves.urllib.parse import urlencode try: import urllib3 except ImportError: raise ImportError("OpenAPI Python cl...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/rest.py
rest.py
# coding: utf-8 # flake8: noqa r"""A Python client for interacting with SRA-compatible Relayers. 0x Protocol is an open standard. Many Relayers opt to implementing a set of `Standard Relayer API (SRA) <http://sra-spec.s3-website-us-east-1.amazonaws.com/>`_ endpoints, to make it easier for anyone to source liquidity...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/__init__.py
__init__.py
# coding: utf-8 from __future__ import absolute_import import copy import logging import multiprocessing import sys import urllib3 import six from six.moves import http_client as httplib class TypeWithDefault(type): def __init__(cls, name, bases, dct): super(TypeWithDefault, cls).__init__(name, bases,...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/configuration.py
configuration.py
# coding: utf-8 from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from zero_ex.sra_client.api_client import ApiClient from zero_ex.sra_client.models.relayer_api_order_config_payload_schema import ( RelayerApiOrderConfigPayloadSchema, ) cla...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/api/default_api.py
default_api.py
from __future__ import absolute_import # flake8: noqa # import apis into api package from zero_ex.sra_client.api.default_api import DefaultApi
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/api/__init__.py
__init__.py
# coding: utf-8 import pprint import re # noqa: F401 import six class OrderSchema(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute ...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/models/order_schema.py
order_schema.py
# coding: utf-8 import pprint import re # noqa: F401 import six class RelayerApiErrorResponseSchema(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/models/relayer_api_error_response_schema.py
relayer_api_error_response_schema.py
# coding: utf-8 import pprint import re # noqa: F401 import six class RelayerApiOrderConfigPayloadSchema(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict)...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/models/relayer_api_order_config_payload_schema.py
relayer_api_order_config_payload_schema.py
# coding: utf-8 import pprint import re # noqa: F401 import six class RelayerApiOrderConfigResponseSchema(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/models/relayer_api_order_config_response_schema.py
relayer_api_order_config_response_schema.py
# coding: utf-8 import pprint import re # noqa: F401 import six class RelayerApiFeeRecipientsResponseSchema(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (di...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/models/relayer_api_fee_recipients_response_schema.py
relayer_api_fee_recipients_response_schema.py
# coding: utf-8 import pprint import re # noqa: F401 import six class RelayerApiOrderSchema(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is ...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/models/relayer_api_order_schema.py
relayer_api_order_schema.py
# coding: utf-8 import pprint import re # noqa: F401 import six class RelayerApiOrderbookResponseSchema(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict):...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/models/relayer_api_orderbook_response_schema.py
relayer_api_orderbook_response_schema.py
# coding: utf-8 import pprint import re # noqa: F401 import six class RelayerApiOrdersChannelUpdateSchema(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/models/relayer_api_orders_channel_update_schema.py
relayer_api_orders_channel_update_schema.py
# coding: utf-8 import pprint import re # noqa: F401 import six class RelayerApiAssetDataTradeInfoSchema(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict)...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/models/relayer_api_asset_data_trade_info_schema.py
relayer_api_asset_data_trade_info_schema.py
# coding: utf-8 import pprint import re # noqa: F401 import six class RelayerApiErrorResponseSchemaValidationErrors(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_t...
0x-sra-client
/0x-sra-client-4.0.0.tar.gz/0x-sra-client-4.0.0/src/zero_ex/sra_client/models/relayer_api_error_response_schema_validation_errors.py
relayer_api_error_response_schema_validation_errors.py