Pynosaur

Modern CLI tools with better UX

View the Project on GitHub Pynosaur/pynosaur

purl

Pure Python URL transfer tool

Overview

purl is a pure Python alternative to curl, providing HTTP request functionality without external dependencies. Perfect for downloading files, making API requests, and testing HTTP endpoints.

Full Name: Pure Python URL
Version: 0.1.1
Equivalent: curl
Repository: github.com/pynosaur/purl

Features

Installation

# Via pget
pget install purl

# From source
git clone https://github.com/pynosaur/purl.git
cd purl
bazel build //:purl_bin
cp bazel-bin/purl ~/.local/bin/

Usage

Basic Requests

# Basic GET request
purl https://example.com

# Show help
purl --help

# Show version
purl --version

Download to File

# Save to file
purl -o page.html https://example.com

# Download archive
purl -o archive.tar.gz https://example.com/file.tar.gz

Response Headers

# Show response headers
purl -i https://api.github.com

# Check headers only
purl -i https://example.com

Custom Headers

# Single header
purl -H "Accept: application/json" https://api.github.com

# Multiple headers
purl -H "Authorization: Bearer token" -H "Content-Type: application/json" https://api.example.com

POST Requests

# POST with data
purl -X POST -d "key=value" https://api.example.com

# POST JSON
purl -X POST -d '{"key":"value"}' -H "Content-Type: application/json" https://api.example.com

Other HTTP Methods

# PUT request
purl -X PUT -d "data" https://api.example.com/resource

# DELETE request
purl -X DELETE https://api.example.com/resource

Verbose Mode

# Show detailed output
purl --verbose https://example.com

Options

Examples

Fetch a webpage:

purl https://example.com

API request with JSON:

purl -H "Accept: application/json" https://api.github.com/users/pynosaur

POST to API:

purl -X POST \
  -H "Content-Type: application/json" \
  -d '{"name":"test"}' \
  https://api.example.com/data

Download file with progress:

purl --verbose -o download.zip https://example.com/file.zip

Check API headers:

purl -i https://api.example.com/status

← Back to HomeView on GitHub