Saravanan666/pypi-org huggingface dataset:
Package: ethers
ethers-pyPython library for interacting with the Ethereum Blockchain and bindings for the greatethers-rsUsage/ExamplesUntilwheels for pypi are availableyou need toinstall the rust toolchainand then run:pipinstallgit+https://github.com/elyase/ethers-pyGetting startedfromethers.providersimportHTTPProviderprovider=HTTPProvider("https://mainnet.infura.io/v3/your_infura_id")block_number=awaitprovider.get_block_number()# 14429070DocumentationDocumentationFeaturesEthereum JSON-RPC ClientInteracting and deploying smart contractsType safe smart contract bindings code generationQuerying past eventsEvent monitoring asStreamsENS as a first class citizenCelo supportPolygon supportAvalanche supportWebsockets /eth_subscribeHardware Wallet SupportParity APIs (tracing,parity_blockWithReceipts)Geth TxPool APIWASM Bindings (see note)FFI Bindings (see note)CLI for common operations
Package: etherscan
Etherscan.io API wrapperAn Etherscan.io API wrapper, for Python.With a default cache supported byrequests-cacheInstallationpip3 install etherscanUsageimportetherscanes=etherscan.Client(api_key='YOUR_API_KEY',cache_expire_after=5,)eth_price=es.get_eth_price()eth_supply=es.get_eth_supply()eth_balance=es.get_eth_balance('0x39eB410144784010b84B076087B073889411F878')eth_balances=es.get_eth_balances(['0x39eB410144784010b84B076087B073889411F878','0x39eB410144784010b84B076087B073889411F879',])gas_price=es.get_gas_price()block=es.get_block_by_number(block_number=12345)transactions=es.get_transactions_by_address('0x39eB410144784010b84B076087B073889411F878')token_transations=es.get_token_transactions(contract_address='0xEF68e7C694F40c8202821eDF525dE3782458639f',address='0xEF68e7C694F40c8202821eDF525dE3782458639f',)
Package: etherscan2
Etherscan.io API wrapperAn Etherscan.io API wrapper, for Python.With a default cache supported byrequests-cacheInstallationpip3 install etherscanUsageimportetherscanes=etherscan.Client(api_key='YOUR_API_KEY',cache_expire_after=5,)eth_price=es.get_eth_price()eth_supply=es.get_eth_supply()eth_balance=es.get_eth_balance('0x39eB410144784010b84B076087B073889411F878')eth_balances=es.get_eth_balances(['0x39eB410144784010b84B076087B073889411F878','0x39eB410144784010b84B076087B073889411F879',])gas_price=es.get_gas_price()block=es.get_block_by_number(block_number=12345)transactions=es.get_transactions_by_address('0x39eB410144784010b84B076087B073889411F878')token_transations=es.get_token_transactions(contract_address='0xEF68e7C694F40c8202821eDF525dE3782458639f',address='0xEF68e7C694F40c8202821eDF525dE3782458639f',)
Package: etherscan-api
etherscan-api moduleEtherScan.io API python bindingsDescriptionThis module is written as an effort to provide python bindings to the EtherScan.io API, which can be found at:https://etherscan.io/apis. If you are interacting with a contract on the Ropsten Testnet please usehttps://ropsten.etherscan.io/apis.
In order to use this, you must attain an Etherscan user account, and generate an API key.In order to use the API, you must provide an API key at runtime, which can be found at the Etherscan.io API website.
If you'd like to use the provided examples without altering them, then the JSON fileapi_key.jsonmust be stored in
the base directory. Its format is as follows:{ "key" : "YourApiKeyToken" }withYourApiKeyTokenis your provided API key token from EtherScan.ioInstallationTo install the package to your computer, simply run the following command in the base directory:python3 -m pip install py-etherscan-apiAvailable bindingsCurrently, only the following Etherscan.io API modules are available:accountscontractsstatstokensproxiesblockstransactionsLogsGas TrackerThe remaining available modules provided by Etherscan.io will be added eventually...Available NetworksCurrently, this works for the following networks:MainnetRopsten
Package: etherscanlabel
An out-of-the-box etherscan label crawler, get account labels from etherscan.io eaisly.Installationpip install etherscanlabelUsageetherscanlabel crawl <labelcategory> --header=<file-path>
etherscanlabel -h | --helpExamplesetherscanlabel crawl Binance --header /path/to/header.jsonContents of requirements.txtbeautifulsoup4==4.11.1
docopt==0.6.2
notiondict==0.1.1
pandas>=1.1.5
requests>=2.27.1
setuptools>=59.6.0
tqdm==4.64.1Config fileYou must attach your header file, you can find an example file here:https://github.com/PixelHegel/Etherscan-Label-Crawler/blob/main/header_sample.json
Package: etherscan-py
Powerful Python wrapper over Etherscan API for data collection.DescriptionThe Etherscan API has various inconsistencies between the endpoints such as encoding of values (hex vs base10) as well as the structure of data returned. This module simplifies and standardizes the structure of data that gets returned from Etherscan, as well as provides performance improvements such as parallelization in queries.InstallationTo install the package, simply run the following command:pip install etherscan_pyUsageTo use the package, initialize a client with your Etherscan API key.from etherscan_py import etherscan_py
client = etherscan_py.Client(YOUR_API_KEY)Data StructuresThe basic Etherscan Event data structure.class EtherscanEvent:
    address: string
    topics: [string]
    data: string
    block_height: int
    timestamp: int
    gas_price: int
    gas_used: int
    logindex: int
    txhash: stringThe basic Etherscan Event data structure, with additional information from the associated transaction that caused the event to be emitted.class EnrichedEvent(EtherscanEvent):
    address: string
    topics: [string]
    data: string
    block_height: int
    timestamp: int
    gas_price: int
    gas_used: int
    logindex: int
    txhash: string
    from_address: string
    to_address: string
    tx_input: string
    nonce: int
    position_in_block: int
    value: intThe basic Etherscan Transaction data structure.class EtherscanTransaction:
    txhash: string
    block_height: int
    timestamp: int
    nonce: int
    from_address: string
    to_address: string
    value: int
    gas_price: int
    tx_input: string
    position_in_block: int
    is_error: boolMethodsThese are the supported methods:get_eth_price().. code-block:>>> client.get_eth_price()
>>> 229.16get_latest_block_height().. code-block:>>> client.get_latest_block_height()
>>> 10309928get_first_tx_block(address).. code-block:>>> client.get_first_tx_block('0x27054b13b1B798B345b591a4d22e6562d47eA75a')
>>> 4352086get_tx_by_hash(txhash).. code-block:>>> res = client.get_tx_by_hash('0xb8b56002413bb6b8a0fbf7f986715a297d678ecfc4fdcd0b37d9a88048e5c68e')
>>> res.txhash
>>> '0xb8b56002413bb6b8a0fbf7f986715a297d678ecfc4fdcd0b37d9a88048e5c68e'get_all_events(address, topic, enriched_data=False, from_block=0,to_block='latest',thread_count=1)>>> res = client.get_all_events(
    address = '0x51c72befae54d365a9d0c08c486aee4f99285e08',
    topic = '0x56f54e5e291f84831023c9ddf34fe42973dae320af11193db2b5f7af27719ba6'
)
>>> len(res)
>>> 72get_all_transactions(from_address, status,to_address='',fn_signature='',from_block=0,to_block='latest',thread_count=1)status is either 0,1 or 2.0: Failed
   1: Successful
   2: Both


fn_signature is the first 10-characters of a tx's input_data>>> res = client.get_all_transactions(
    from_address = '0x274CeA454c35b6bB3fE07377E719e45dF9E3Cac6',
    status = 2,
    to_address = '0x51c72befae54d365a9d0c08c486aee4f99285e08'
)
>>> len(res)
>>> 14
Package: etherscan-shady
Etherscan_APIclass GetResult: must get Ethereum address and API key Etherscanget_eth_balance: return balance Ethereum addressget_erc20_balance: return balance ERC20 token Ethereum addressget_erc721_balance: must get provider_urlget_erc721_balance: return url for NFT imagesDonateBTC - 1J18ggoGFnbhAGg66aGScXTEJbk7S5Xu6SETH - 0x3AA1a0dAfC77Ea0fb28b84F1065565Ac25e82a94
Package: ether-sql
ether_sqlA Python library to push ethereum blockchain data into an sql database.ether_sql was built byAnalyse
Ether, with the goal of making
Ethereum data easily available to everyone. This library can be used as
a backbone for creating block explorers or performing data analysis.It is written in Python 3.5+, usesweb3.pyfor geting data using
JSON-RPC calls and usesSqlAlchemyto connect to a
postgressql database.Buidl StatusThis is currently in very alpha stage, and not recommended for
production use until it has received sufficient testing. Currently
supports Geth, Infura and Parity node, but transaction traces (eg.
internal transactions) are currently available only with Parity node.Documentation available at:http://ether-sql.readthedocs.ioInstallation guidePlease find the detailed installation guidehereCommand line optionsether_sql has several built in cli commands to facilitate scraping
data.Syncing the dataTo start the sync just type.$ ether_sql scrape_block_rangeThis will start start pushing the data from an Infura node to the psql
database.Switching nodesTo switch nodes use the settings flag:$ ether_sql--settings='PersonalParitySettings'scrape_block_rangeUsing multiple workers to sync dataTo start 4 parallel workers use.$ ether_sql--settings=YourSettingscelery start-c4The above command will start 4 workers using the settingsYourSettingsThen start the sync, which will automatically use the
setting used to start workers.$ ether_sql scrape_block_rangeHere is a demo of the process:https://www.youtube.com/watch?v=rnkfyAgGJwI&feature=youtu.beExporting as csvTo export the pushed data as a csv$ ether_sql sql export_to_csvTo access other Command Line Interfaces (CLI) checkout thecli
docs.
Package: etherunit
etherunitEtherium unit conversation and arithmetic libraryInstallpipinstall-uetherunitUsage>>>frometherunitimportEther,Gwei,Wei,ECreate a new quantity with unitsYou can create a new quatity like this>>>Ether(".05")0.05ether>>>Gwei(".05")0.05gwei>>>Wei("5")5weiOr you can use the helper function E() to create a new quantity>>>E(".05 eth")0.05ether>>>E(".05 gwei")0.05gwei>>>E("5 wei")5weiArithmetic operationsDifferent quatities can be added together without any problems>>>E(".05 eth")+E("2 gwei")==E("0.050000002 eth")TrueThis also applies for subtraction>>>E(".05 eth")-E("2 gwei")==E("0.049999998 eth")TrueYou can also multiply quanities with other integers>>>E(".05 eth")*20.1ether... but not with other quatities>>>E(".05 eth")*E("2 gwei")# type: ignoreAssertionError:2gweiisnotanintegerYou also can't multiply quatities with other integers, like floats. Why? Because it can result with fractional wei, which is not allowed>>>E(".05 eth")*1.5AssertionError:1.5isnotanintegerYou can divide quatities with other integers, the result is always a quatity>>>E(".05 eth")/20.025etherAnd you can divide quatities with other quatities, the result is always an integer>>>E("10 eth")/E("3 eth")3You can find the remainder of a division with mod operator (%)>>>E("10 eth")%E("3 eth")1etherYou can also use divmod() to get both the quotient and the remainder>>>divmod(E("10 eth"),E("3 eth"))(3,1ether)ConversionYou can convert a quatity to another quatity, though it's not necessary for arithmetic operations>>>E("10 eth").gwei10000000000gwei>>>E("10 eth").wei10000000000000000000wei>>>(E("10 eth")%E("3 eth")).wei1000000000000000000wei>>>E("10 eth").wei.eth.eth.eth.eth.gwei.wei.wei.wei# :D10000000000000000000wei
Package: eth-event
eth-eventTools for Ethereum event decoding and topic generation.InstallationYou can install the latest release viapip:pipinstalleth-eventOr clone the repository and usesetuptoolsfor the most up-to-date version:gitclonehttps://github.com/iamdefinitelyahuman/eth-event.gitcdeth-event
python3setup.pyinstallUsageThe public API is well documented within the docstrings. The following example may also help:>>>frometh_eventimportget_topic_map# generating a topic map>>>abi=open('abi.json').read()>>>topic_map=get_topic_map(abi)>>>topic_map{'0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef':{'name':'Transfer','inputs':[{'name':'from','type':'address','indexed':True},{'name':'to','type':'address','indexed':True},{'name':'value','type':'uint256','indexed':False}]}}# decoding event logs from a transaction receipt>>>tx=token.transfer(account[1],100,{'from':account[0]})<Transactionobject'0x615a157e84715d5f960a38fe2a3ddb566c8393cfc71f15b06170a0eff74dfdde'>>>>eth_event.decode_logs(tx.logs,topic_map)[{'name':'Transfer','address':"0x3194cBDC3dbcd3E11a07892e7bA5c3394048Cc87",'data':[{'name':'from','type':'address','value':'0xbd4940951bfa463f8fb6db762e55686f6cfdb73a','decoded':True},{'name':'to','type':'address','value':'0xbd4940951bfa463f8fb6db762e55686f6cfdb73a','decoded':True},{'name':'tokens','type':'uint256','value':100,'decoded':True}],'logIndex':0,'blockNumber':0,'transactionIndex':0}]# decoding a structLog from Geth's debug_traceTransaction endpoint>>>trace=web3.provider.make_request("debug_traceTransaction",['0x615a157e84715d5f960a38fe2a3ddb566c8393cfc71f15b06170a0eff74dfdde',{}])>>>struct_log=trace['result']['structLogs']>>>eth_event.decode_trace(struct_log,topic_map,initial_address="0x3194cBDC3dbcd3E11a07892e7bA5c3394048Cc87")[{'name':'Transfer','address':"0x3194cBDC3dbcd3E11a07892e7bA5c3394048Cc87",'data':[{'name':'from','type':'address','value':'0xbd4940951bfa463f8fb6db762e55686f6cfdb73a','decoded':True},{'name':'to','type':'address','value':'0xbd4940951bfa463f8fb6db762e55686f6cfdb73a','decoded':True},{'name':'tokens','type':'uint256','value':100,'decoded':True}],}]LimitationsIf an array is indexed in an event, the topic is generated as a sha3 hash and so cannot be decoded. In this case, the undecoded topic is returned anddecodedis set toFalse.Anonymous events cannot be decoded. Use theallow_undecodedkwarg when callingdecode_logsanddecode_traceto receive the undecoded log without raising an exception.When decoding a trace, the initial address for the call cannot be determined. To include addresses where decoded events were emitted you must supply the initial address with theinitial_addresskeyword argument.TestsTo run the test suite:$toxDevelopmentThis project is still in development. Comments, questions, criticisms and pull requests are welcomed.LicenseThis project is licensed under theMIT license.
Package: ethfinex-python
ethfinex-pythonThe unofficial Python client for theEthfinexandEthfinex TrustlessAPIs.Provided under MIT License by Shane Fontaine.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.I am in no way affiliated with or funded by Ethfinex, Ethfinex Trustless, Ethfinex Inc., Bitfinex, iFinex Inc., Tether, Tether Limited, or any subsidiaries or affiliates of any of the previously mentioned entities.FunctionalityA simple to use Python wrapper for both public and authenticated endpoints.Easy trading directly against Ethfinex Trustless, Bitfinex and Ethfinex orderbooksSimple parsing of data returned from the Ethfinex APIUnder DevelopmentBetter error handlingTestsGetting StartedThis README is documentation on the syntax of the python client presented in this repository. See function docstrings for full syntax details.
This API attempts to present a clean interface to Ethfinex, but in order to use it to its full potential, you must familiarize yourself with the official Ethfinex documentation.https://www.ethfinex.com/api_docsYou may manually install the project or use pip:pipinstallethfinex-python# orpipinstallgit+git://github.com/shanefontaine/ethfinex-python.gitPublic ClientOnly some endpoints in the API are available to everyone. The public endpoints can be reached using PublicClientimportethfinexpublic_client=ethfinex.PublicClient()PublicClient Methodsget_platform_statuspublic_client.get_platform_status()get_ticker# Get the ticker for a specific pair.public_client.get_ticker('tBTCUSD')get_trades# Get the trades for a specific pairpublic_client.get_trades('tBTCUSD')# To include a start and end timepublic_client.get_trades('tBTCUSD',start=1514764800000,end=1514765700000)# To reverse the order that data is delivered (old to new)public_client.get_trades('tBTCUSD',start=1514764800000,end=1514765700000,sort=1)get_books# Get the books for a specific pairpublic_client.get_books('tBTCUSD')# To get more or less granular precisionpublic_client.get_books('tBTCUSD',precision='P1')get_stats# Get the stats for a specific pairpublic_client.get_stats('tBTCUSD','funding.size','long','hist')# To reverse the order that data is delivered (old to new)public_client.get_stats('tBTCUSD','funding.size','long','hist',sort=1)get_candles# Get the candles for a specific pairpublic_client.get_candles('tBTCUSD','1m','hist')# To include a start and end timepublic_client.get_candles('tBTCUSD','1m','hist',start=1514764800000,end=1514765700000)TestingUnit tests are under development using the pytest framework. Contributions are welcome!To run the full test suite, in the project directory run:python -m pytestChangelog0.1.2Major README update0.1.1Add CIAddpublic_clienttests0.1.0Fully functional public client.0.0.1Original PyPI release.
Package: eth-hash
eth-hashThe Ethereum hashing function, keccak256, sometimes (erroneously) called sha3Note: the similarly namedpyethashhas a completely different use: it generates proofs of work.This is a low-level library, intended to be used internally by other Ethereum tools.
If you're looking for a convenient hashing tool, check outeth_utils.keccak()which will be a little friendlier, and provide access to other helpful utilities.Read more in thedocumentation on ReadTheDocs.View the change log.Quickstartpython-mpipinstall"eth-hash[pycryptodome]">>>frometh_hash.autoimportkeccak>>>keccak(b'')b"\xc5\xd2F\x01\x86\xf7#<\x92~}\xb2\xdc\xc7\x03\xc0\xe5\x00\xb6S\xca\x82';{\xfa\xd8\x04]\x85\xa4p"See thedocsfor more about choosing and installing backends.Developer SetupIf you would like to hack on eth-hash, please check out theSnake Charmers
Tactical Manualfor information on how we do:TestingPull RequestsDocumentationWe usepre-committo maintain consistent code style. Once
installed, it will run automatically with every commit. You can also run it manually
withmake lint. If you need to make a commit that skips thepre-commitchecks, you
can do so withgit commit --no-verify.Development Environment SetupYou can set up your dev environment with:gitclonegit@github.com:ethereum/eth-hash.gitcdeth-hash
python-mvirtualenvvenv
.venv/bin/activate
python-mpipinstall-e".[dev]"pre-commitinstallRelease setupTo release a new version:makereleasebump=$$VERSION_PART_TO_BUMP$$How to bumpversionThe version format for this repo is{major}.{minor}.{patch}for stable, and{major}.{minor}.{patch}-{stage}.{devnum}for unstable (stagecan be alpha or beta).To issue the next version in line, specify which part to bump,
likemake release bump=minorormake release bump=devnum. This is typically done from the
master branch, except when releasing a beta (in which case the beta is released from master,
and the previous stable branch is released from said branch).If you are in a beta version,make release bump=stagewill switch to a stable.To issue an unstable version when the current version is stable, specify the
new version explicitly, likemake release bump="--new-version 4.0.0-alpha.1 devnum"
Package: eth-hash-qtum
eth-hashThe Ethereum hashing function, keccak256, sometimes (erroneously) called sha3Note: the similarly namedpyethashhas a completely different use: it generates proofs of work.This is a low-level library, intended to be used internally by other Ethereum tools.
If you're looking for a convenient hashing tool, check outeth_utils.keccak()which will be a little friendlier, and provide access to other helpful utilities.Read more in thedocumentation on ReadTheDocs.View the change log.Quickstartpipinstalleth-hash-qtum[pycryptodomex]>>>frometh_hash.autoimportkeccak>>>keccak(b'')b"\xc5\xd2F\x01\x86\xf7#<\x92~}\xb2\xdc\xc7\x03\xc0\xe5\x00\xb6S\xca\x82';{\xfa\xd8\x04]\x85\xa4p"See thedocsfor more about choosing and installing backends.Developer setupIf you would like to hack on eth-hash, please check out theEthereum Development Tactical Manualfor information on how we do:TestingPull RequestsCode StyleDocumentationDevelopment Environment SetupYou can set up your dev environment with:gitclonegit@github.com/qtumproject/eth-hash.gitcdeth-hash
virtualenv-ppython3venv
.venv/bin/activate
pipinstall-e.[dev]Testing SetupDuring development, you might like to have tests run on every file save.Show flake8 errors on file change:# Test flake8when-changed-v-s-r-1eth_hash/tests/-c"clear; flake8 eth_hash tests && echo 'flake8 success' || echo 'error'"Run multi-process tests in one command, but without color:# in the project root:pytest--numprocesses=4--looponfail--maxfail=1# the same thing, succinctly:pytest-n4-f--maxfail=1Run in one thread, with color and desktop notifications:cdvenv
ptw--onfail"notify-send -t 5000 'Test failure ⚠⚠⚠⚠⚠' 'python 3 test on eth-hash failed'"../tests../eth_hashRelease setupFor Debian-like systems:apt install pandocTo release a new version:makereleasebump=$$VERSION_PART_TO_BUMP$$How to bumpversionThe version format for this repo is{major}.{minor}.{patch}for stable, and{major}.{minor}.{patch}-{stage}.{devnum}for unstable (stagecan be alpha or beta).To issue the next version in line, specify which part to bump,
likemake release bump=minorormake release bump=devnum.If you are in a beta version,make release bump=stagewill switch to a stable.To issue an unstable version when the current version is stable, specify the
new version explicitly, likemake release bump="--new-version 4.0.0-alpha.1 devnum"
Package: ethhelper
ETHHelperAsynchronous Geth node connection encapsulation based on httpx, websockets and web3.py. Geth node and Ethereum type extension based on pydantic.Quickstart seethis.中文| EnglishUsagepypiIf you prefer to use pypi to install this package, you can just run the following command:pipinstallethhelpergitThe project is managed by poetry. If you prefer to use git to install this package, you can use poetry to directly add a reference to the project's build package through git.The command is as follow:poetryaddgit+ssh://git@github.com:XiaoHuiHui233/ETHHelper.gitBuildYou can use poetry's tools to generate a build of this project (pure Python).The command is as follow:poetrybuildAuthor and LicenseETHHelper was written byXiaoHuiHui233, licensed under the Apache 2.0.