Python SDK for validating and generating compliance-ready Pokémon ERC-721 token metadata.
Project description
pokedev-sdk
Python SDK for validating and generating compliance-ready Pokémon ERC-721 token metadata.
Installation
pip install pokedev-sdk
Or for local development:
pip install -e ./pokedev-sdk-py
Features
- Metadata Schema Validation: Ensure your metadata complies with OpenSea standard attributes.
- Pokédev Standards Check: Validates required traits (Species, Type, Rarity, Level, Stats) and checks boundary values.
- Fluent Metadata Builder: Easily generate compliant JSON/dictionary objects with typings using the builder pattern.
Usage
1. Schema Metadata Validation
from pokedev_sdk import validate_metadata
metadata = {
"name": "Voltbeat #904",
"description": "A bug-type firefly Pokémon wreathed in electric tail-light glow.",
"image": "ipfs://QmVoltbeatGenesisSlabImageHash",
"attributes": [
{ "trait_type": "Species", "value": "Voltbeat" },
{ "trait_type": "Type", "value": "Thunder" },
{ "trait_type": "Rarity", "value": "Epic" },
{ "trait_type": "Level", "value": 12 },
{ "trait_type": "XP", "value": 450 },
{ "trait_type": "Attack", "value": 92 },
{ "trait_type": "Defense", "value": 50 },
{ "trait_type": "Speed", "value": 115 },
{ "trait_type": "Intelligence", "value": 98 }
]
}
result = validate_metadata(metadata)
if result.is_valid:
print("Metadata is compliant!")
else:
print("Compliance Issues:")
for issue in result.issues:
print(f"[{issue.severity.upper()}] {issue.field}: {issue.message}")
2. Programmatically Generate Metadata
from pokedev_sdk import PokemonMetadataBuilder
metadata = (
PokemonMetadataBuilder()
.set_name("Emberfang #119")
.set_description("A fiery dragon-canid that specializes in rapid flame bursts.")
.set_image("ipfs://QmEmberfangGenesisSlabHash")
.set_base_stats("Emberfang", "Flame", "Rare")
.set_stats(attack=85, defense=62, speed=90, intelligence=75)
.build()
)
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
pokedev_sdk-0.1.0.tar.gz
(6.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pokedev_sdk-0.1.0.tar.gz.
File metadata
- Download URL: pokedev_sdk-0.1.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ad07e745cafcc1a5f7c37695ee04a435334a08ee9ae9f33580b0f8cc2348462
|
|
| MD5 |
d1d378def2791ff175cd73d0f351ad86
|
|
| BLAKE2b-256 |
0ce584df64292d86742a665f00bc2ff71d2e640afa662affb2edb5638fcd5581
|
File details
Details for the file pokedev_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pokedev_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
806e108e6c99b35bd49b5f0a1212a21e2768ce8cf608e819e94cbf04c6c0c147
|
|
| MD5 |
9ffbb086768d6eeb462cebe114bead8a
|
|
| BLAKE2b-256 |
3ef15741daa14251a1476076343d67d3f7be915eafd79f18f65a9915468286f0
|