Skip to main content

No project description provided

Project description

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)

  1. Using poetry for package management.
  2. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyshuii-0.1.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyshuii-0.1.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file pyshuii-0.1.0.tar.gz.

File metadata

  • Download URL: pyshuii-0.1.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.9.2 Darwin/21.6.0

File hashes

Hashes for pyshuii-0.1.0.tar.gz
Algorithm Hash digest
SHA256 158e0988b7a8da307c3c9fb0cdd220d9723f15edf276ff54df5545e0e610bfe8
MD5 7f3e1dd53ef8e13b6ee1fe8648acae01
BLAKE2b-256 aa46789bafb1476a2aa2bd60b91fd09dd6e6a25978816ed2601e892ce1478dcb

See more details on using hashes here.

File details

Details for the file pyshuii-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyshuii-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.9.2 Darwin/21.6.0

File hashes

Hashes for pyshuii-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0da7230503958346c3f4dc2d9ae8bf340647ca70512071897f6ecebed8ba0090
MD5 334dcd0721c212c6962df5e95165bf90
BLAKE2b-256 773eaf1e5dcf6230c41a66dc0eaee91151767749ddf19af576e80d94e27c4f97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page