Skip to main content

Here's an example of how to use the curlconverter library:

from curlconverter import CurlConverter

Example cURL command string

curl_string = 'curl 'https://api.example.com\' -H 'Content-Type: application/json' -d '{"foo": "bar"}''

Create an instance of CurlConverter with the cURL string

curl_converter = CurlConverter(curl_string)

Convert the cURL string to a dictionary

parsed_data = curl_converter.convert()

Print the parsed data

print(parsed_data)

Output: {'method': 'GET', 'url': 'https://api.example.com', 'headers': {'Content-Type': 'application/json'}, 'data': '{"foo": "bar"}'}

In this example, we create an instance of CurlConverter with a cURL command string that makes a GET request to https://api.example.com with a Content-Type header and a JSON payload. We then call the convert() method on the instance to parse the cURL string and return a dictionary with the parsed data. Finally, we print the parsed data to the console.

Metadata

Release files for curlconverter 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for curlconverter 1.0.1
File Size Uploaded Provenance Actions
curlconverter-1.0.1.tar.gz 1.5 kB Without provenance Details for curlconverter-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for curlconverter 1.0.1
File Interpreter ABI Platform Actions
curlconverter-1.0.1-py3-none-any.whl Python 3 none any Details for curlconverter-1.0.1-py3-none-any.whl

Total release size: 3.3 kB

Release files / curlconverter-1.0.1.tar.gz

Download URL curlconverter-1.0.1.tar.gz
Size 1.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5fab370db6e6216513338eecc9e211dbc04e48432d201e69b070d265d4b6426e
BLAKE2b-256 checksum
How to use checksums
7fea807661af581b7b3b4b6b50d9157f73dfa4efe62607f04eb3db1aeef6121b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.1 CPython/3.10.1 Windows/10

Release files / curlconverter-1.0.1-py3-none-any.whl

Download URL curlconverter-1.0.1-py3-none-any.whl
Size 1.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
44df2bab14bf6460352d421155fdf73339564b7972bd32e3d7a38af25db4b6ea
BLAKE2b-256 checksum
How to use checksums
4cdebbdff74bec22f7db6f586b3baa8dc7e6938fb289a5eacf1d4e210d4af8cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.1 CPython/3.10.1 Windows/10

Security for curlconverter 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page