furl: The Easiest Way to Parse and Modify URLs in Python

This repository profile is provided by osrepos.com, an open source repository discovery platform.

furl: The Easiest Way to Parse and Modify URLs in Python

Summary

furl is a lightweight Python library designed to simplify URL parsing and modification. It offers an intuitive API that makes common URL operations, often tedious with standard modules, straightforward and efficient. Developers can easily manipulate various URL components, including paths, query arguments, and fragments, with robust encoding handling.

Repository Information

Analyzed by OSRepos on July 28, 2026

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introduction

furl is a small yet powerful Python library that provides an exceptionally easy way to parse and modify URLs. While Python's standard urllib and urlparse modules offer URL-related functions, furl streamlines common operations, making URL manipulation intuitive and less prone to errors. It handles complex aspects like encoding and internationalized domain names seamlessly, allowing developers to focus on their application logic.

Installation

Installing furl is straightforward using pip:

pip install furl

Examples

furl simplifies common URL operations. Here are a few examples demonstrating its ease of use:

Modifying Paths and Query Arguments:

from furl import furl

f = furl('http://www.google.com/?one=1&two=2')
f /= 'path'
del f.args['one']
f.args['three'] = '3'
print(f.url)
# Output: 'http://www.google.com/path?two=2&three=3'

Inline Modification Methods:

from furl import furl

# Add arguments
print(furl('http://www.google.com/?one=1').add({'two':'2'}).url)
# Output: 'http://www.google.com/?one=1&two=2'

# Set arguments (replaces existing)
print(furl('http://www.google.com/?one=1&two=2').set({'three':'3'}).url)
# Output: 'http://www.google.com/?three=3'

# Remove arguments
print(furl('http://www.google.com/?one=1&two=2').remove(['one']).url)
# Output: 'http://www.google.com/?two=2'

Handling Encoding and Unicode:

furl automatically handles URL encoding and supports Unicode characters.

from furl import furl

f = furl('http://www.google.com/')
f.path = 'some encoding here'
f.args['and some encoding'] = 'here, too'
print(f.url)
# Output: 'http://www.google.com/some%20encoding%20here?and+some+encoding=here,+too'

f.set(host='????.???', path='???', query='?=?')
print(f.url)
# Output: 'http://xn--eckwd4c7c.xn--zckzah/%D0%B4%D0%B6%D0%BA?%E2%98%83=%E2%98%BA'

Why Use furl?

furl stands out by offering a highly intuitive and Pythonic interface for URL manipulation. It addresses the common frustrations associated with urllib.parse by providing direct access to URL components like scheme, host, path, query, and fragment. Key benefits include:

  • Simplicity: Easily parse and modify any part of a URL with simple attribute assignments and dictionary-like access for query parameters.
  • Robust Encoding: Automatically handles percent-encoding and decoding, including support for Unicode and Internationalized Domain Names (IDNs).
  • Method Chaining: Supports inline modification methods (add, set, remove) for concise and readable code.
  • Detailed Control: Offers granular control over path segments, query parameters (including multivalue support), and fragment components.
  • Well-Tested: The library is thoroughly tested, ensuring reliability in various scenarios.

Links

Related repositories

Similar repositories that may be relevant next.

Maskit: Local Privacy Gateway for LLMs and AI Tools

Maskit: Local Privacy Gateway for LLMs and AI Tools

September 20, 2026

Maskit is a local privacy desensitization gateway engineered for large language models and AI tools. It automatically masks sensitive data in requests sent to AI services and then seamlessly restores it in streaming responses, ensuring private information remains local. This innovative solution supports various AI assistants like Cursor and Claude Code, along with any tool offering a configurable Base URL.

data-maskingprivacyllm
CyberVerse: Self-Hosted Real-Time Digital Human Agent Platform

CyberVerse: Self-Hosted Real-Time Digital Human Agent Platform

September 18, 2026

CyberVerse is an open-source, self-hosted platform for building real-time digital human agents. It leverages WebRTC, persona memory, tools, and RAG to create voice-first AI agents, with optional digital-human video capabilities. This powerful framework allows developers to create highly interactive and lifelike AI companions.

ai-agentsdigital-humanvoice-assistant
ctx-gate: LLM Context Gateway for Efficient Token Usage

ctx-gate: LLM Context Gateway for Efficient Token Usage

September 16, 2026

ctx-gate is an LLM-agnostic context optimization proxy that reduces token consumption in AI interactions. It intelligently prunes conversation history and tool outputs, ensuring critical facts are retained without altering your workflow. Compatible with Anthropic and OpenAI APIs, ctx-gate helps developers manage LLM costs and maintain prompt fidelity.

llmcontext-managementtoken-optimization
Ferret MCP: AI-Powered Knowledge Extraction for Any Codebase

Ferret MCP: AI-Powered Knowledge Extraction for Any Codebase

September 14, 2026

Ferret MCP is an MCP server designed to extract comprehensive knowledge from any codebase, combining static analysis with AI-powered deep interpretation. It provides detailed insights into architecture, patterns, dependencies, and API surface, delivering a senior engineer's analysis in seconds. This tool integrates seamlessly with various MCP clients, offering both free static analysis and advanced AI-driven reports.

pythoncode-analysisllm

Source repository

Open the original repository on GitHub.

18 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️