curl_parsers
介绍
curl命令转python代码,支持json格式数据转换
安装教程
- pip install curl_parsers
- 或者下载源码,解压后运行
使用说明
- 终端命令行输入:
方法一:
python -m curl_parsers.cli 'curl -X POST https://api.example.com/submit' --output python
python -m curl_parsers.cli 'curl -X POST https://api.example.com/submit' --output json
方法二:
uncurl 'curl -X POST https://api.example.com/submit' --output python
uncurl 'curl -X POST https://api.example.com/submit' --output json
- 调用函数:
from curl_parsers import parse_curl, to_python, to_json
curl_cmd = "curl -X POST https://api.example.com/submit"
print(parse_curl(curl_cmd)) # 解析curl命令并返回字典数据
print(to_python(curl_cmd)) # 转换为python代码
print(to_json(curl_cmd)) # 转换为json格式数据
Metadata
Release files for curl-parsers 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| curl_parsers-0.2.1.tar.gz | 8.5 kB | Without provenance | Details for curl_parsers-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| curl_parsers-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for curl_parsers-0.2.1-py3-none-any.whl |
Total release size: 18.8 kB
Release files / curl_parsers-0.2.1.tar.gz
| Download URL | curl_parsers-0.2.1.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2283ee5ce1bd1bf7d0c087ca3da41d5b4238cf72a7e98147d60ba58b9b194268
|
|
BLAKE2b-256 checksum How to use checksums |
a86fb1d3d890b9f732da11e46081f509c45e3b8126b71d6f8da35b9a62d4e62a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.5
|
Release files / curl_parsers-0.2.1-py3-none-any.whl
| Download URL | curl_parsers-0.2.1-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ed0a5bb4a1c0f4a2e4865c78534c717449376586adfdfd6b4d55c547cbba288
|
|
BLAKE2b-256 checksum How to use checksums |
e8a83adb17f1e30a84ed773910700d20ab0330502a6ceb417b57a9d6ad7b7140
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.5
|
Security for curl-parsers 0.2.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.