cURL to Python

Transform your cURL commands into clean, idiomatic Python code using the standard `requests` library.

import requests

headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
}

data = '{"name": "John Doe"}'

response = requests.post(
    'https://api.example.com/v1/users',
    headers=headers,
    data=data
)

print(response.json())

Requests Library

Generates code that utilizes the `requests` HTTP library, the industry standard for making network requests in Python for its simplicity and power.

Auto Meta-Data

Intelligently maps cURL headers to Python dictionaries and request data to appropriate named arguments like `data` or `json`.