Validate and parse different types of URNs used in the PACT system.
urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6
urn:pathfinder:company:customcode:buyer-assigned:acme-corp
urn:pathfinder:product:customcode:buyer-assigned:ABC-123
POST /validate-urn
{
"urn_type": "generic",
"value": "urn:uuid:..."
}
This tool is built using the open-source pact_methodology Python library, which implements the WBCSD PACT Methodology for standardizing product carbon footprints (PCFs).
from pact_methodology.urn import URN, CompanyId, ProductId
# Validate a generic URN
urn = URN("urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6")
print(urn) # "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"
# Validate a company ID
company_id = CompanyId("urn:pathfinder:company:customcode:buyer-assigned:acme-corp")
print(company_id) # "urn:pathfinder:company:customcode:buyer-assigned:acme-corp"
# Validate a product ID
product_id = ProductId("urn:pathfinder:product:customcode:buyer-assigned:ABC-123")
print(product_id) # "urn:pathfinder:product:customcode:buyer-assigned:ABC-123"
Install the library using: pip install pact_methodology
Did you find this tool useful?
Explore our expert insights on URN identifiers and PACT methodology implementation.