Skip to main content

cURLpy

A simple curl implementation built from scratch using Python 3.

The goal of this project is to use as few dependencies as possible — preferably none.

Current status: This project currently has no dependencies.

Installation

Install from PyPI:

pip install curlpy-nicolaszmarzagao

Usage

cURLpy works similarly to curl. Here are some features already implemented:

GET Requests

HTTP

python3 -m curlpy example.com

HTTPS

python3 -m curlpy https://example.com

Specific path

python3 -m curlpy https://example.com/hello/world

Specific port

python3 -m curlpy https://example.com:8080

Or:

python3 -m curlpy https://example.com/ -p 8080

Include HTTP headers

python3 -m curlpy example.com -i

POST Requests

Use the -d / --data flag to send data in the request body. This automatically makes it a POST request.

Form data

python3 -m curlpy example.com/api -d "name=john&age=30"

JSON

python3 -m curlpy example.com/api -d '{"name": "john"}' -H "Content-Type: application/json"

Override the method

-d defaults to POST, but you can override it with -X:

python3 -m curlpy example.com/api -d '{"name": "john"}' -X PUT

Local Development

Clone the repository using SSH:

git clone git@github.com:nicolaszmarzagao/curlpy.git
cd curlpy

Create and activate a virtual environment:

python3 -m venv .venv
source .venv/bin/activate

Install cURLpy locally in editable mode:

python3 -m pip install -e .

Run the tests:

python3 -m unittest discover -s tests -v

Run cURLpy:

python3 -m curlpy

Contributing

Feel free to fork this repository, open issues, suggest features, or contribute with pull requests.

This project is licensed under the MIT License.

Metadata

Release files for curlpy-nicolaszmarzagao 0.1.3

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

Source distribution (sdist)

Source distribution for curlpy-nicolaszmarzagao 0.1.3
File Size Uploaded
curlpy_nicolaszmarzagao-0.1.3.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for curlpy-nicolaszmarzagao 0.1.3
File Interpreter ABI Platform
curlpy_nicolaszmarzagao-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / curlpy_nicolaszmarzagao-0.1.3.tar.gz

Download URL curlpy_nicolaszmarzagao-0.1.3.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
62501dabc6bf23dd35d4b2ed20dacecb412919ed316f14aead8fe0cc6926c3df
BLAKE2b-256 checksum
How to use checksums
67e6ec5c09b4da790df73168f00e31ddccfce4326591881608868fe9108e7552
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / curlpy_nicolaszmarzagao-0.1.3-py3-none-any.whl

Download URL curlpy_nicolaszmarzagao-0.1.3-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ef9bed28f3f623e881e03288ebd250af00ae109350324965a6b0f2a622b4344
BLAKE2b-256 checksum
How to use checksums
5df1ae0daec2a7eb51283c33c43973d46a473f63dcf979f59ba1e7495b754002
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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