All Projects → niksite → url-normalize

niksite / url-normalize

Licence: MIT license
URL normalization for Python

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to url-normalize

ST-OpenUri
The ultimate Sublime Text plugin for opening URIs (URLs) in your file.
Stars: ✭ 25 (-69.51%)
Mutual labels:  url, uri
Uri Parser
RFC3986/RFC3987 compliant URI parser
Stars: ✭ 342 (+317.07%)
Mutual labels:  url, uri
UrlCombine
C# util for combining Url paths. Works similarly to Path.Combine.
Stars: ✭ 23 (-71.95%)
Mutual labels:  url, uri
Linkt
A lightweight and simple Kotlin library for deep link handling on Android 🔗.
Stars: ✭ 101 (+23.17%)
Mutual labels:  url, uri
Vscode Remote Workspace
Multi protocol support for handling remote files like local ones in Visual Studio Code.
Stars: ✭ 197 (+140.24%)
Mutual labels:  url, uri
uri-query-parser
a parser and a builder to work with URI query string the right way in PHP
Stars: ✭ 38 (-53.66%)
Mutual labels:  url, uri
Searchwithmybrowser
Open Cortana searches with your default browser.
Stars: ✭ 285 (+247.56%)
Mutual labels:  url, uri
Uri
🌏 Functions for making sense out of URIs in PHP
Stars: ✭ 259 (+215.85%)
Mutual labels:  url, uri
Tldts
JavaScript Library to work against complex domain names, subdomains and URIs.
Stars: ✭ 151 (+84.15%)
Mutual labels:  url, uri
Bidi
Bidirectional URI routing
Stars: ✭ 941 (+1047.56%)
Mutual labels:  url, uri
uri
A type to represent, query, and manipulate a Uniform Resource Identifier.
Stars: ✭ 16 (-80.49%)
Mutual labels:  url, uri
Pguri
uri type for PostgreSQL
Stars: ✭ 235 (+186.59%)
Mutual labels:  url, uri
gnt
🍸 GraphQL Normalized Types
Stars: ✭ 32 (-60.98%)
Mutual labels:  normalize, normalization
ocaml-uri
RFC3986 URI parsing library for OCaml
Stars: ✭ 85 (+3.66%)
Mutual labels:  url, uri
Uri.js
Javascript URL mutation library
Stars: ✭ 6,119 (+7362.2%)
Mutual labels:  url, uri
Scala Uri
Simple scala library for building and parsing URIs
Stars: ✭ 225 (+174.39%)
Mutual labels:  url, uri
Uri Components
League URI components objects
Stars: ✭ 244 (+197.56%)
Mutual labels:  url, uri
jurl
Fast and simple URL parsing for Java, with UTF-8 and path resolving support
Stars: ✭ 84 (+2.44%)
Mutual labels:  uri
keras-utility-layer-collection
Collection of custom layers and utility functions for Keras which are missing in the main framework.
Stars: ✭ 63 (-23.17%)
Mutual labels:  normalization
url-survival-check
批量检测URL存活
Stars: ✭ 44 (-46.34%)
Mutual labels:  url

url-normalize

Build Status Coverage Status

URI Normalization function:

  • Take care of IDN domains.
  • Always provide the URI scheme in lowercase characters.
  • Always provide the host, if any, in lowercase characters.
  • Only perform percent-encoding where it is essential.
  • Always use uppercase A-through-F characters when percent-encoding.
  • Prevent dot-segments appearing in non-relative URI paths.
  • For schemes that define a default authority, use an empty authority if the default is desired.
  • For schemes that define an empty path to be equivalent to a path of "/", use "/".
  • For schemes that define a port, use an empty port if the default is desired
  • All portions of the URI must be utf-8 encoded NFC from Unicode strings

Inspired by Sam Ruby's urlnorm.py

Example:

$ pip install url-normalize
Collecting url-normalize
...
Successfully installed future-0.16.0 url-normalize-1.3.3
$ python
Python 3.6.1 (default, Jul  8 2017, 05:00:20)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
> from url_normalize import url_normalize
> print(url_normalize('www.foo.com:80/foo'))
> https://www.foo.com/foo

History:

  • 1.4.3: Added LICENSE file
  • 1.4.2: Added an optional param sort_query_params (True by default)
  • 1.4.1: Added an optional param default_scheme to the url_normalize ('https' by default)
  • 1.4.0: A bit of code refactoring and cleanup
  • 1.3.3: Support empty string and double slash urls (//domain.tld)
  • 1.3.2: Same code support both Python 3 and Python 2.
  • 1.3.1: Python 3 compatibility
  • 1.2.1: PEP8, setup.py
  • 1.1.2: support for shebang (#!) urls
  • 1.1.1: using 'http' schema by default when appropriate
  • 1.1.0: added handling of IDN domains
  • 1.0.0: code pep8
  • 0.1.0: forked from Sam Ruby's urlnorm.py

License: MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].