Rarity Scanner
eth: 0xbA842b7DA417Ba762D75e8F99e11c2980a8F8051 ens: prathik.xyz
Aggregate metadata info on NFT collections
Accuracy on par w/ legitimate tools afaik (May now have changed with the release of OpenRarity)
Notice(s)
- Using poetry for package management.
- Using SmartProxy for proxies.
description
Gathering info on collection, weighing rarities, and spitting into json file Currently supports collections on Ethereum and Cosmos Currently supports on-chain metadata, single-file metadata, multi-file metadata
how-to
sample
import json
from pyshuii.retrievers import erc721, cw721
creds = {}
creds['ALCHEMY_API_KEY'] = ''
client_mappings = {
'EVM': erc721,
'CW': cw721
}
proxies = open('proxies.txt', 'r').read()
def main(event):
try:
if (event['network'] == 'EVM'):
cli = client_mappings[event['network']](
alchemy_api_key=creds.get('ALCHEMY_API_KEY'),
max_retries=100,
proxies=proxies
)
elif (event['network'] == 'CW'):
cli = client_mappings[event['network']](
max_retries=100,
proxies=proxies
)
results = cli.run(event['chain'], event['address'])
with open("%s.json" % (results['project_name'].lower().replace(" ", "_")), "w") as dumped:
dumped.write(json.dumps(results))
return '{}s'.format(results['time_to_sync'])
except Exception as e:
print(e)
raise e
# main(
# event={
# "network": "CW",
# "chain": "JUNO-1",
# "address": "juno1za0uemnhzwkjrqwguy34w45mqdlzfm9hl4s5gp5jtc0e4xvkrwjs6s2rt4"
# })
# main(
# event={
# "network": "CW",
# "chain": "JUNO-1",
# "address": "juno1e229el8t4lu4rx7xeekc77zspxa2gz732ld0e6a5q0sr0l3gm78stuvc5g"
# })
# main(
# event={
# "network": "CW",
# "chain": "STARGAZE-1",
# "address": "stars1rz8jkes33jxqf79t707s68yary3969faqfz59lvwnxjy4j65q7es62j098"
# })
main(
event={
"network": "EVM",
"chain": "ETH",
"address": "0x0e32cee0445413e118b14d02e0409303d338487a"
})
whats left
- containerize
- poetry shell alternative
- improve efficiency
- work around brute force retry method
- CW single threaded
- more chains?
- better docs
python3 setup.py install
python3 -m twine upload --repository pypi dist/*
to do
github workflow for package publishing & layer uploading
Release files for pyshuii 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyshuii-0.1.0.tar.gz | 9.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyshuii-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.8 kB
Release files / pyshuii-0.1.0.tar.gz
| Download URL | pyshuii-0.1.0.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
158e0988b7a8da307c3c9fb0cdd220d9723f15edf276ff54df5545e0e610bfe8
|
|
BLAKE2b-256 checksum How to use checksums |
aa46789bafb1476a2aa2bd60b91fd09dd6e6a25978816ed2601e892ce1478dcb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.9.2 Darwin/21.6.0
|
Release files / pyshuii-0.1.0-py3-none-any.whl
| Download URL | pyshuii-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0da7230503958346c3f4dc2d9ae8bf340647ca70512071897f6ecebed8ba0090
|
|
BLAKE2b-256 checksum How to use checksums |
773eaf1e5dcf6230c41a66dc0eaee91151767749ddf19af576e80d94e27c4f97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.9.2 Darwin/21.6.0
|