Skip to main content

A secure curl wrapper with middleware support and HTML-to-markdown extraction

Project description

scurl

PyPI version CI

A secure curl wrapper with middleware support and HTML-to-markdown extraction.

Installation

pip install sibylline-scurl

Or with pipx (recommended for CLI tools):

pipx install sibylline-scurl

Usage

# Fetch a URL and extract clean markdown from HTML
scurl https://example.com

# Raw output (disable response middleware)
scurl --raw https://example.com

# All curl flags work
scurl -H "Accept: application/json" https://api.example.com/data

Features

  • SecretDefender: Automatically detects and blocks requests containing exposed secrets/tokens
  • HTML to Markdown: Converts HTML responses to clean markdown (use --readability for article extraction)
  • Middleware System: Composable request and response middleware

Why scurl?

scurl extracts clean, readable content from web pages - perfect for LLM consumption, readability, or bandwidth savings.

Size Comparison

Website curl scurl Reduction
example.com 513 167 67.4%
news.ycombinator.com 34,082 10,739 68.5%
en.wikipedia.org/wiki/Curl 110,373 10,044 90.9%
github.com/anthropics 296,788 353 99.9%
docs.python.org 319,554 12,348 96.1%

Visual Comparison

curl output (Wikipedia, first 500 chars):

<!DOCTYPE html><html class="client-nojs" lang="en" dir="ltr"><head>
<meta charset="UTF-8"/><title>Curl (programming language) - Wikipedia</title>
<script>(function(){var className="client-js";var cookie=document.cookie.
match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].
split('%2C').forEach(function(pref){className=className.replace(new
RegExp('(^| )'+pref.replace(/-hierarchical-hierarchical/,'')
+'($| )'),'$1teleported-hierarchical$2');});...

scurl output (same page):

# Curl (programming language) - Wikipedia

**Curl** is a reflective object-oriented programming language for interactive
web applications, whose goal is to provide a smoother transition between
content formatting and computer programming. It makes it possible to embed
complex objects in simple documents without needing to switch between
programming languages or development platforms.

The Curl implementation initially consisted of an interpreter only; a compiler
was added later...

Flags

Flag Description
--raw Disable all response middleware (raw HTML output)
--readability Extract article content only (strips nav, ads, sidebars)
--render Use headless browser for JS-rendered pages
--disable <slug> Disable a middleware by slug (can be repeated)
--enable <slug> Override a middleware's block (can be repeated)
--list-middleware List available middleware and their slugs

Middleware Slugs

Slug Type Description
secret-defender Request Detects and blocks requests containing secrets
readability Response Extracts clean markdown from HTML

License

Copyright 2026 Sibylline Software

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sibylline_scurl-0.2.3.tar.gz (697.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sibylline_scurl-0.2.3-py3-none-any.whl (443.2 kB view details)

Uploaded Python 3

File details

Details for the file sibylline_scurl-0.2.3.tar.gz.

File metadata

  • Download URL: sibylline_scurl-0.2.3.tar.gz
  • Upload date:
  • Size: 697.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sibylline_scurl-0.2.3.tar.gz
Algorithm Hash digest
SHA256 e2f5aa3cc4b51c9529d5b5fb63c4d40ef9fcf6c1117b5ff0eab46008139e2550
MD5 cf4a9f08b0f927723caab7497f89ec97
BLAKE2b-256 5e639c3dad77b4f5b2627f28828b22bf6606856dabb2164ae622a8be182201ee

See more details on using hashes here.

File details

Details for the file sibylline_scurl-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for sibylline_scurl-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fda5fba863b74033f9e2004797d1f090a08d87d316771416eeabfc22f4b75a6b
MD5 1739b4515083271773891b9398d824c2
BLAKE2b-256 a05a2895439294bc0a84e62c6906ced55e88013b77a0674c9126e304cc87a362

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page