# Python PEP 508 Environment Marker Typed Expression Evaluator

> Python PEP 508 Environment Marker Typed Expression Evaluator is a paid API for AI agents from detect.halowerk.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-12-01).

Evaluates decoded PEP 508 dependency marker expressions against a supplied environment using PEP 440 version comparisons to determine if a dependency condition matches.

## Facts

- Endpoint: POST https://detect.halowerk.com/v1/F-TD2000-DOCUMENTS-02/python-pep508-environment-marker-typed-expression-evaluation?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/python-pep-508-environment-marker-typed-expression-evaluator-da41a39d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nfQ8t7ATWJAgeEHo2Qtkx

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability python-pep-508-environment-marker-typed-expression-evaluator-da41a39d -d '<json body>'
```

Example prompt: Evaluate this PEP 508 dependency marker expression tree — root node 0, nodes: a compare node checking if the variable 'python_version' equals the literal '3.11' — against an environment where python_version is '3.11' and sys_platform is 'linux', and tell me if the marker matches.

## When to prefer this

Use this endpoint when you need programmatic, PEP 440-compliant evaluation of decoded PEP 508 dependency marker expression trees against an explicitly supplied Python environment. It is ideal for dependency resolvers, CI/CD pipelines, package compatibility checkers, and any agent that needs to determine whether a Python package dependency condition applies to a given runtime environment without executing Python locally.

## Known failure modes

- Invalid node index references (root or children pointing to out-of-range indices)
- Unsupported operator enum value in compare node
- Environment variable name exceeds 64 characters or value exceeds 128 characters
- Node array exceeds 64 items limit
- Malformed expression tree with circular or disconnected references
- Missing required fields (dependencyMarkers, data, root, nodes, environment)

## How this service works

Evaluate decoded dependency markers against an explicitly supplied environment with PEP440 comparisons.

## Output

Returns a typed claim object indicating whether the evaluated dependency marker expression tree matches the provided environment (a boolean 'matches' field), or null if no claim could be made. The result reflects PEP 440-compliant comparisons across all supplied environment variables.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "artifact": {
   "type": "object",
   "required": [
    "dependencyMarkers"
   ],
   "properties": {
    "dependencyMarkers": {
     "type": "object",
     "required": [
      "data",
      "claim"
     ],
     "properties": {
      "data": {
       "type": "object",
       "required": [
        "environment",
        "nodes",
        "root"
       ],
       "properties": {
        "root": {
         "type": "integer",
         "maximum": 63,
         "minimum": 0
        },
        "nodes": {
         "type": "array",
         "items": {
          "anyOf": [
           {
            "type": "object",
            "required": [
             "op",
             "operator",
             "left",
             "right"
            ],
            "properties": {
             "op": {
              "const": "compare"
             },
             "left": {
              "type": "object",
              "required": [
               "kind",
               "value"
              ],
              "properties": {
               "kind": {
                "enum": [
                 "literal",
                 "variable"
                ]
               },
               "value": {
                "type": "string",
                "maxLength": 128
               }
              },
              "additionalProperties": false
             },
             "right": {
              "type": "object",
              "required": [
               "kind",
               "value"
              ],
              "properties": {
               "kind": {
                "enum": [
                 "literal",
                 "variable"
                ]
               },
               "value": {
                "type": "string",
                "maxLength": 128
               }
              },
              "additionalProperties": false
             },
             "operator": {
              "enum": [
               "==",
               "!=",
               "<",
               "<=",
               ">",
               ">=",
               "~=",
               "in",
               "not in"
              ]
             }
            },
            "additionalProperties": false
           },
           {
            "type": "object",
            "required": [
             "op",
             "children"
            ],
            "properties": {
             "op": {
              "enum": [
               "and",
               "or"
              ]
            
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/python-pep-508-environment-marker-typed-expression-evaluator-da41a39d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from detect.halowerk.com](https://www.zero.xyz/host/detect.halowerk.com/llms.txt)
