{"library":"poly-eip712-structs","title":"EIP-712 Structs for Python","description":"A Python library providing a robust interface for constructing EIP-712 typed data structures. It simplifies the creation of structured messages that can be signed off-chain and verified on-chain, adhering to the Ethereum EIP-712 standard. The library is currently at version `0.0.1` and aims to streamline secure off-chain data signing.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install poly-eip712-structs"],"cli":null},"imports":["from eip712_structs import EIP712Struct","from eip712_structs import make_domain","from eip712_structs import String","from eip712_structs import Uint","from eip712_structs import Address","import struct"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from eip712_structs import make_domain, EIP712Struct, String, Uint\nimport os\n\n# Define a domain separator for the EIP-712 message\ndomain = make_domain(name='My Application', version='1.0.0', chainId=1)\n\n# Define your custom EIP-712 struct type\nclass MyStruct(EIP712Struct):\n    some_string = String()\n    some_number = Uint(256)\n\n# Create an instance of your struct with data\nmy_data = MyStruct(some_string='hello world', some_number=1234)\n\n# Convert to EIP-712 message dictionary\nmessage_dict = my_data.to_message(domain)\nprint(f\"EIP-712 Message Dict: {message_dict}\")\n\n# Get the signable bytes hash (e.g., for use with a private key)\nsignable_bytes = my_data.signable_bytes(domain)\nprint(f\"Signable Bytes Hash: {signable_bytes.hex()}\")\n\n# Example of setting/getting values dictionary-style\nmy_data['some_number'] = 4567\nassert my_data['some_number'] == 4567\n","lang":"python","description":"This quickstart demonstrates how to define an EIP-712 domain, create a custom struct, instantiate it with data, and convert it into a signable EIP-712 message dictionary and its corresponding byte hash.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":"0.0.1","pypi_latest":"0.0.1","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":5.4,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"poly-eip712-structs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"61.1M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"poly-eip712-structs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":6,"import_time_s":null,"mem_mb":null,"disk_size":"63M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"poly-eip712-structs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"66.8M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"poly-eip712-structs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":4.9,"import_time_s":null,"mem_mb":null,"disk_size":"69M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"poly-eip712-structs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"58.1M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"poly-eip712-structs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":4.5,"import_time_s":null,"mem_mb":null,"disk_size":"60M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"poly-eip712-structs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"57.8M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"poly-eip712-structs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":4.5,"import_time_s":null,"mem_mb":null,"disk_size":"60M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"poly-eip712-structs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"60.5M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"poly-eip712-structs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":6.9,"import_time_s":null,"mem_mb":null,"disk_size":"63M"}]}}