# cURL to Python

Convert curl to Python (requests). Client-side and secret-safe, with guides for HTTP methods, content types and auth schemes.

Paste a curl command and get idiomatic Python. Parsing and code generation happen entirely in your browser.

## Guides

- [Convert a cURL GET request to Python](https://toolpaper.manavdev.site/how-to/curl-get-in-python.md): Convert a curl GET command to Python (requests). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL POST request to Python](https://toolpaper.manavdev.site/how-to/curl-post-in-python.md): Convert a curl POST command to Python (requests). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL PUT request to Python](https://toolpaper.manavdev.site/how-to/curl-put-in-python.md): Convert a curl PUT command to Python (requests). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL PATCH request to Python](https://toolpaper.manavdev.site/how-to/curl-patch-in-python.md): Convert a curl PATCH command to Python (requests). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL DELETE request to Python](https://toolpaper.manavdev.site/how-to/curl-delete-in-python.md): Convert a curl DELETE command to Python (requests). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Send JSON with cURL in Python](https://toolpaper.manavdev.site/how-to/send-json-with-curl-in-python.md): Convert a curl command that sends JSON into Python (requests). Body serialization, Content-Type, and encoding handled correctly.
- [Send form-urlencoded with cURL in Python](https://toolpaper.manavdev.site/how-to/send-form-with-curl-in-python.md): Convert a curl command that sends form-urlencoded into Python (requests). Body serialization, Content-Type, and encoding handled correctly.
- [Send multipart form-data with cURL in Python](https://toolpaper.manavdev.site/how-to/send-multipart-with-curl-in-python.md): Convert a curl command that sends multipart form-data into Python (requests). Body serialization, Content-Type, and encoding handled correctly.
- [Send XML with cURL in Python](https://toolpaper.manavdev.site/how-to/send-xml-with-curl-in-python.md): Convert a curl command that sends XML into Python (requests). Body serialization, Content-Type, and encoding handled correctly.
- [Send GraphQL with cURL in Python](https://toolpaper.manavdev.site/how-to/send-graphql-with-curl-in-python.md): Convert a curl command that sends GraphQL into Python (requests). Body serialization, Content-Type, and encoding handled correctly.
- [cURL with Bearer token in Python](https://toolpaper.manavdev.site/how-to/curl-bearer-auth-in-python.md): Convert a curl command using Bearer token to Python (requests). Credentials pass through cleanly and can be redacted before you share.
- [cURL with Basic auth in Python](https://toolpaper.manavdev.site/how-to/curl-basic-auth-in-python.md): Convert a curl command using Basic auth to Python (requests). Credentials pass through cleanly and can be redacted before you share.
- [cURL with API key in Python](https://toolpaper.manavdev.site/how-to/curl-api-key-auth-in-python.md): Convert a curl command using API key to Python (requests). Credentials pass through cleanly and can be redacted before you share.
- [Convert cURL to Django](https://toolpaper.manavdev.site/how-to/curl-in-django.md): Convert curl commands into Django (Python / requests). Views calling upstream APIs with requests.
- [Convert cURL to FastAPI](https://toolpaper.manavdev.site/how-to/curl-in-fastapi.md): Convert curl commands into FastAPI (Python / requests). Async endpoints with httpx AsyncClient.
- [Convert cURL to Flask](https://toolpaper.manavdev.site/how-to/curl-in-flask.md): Convert curl commands into Flask (Python / requests). Blueprint routes using requests for upstream calls.
- [401 Unauthorized in Python](https://toolpaper.manavdev.site/how-to/curl-401-in-python.md): The server accepted the request shape but rejected your credentials or scheme. Convert the failing curl into Python (requests) and inspect what's actually being sent.
- [CORS error in Python](https://toolpaper.manavdev.site/how-to/curl-cors-in-python.md): curl doesn't enforce CORS. Fetch and Axios do. A working curl doesn't mean a working browser call. Convert the failing curl into Python (requests) and inspect what's actually being sent.
- [SSL certificate error in Python](https://toolpaper.manavdev.site/how-to/curl-ssl-in-python.md): Self-signed or expired certs will break in strict clients even though -k made curl happy. Convert the failing curl into Python (requests) and inspect what's actually being sent.

---

Source: https://toolpaper.manavdev.site/curl-to-python · Converter: https://toolpaper.manavdev.site/curl-converter