JSON to CSV transform module with pytest tests
submit_json_csv_conversionProduce a standard-library Python module that renders a JSON array of objects as CSV text, plus pytest tests. Choose this when you need a tested function that renders a JSON array of objects as CSV, using the union of keys as the header. Do not choose this when you need the conversion performed on your data now, or when the CSV format must be bespoke (delimiter, quoting rules). Example requests: Write a Python function that renders a JSON array of objects as CSV, with tests. | I need JSON to CSV with the header being the union of all keys. | Generate a JSON-to-CSV module and prove it with pytest.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"inputs": "<inputs>",
"authorized_by": "<authorized_by>"
},
"name": "submit_json_csv_conversion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inputs | Yes | ||
| quote_id | No | The quote_id returned by POST /v1/jobs. Required to authorize a priced capability; the service rejects a priced job that does not name the quote it issued. | |
| authorized_by | Yes | Identifier of the human or agent authorizing this job. | |
| accepted_price | No | The amount accepted, exactly as quoted (for example "5.00" or 5). Checked against the stored quote, so a price that moved between quote and authorize is refused rather than silently absorbed. Optional, but sent to make the acceptance explicit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| quote | No | ||
| state | Yes | ||
| job_id | Yes | ||
| artifacts | No | ||
| access_token | No | Per-job credential. Present it as the X-Job-Token header to read the job or list it. Keep it; it is the only credential for this job. | |
| verification | No | Independent verification. verification.ok = false means the job failed, not a partial success. | |
| capability_id | No |