No project description provided
Project description
hypersync-client-python
Python package for Envio's HyperSync client written in Rust
Example usage
import hypersync
import asyncio
async def main():
# Create hypersync client using the mainnet hypersync endpoint
client = hypersync.hypersync_client(
"https://eth.hypersync.xyz",
)
height = await client.get_height()
print("Height:", height)
# The address we want to get all ERC20 transfers and transactions for
addr = "1e037f97d730Cc881e77F01E409D828b0bb14de0"
# The query to run
query = {
# start from block 0 and go to the end of the chain (we don't specify a toBlock).
"from_block": 0,
# The logs we want. We will also automatically get transactions and blocks relating to these logs (the query implicitly joins them)
"logs": [
{
"topics": [
# We want ERC20 transfers
["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],
[],
# We want the transfers that go to this address.
# appending zeroes because topic is 32 bytes but address is 20 bytes
["0x000000000000000000000000" + addr],
],
},
{
"topics": [
# We want ERC20 transfers
["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],
# We want the transfers that go to this address.
# appending zeroes because topic is 32 bytes but address is 20 bytes
["0x000000000000000000000000" + addr],
[],
],
},
],
"transactions": [
# We want all the transactions that come from this address
{"from": ["0x" + addr]},
# We want all the transactions that went to this address
{"to": ["0x" + addr]},
],
# Select the fields we are interested in
"field_selection": {
"block": ["number", "timestamp", "hash"],
"log": [
"block_number",
"log_index",
"transaction_index",
"data",
"address",
"topic0",
"topic1",
"topic2",
"topic3",
],
"transaction": [
"block_number",
"transaction_index",
"hash",
"from",
"to",
"value",
"input",
],
},
}
print(query)
# run the query once
# res = await client.send_req(query)
# print(res)
# Create a parquet folder by running this query and writing the contents to disk
await client.create_parquet_folder(query, "data")
print("finished writing parquet folder")
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hypersync-0.0.1.tar.gz
(32.5 kB
view hashes)
Built Distributions
Close
Hashes for hypersync-0.0.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 903b2c4caaa81a65198ed1a9881a493f0bbee27b384cc5685d0c43984ab99178 |
|
MD5 | c1d8d058a00ae0d8ce723c26de338b6a |
|
BLAKE2b-256 | 568cacf30a8e47cc9e25eaa8c628a4f74b859efe55a58142e8bc4e7bb8c5923a |
Close
Hashes for hypersync-0.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2abae26fa57c4b154d0b6a340ae428ad37938a9d48ebed8753b3529070ba9a4 |
|
MD5 | 5834e84f2604fd70fd80f0a729fbc11a |
|
BLAKE2b-256 | a758e4c77f108cb08f61f6fba3ae1b069dcaf3f629b0b13292456206790207b6 |
Close
Hashes for hypersync-0.0.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22b929bd89b926738140552312d42dd0382056d89dfe6eae65128bbc59b20415 |
|
MD5 | c81be83bc99cde3d64a2f4f9e148bb42 |
|
BLAKE2b-256 | 269ef0988af0a07e9cd4b33dd54acdc8d612add862282de469bc6f8b7bddc8ba |
Close
Hashes for hypersync-0.0.1-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff7d7aadbf8d9c6c8c7e74115aeddfbd9f28a0d3dc4801a162c41067f53e195f |
|
MD5 | 29efd6f89bef8cba73822e2a90ba6a9f |
|
BLAKE2b-256 | 23e9ab8d93f7e8249c823e0687a38a12ac252e2ff3807eaa0f65251ec27daf91 |
Close
Hashes for hypersync-0.0.1-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f555b065e378b7f5cbf9ffe592750d2ed7f86992be107d3f49047ae02e83092 |
|
MD5 | d547256bdc660c218d216f1a4b60c333 |
|
BLAKE2b-256 | efcef0043e5dcf167c9b53cd749a050077b5e46fa4f14e14c57a58761bafe358 |
Close
Hashes for hypersync-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62b516f270a4efdb9a68795ef170e1f0bda0aabf1f9f1756950a40de56c880f4 |
|
MD5 | 0a0bc32e9d76e6aa9813e1cea588b545 |
|
BLAKE2b-256 | ef76458eb84a35dc82e55422dc1b246e2cfbae71128e662685e5552c59643a00 |
Close
Hashes for hypersync-0.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 894940ad847f010b46b276f6de219a3608485302c2dd974dded8e58b8cbb22b7 |
|
MD5 | cc9173de69ab0b6cb89be9a1067007a8 |
|
BLAKE2b-256 | 64b08419cdc659dcedd61d2a548fac5930dc7bbe4a0690af1e7d18db0fc3af67 |
Close
Hashes for hypersync-0.0.1-cp312-cp312-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 254e3661925a2784ffb59719c8e0ff8063d371adf5a18ecfd80bd4e7afa1cd85 |
|
MD5 | 9899c026820528b2bcd495fe257a69a5 |
|
BLAKE2b-256 | de6193d399a7e32fc984311fd4d70cc429a005ba49d2c9a7351dd3e49eee60cb |
Close
Hashes for hypersync-0.0.1-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3604d95d95a15f1a1baf570c4014d21874077925fc6caacab4b3346fae93743d |
|
MD5 | 101058ce5a7bc52f80327e2163a526dc |
|
BLAKE2b-256 | 1aa84c7f14f5ebccfebebbd2e5675f253f2cf61b15bde35f69421df81489dfc1 |
Close
Hashes for hypersync-0.0.1-cp311-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a73f913f12dab45cf9f5546f946cae3c250b4799877511606a95046cf40b2bb4 |
|
MD5 | 0b19e0455175b70270b62933503ff246 |
|
BLAKE2b-256 | 00a7f8c4893653a74993f7f6124924724b5c58d782b8f9d05aefba498a9640c2 |
Close
Hashes for hypersync-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9005835beb3dfcd077bec51fa857df37fbf5579ec51b991fea41066d7d34463 |
|
MD5 | 97c17ffb70029683a944fa02421baf2a |
|
BLAKE2b-256 | 842de1f6b875346f8eb218fc817622f77a2cff7116fef914ab11d7e86123051c |
Close
Hashes for hypersync-0.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b349adcbb163aa714ca1a2ad7070fc48cde66e285b007c9ad789a2dbfdf5a26 |
|
MD5 | d4b51b0d66b8b1c46159712515bbb934 |
|
BLAKE2b-256 | 5e0c418441826218446ff85ebdf1308ff71e8bd73d6171025f361779ac2c10aa |
Close
Hashes for hypersync-0.0.1-cp311-cp311-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b5807aae9f8e43f6b1d7bb0ece776361ceae722aec127429fd466cf4b12dfb8 |
|
MD5 | d5c7b7d6482e3eb9e2dd6d626969f0bd |
|
BLAKE2b-256 | 383e14781ca1b4c7306bf9ad6a5bf8ec5c6e540c363c6b806a6fa32b037f82e2 |
Close
Hashes for hypersync-0.0.1-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e3b5c0d8287d16f8ca38a60630d0bd63cc551e610b0e61662a43e96ffc44783 |
|
MD5 | 2f5b539cc271117b56cb9c34dcf1f52d |
|
BLAKE2b-256 | eb4dc8219e7b07ced3175c55747fcb20950d0515c86a0d9555b1048df18ef0fc |
Close
Hashes for hypersync-0.0.1-cp310-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3383fc1b8b25b21e9fc14d93928e0dee394abc71f782b4a004d3a56b09131cc1 |
|
MD5 | c053bd55876f46a3eb990413faf0eda4 |
|
BLAKE2b-256 | 3baa3ca105482948e92200f172a9a54a33f80fb93a66fd0aff91a7d2c50121cd |
Close
Hashes for hypersync-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28d52f63977a8c39cd1efe62bf43b942a07e6212d9b886c0e800c106e2bfc880 |
|
MD5 | 5bef692aefe662d8dfdcb9218338080f |
|
BLAKE2b-256 | 61f545cc42c61963c80e9f1d14c21c64811e833e0da037be0bcaf3fa63c8711d |
Close
Hashes for hypersync-0.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff6c6c3fb410a9f8581060beb62eb1ce2752d20941e6da06d6770ee1955925e8 |
|
MD5 | 2163ced80a5b4936e53c5e3bcfc74311 |
|
BLAKE2b-256 | bb0449fdda14345230998418d58f0f30295eeebbce4ff3ecc8420799046a57d3 |
Close
Hashes for hypersync-0.0.1-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3ebec31776ec6bb2ded95d10d957e449d957a1454b5b10b198f44e3906187b1 |
|
MD5 | e735ad393b0d90ad2a0083805afd254e |
|
BLAKE2b-256 | 6643f7a482be42e0aa7cee2a6210073f227dc9fdbe15bd2a050236adf54ba285 |
Close
Hashes for hypersync-0.0.1-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e201de79a1e7f79855c2ace9bd5094bd23d6793ed5bc06e3ca4cc9dbd8cdd229 |
|
MD5 | 61a9c44139303707a1aeb366ce3baf53 |
|
BLAKE2b-256 | 86db6b955b7d3dabd80a92bff569ec580fe658c1f45225d454af0ea545469b12 |
Close
Hashes for hypersync-0.0.1-cp39-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5e679a02409045ac1ca23ddfe3bc97ff7e611d25d84419c232c061769ec53de |
|
MD5 | 5ae1de605335b454fdc288ebb0d46f61 |
|
BLAKE2b-256 | d529e18170ace5ef5397c7a5ea97c9f34f3611f0ed91439ca6115599c355647b |
Close
Hashes for hypersync-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 503f7c1c6cae1b51cf17a7ec6c086dc627fb3f640ae354cf867da6f10b6e05f8 |
|
MD5 | 1baeddf176aaad35e4838fc3a08bc802 |
|
BLAKE2b-256 | 423c8cf1bbfa1528986942355292e2eb68a2c9f8a51c7d9eae5c90647ae8bdf5 |
Close
Hashes for hypersync-0.0.1-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d3cc162fd21565b07d9a491c755d37efd70ad82c4fcbdb051ca74bf0725f130 |
|
MD5 | 87f6bde4c6261db021e4eefe50a7e658 |
|
BLAKE2b-256 | 8ca6f28cabf17836f55cb80503a2e7aece5a8949f4c64ea7eab0df7577167ecc |
Close
Hashes for hypersync-0.0.1-cp38-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d3bd34381242523faafc708475974f23e566811f7d9e6c4f202cb509a12352a |
|
MD5 | b88440a6056fe27f5d98902722dc208e |
|
BLAKE2b-256 | 90e583d17328a70dfc41b3a95681a6e93548d05fafe86ed9dc1da39e5bf90f90 |
Close
Hashes for hypersync-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f503e1ed17ca7b1ca6077bdc4348484b10c332086656d3202e3696e39a142fe |
|
MD5 | 8476c4954d0e1455fd5d13ec0282ba73 |
|
BLAKE2b-256 | 99caa8f263217a9613d7b18bf94904c134f8a97459f5bc154407181f3cd57ef0 |