gruns / gruns/furl

a method to set an individual query parameter without removing the rest or keeping the original value

Open
#168 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.8k
Forks
165
PR merge metrics
No merged PRs in 30d

Description

```py
from furl import furl

def url() -> furl:
return furl("http://foo.com/?a=1&b=2")

print(url().set({"a": 3})) # http://foo.com/?a=3
print(url().add({"a": 3})) # http://foo.com/?a=1&b=2&a=3

# i would like to be able do this in one method:
print(url().remove(["a"]).add({"a": 3})) # http://foo.com/?b=2&a=3
```

the current behavior of `add` where it supports multiple query params with the same value seems like an edge case imo

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.