Skip to main content

Gene parser for Axie Infinity

Project description

Axie Gene Parser for Python

WIP - haven't ported all the stuff the other module has (Mostly because I only find the genes useful)

This is a port of the Javascript version of a plugin, you can find it here: agp-npm

It parses the Axie Infinity hexadecimal gene strings into a human-readable format.

Install

You can use pip to install:

pip install agp-py

Usage

First you need to get an Axie Gene String (You can use Axie Infinity GraphQL), after that you can start:

We will be using 0x30000000032cb3300c2320c80c2308c20c63184c04c1304c0c6331420c8320c8 as our hex string.

from agp_py import AxieGene

hex_string = '0x30000000032cb3300c2320c80c2308c20c63184c04c1304c0c6331420c8320c8'
hex_type = 256
gene = AxieGene(hex_string, hex_type)
print(gene.genes)

The AxieGene class requires 2 arguments, First one is the hex string, Second one is the hex type (Either 256 or 512)

Then you can access the genes by using the method genes, it will give you a dictionary with the gene data.

{
    'cls': 'plant', 
    'region': 'global', 
    'tag': '', 
    'bodySkin': '', 
    'pattern': {'d': '000011', 'r1': '001011', 'r2': '001011'}, 
    'color': {'d': 'efd636', 'r1': 'efd636', 'r2': 'ffffff'}, 
    'eyes': {
        'd': {'class': 'plant', 'name': 'Papi', 'partId': 'eyes-papi', 'specialGenes': '', 'type': 'eyes'}, 
        'r1': {'class': 'plant', 'name': 'Cucumber Slice', 'partId': 'eyes-cucumber-slice', 'specialGenes': '', 'type': 'eyes'}, 
        'r2': {'class': 'plant', 'name': 'Cucumber Slice', 'partId': 'eyes-cucumber-slice', 'specialGenes': '', 'type': 'eyes'},
        'mystic': False
    }, 
    
    # Other parts ....
}

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

agp-py-0.1.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

agp_py-0.1.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file agp-py-0.1.0.tar.gz.

File metadata

  • Download URL: agp-py-0.1.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for agp-py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a1ba35796c16a8acca123aa3deceb55604cd13dc6070a3a78936e4a1778b8107
MD5 802404ad4829a3331ff72a3f7bf79b19
BLAKE2b-256 0153cf5320169bb5163ea47329de13d7693f6449714dacce0b272b5f7f726814

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agp_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for agp_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 efeb81e9e5aab424ad8a6e53a5b01b8524e3495f263bb742138f6b1e30538687
MD5 eea8095b0eb53c0224cacd38324cc0ed
BLAKE2b-256 de450b706c24c72edacd288f85b509d4098dd2824b3883f5664f40aa89d6f913

See more details on using hashes here.

Supported by

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