urlpattern 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- urlpattern-0.1.0/.github/workflows/CI.yml +170 -0
- urlpattern-0.1.0/.vscode/extensions.json +9 -0
- urlpattern-0.1.0/.vscode/settings.json +7 -0
- urlpattern-0.1.0/Cargo.lock +392 -0
- urlpattern-0.1.0/Cargo.toml +20 -0
- urlpattern-0.1.0/LICENSE.txt +21 -0
- urlpattern-0.1.0/PKG-INFO +69 -0
- urlpattern-0.1.0/README.md +38 -0
- urlpattern-0.1.0/gitignore.txt +72 -0
- urlpattern-0.1.0/pyproject.toml +38 -0
- urlpattern-0.1.0/src/lib.rs +329 -0
- urlpattern-0.1.0/tests/__init__.py +0 -0
- urlpattern-0.1.0/tests/test_lib.py +75 -0
- urlpattern-0.1.0/tests/urlpatterntestdata.json +2857 -0
- urlpattern-0.1.0/urlpattern.pyi +58 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# This file is autogenerated by maturin v1.7.0
|
|
2
|
+
# To update, run
|
|
3
|
+
#
|
|
4
|
+
# maturin generate-ci github
|
|
5
|
+
#
|
|
6
|
+
name: CI
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- master
|
|
13
|
+
tags:
|
|
14
|
+
- '*'
|
|
15
|
+
pull_request:
|
|
16
|
+
workflow_dispatch:
|
|
17
|
+
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
linux:
|
|
23
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
24
|
+
strategy:
|
|
25
|
+
matrix:
|
|
26
|
+
platform:
|
|
27
|
+
- runner: ubuntu-latest
|
|
28
|
+
target: x86_64
|
|
29
|
+
- runner: ubuntu-latest
|
|
30
|
+
target: x86
|
|
31
|
+
- runner: ubuntu-latest
|
|
32
|
+
target: aarch64
|
|
33
|
+
- runner: ubuntu-latest
|
|
34
|
+
target: armv7
|
|
35
|
+
- runner: ubuntu-latest
|
|
36
|
+
target: s390x
|
|
37
|
+
- runner: ubuntu-latest
|
|
38
|
+
target: ppc64le
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
- uses: actions/setup-python@v5
|
|
42
|
+
with:
|
|
43
|
+
python-version: 3.x
|
|
44
|
+
- name: Build wheels
|
|
45
|
+
uses: PyO3/maturin-action@v1
|
|
46
|
+
with:
|
|
47
|
+
target: ${{ matrix.platform.target }}
|
|
48
|
+
args: --release --out dist --find-interpreter
|
|
49
|
+
sccache: 'true'
|
|
50
|
+
manylinux: auto
|
|
51
|
+
- name: Upload wheels
|
|
52
|
+
uses: actions/upload-artifact@v4
|
|
53
|
+
with:
|
|
54
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
55
|
+
path: dist
|
|
56
|
+
|
|
57
|
+
musllinux:
|
|
58
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
59
|
+
strategy:
|
|
60
|
+
matrix:
|
|
61
|
+
platform:
|
|
62
|
+
- runner: ubuntu-latest
|
|
63
|
+
target: x86_64
|
|
64
|
+
- runner: ubuntu-latest
|
|
65
|
+
target: x86
|
|
66
|
+
- runner: ubuntu-latest
|
|
67
|
+
target: aarch64
|
|
68
|
+
- runner: ubuntu-latest
|
|
69
|
+
target: armv7
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/checkout@v4
|
|
72
|
+
- uses: actions/setup-python@v5
|
|
73
|
+
with:
|
|
74
|
+
python-version: 3.x
|
|
75
|
+
- name: Build wheels
|
|
76
|
+
uses: PyO3/maturin-action@v1
|
|
77
|
+
with:
|
|
78
|
+
target: ${{ matrix.platform.target }}
|
|
79
|
+
args: --release --out dist --find-interpreter
|
|
80
|
+
sccache: 'true'
|
|
81
|
+
manylinux: musllinux_1_2
|
|
82
|
+
- name: Upload wheels
|
|
83
|
+
uses: actions/upload-artifact@v4
|
|
84
|
+
with:
|
|
85
|
+
name: wheels-musllinux-${{ matrix.platform.target }}
|
|
86
|
+
path: dist
|
|
87
|
+
|
|
88
|
+
windows:
|
|
89
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
90
|
+
strategy:
|
|
91
|
+
matrix:
|
|
92
|
+
platform:
|
|
93
|
+
- runner: windows-latest
|
|
94
|
+
target: x64
|
|
95
|
+
- runner: windows-latest
|
|
96
|
+
target: x86
|
|
97
|
+
steps:
|
|
98
|
+
- uses: actions/checkout@v4
|
|
99
|
+
- uses: actions/setup-python@v5
|
|
100
|
+
with:
|
|
101
|
+
python-version: 3.x
|
|
102
|
+
architecture: ${{ matrix.platform.target }}
|
|
103
|
+
- name: Build wheels
|
|
104
|
+
uses: PyO3/maturin-action@v1
|
|
105
|
+
with:
|
|
106
|
+
target: ${{ matrix.platform.target }}
|
|
107
|
+
args: --release --out dist --find-interpreter
|
|
108
|
+
sccache: 'true'
|
|
109
|
+
- name: Upload wheels
|
|
110
|
+
uses: actions/upload-artifact@v4
|
|
111
|
+
with:
|
|
112
|
+
name: wheels-windows-${{ matrix.platform.target }}
|
|
113
|
+
path: dist
|
|
114
|
+
|
|
115
|
+
macos:
|
|
116
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
117
|
+
strategy:
|
|
118
|
+
matrix:
|
|
119
|
+
platform:
|
|
120
|
+
- runner: macos-12
|
|
121
|
+
target: x86_64
|
|
122
|
+
- runner: macos-14
|
|
123
|
+
target: aarch64
|
|
124
|
+
steps:
|
|
125
|
+
- uses: actions/checkout@v4
|
|
126
|
+
- uses: actions/setup-python@v5
|
|
127
|
+
with:
|
|
128
|
+
python-version: 3.x
|
|
129
|
+
- name: Build wheels
|
|
130
|
+
uses: PyO3/maturin-action@v1
|
|
131
|
+
with:
|
|
132
|
+
target: ${{ matrix.platform.target }}
|
|
133
|
+
args: --release --out dist --find-interpreter
|
|
134
|
+
sccache: 'true'
|
|
135
|
+
- name: Upload wheels
|
|
136
|
+
uses: actions/upload-artifact@v4
|
|
137
|
+
with:
|
|
138
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
139
|
+
path: dist
|
|
140
|
+
|
|
141
|
+
sdist:
|
|
142
|
+
runs-on: ubuntu-latest
|
|
143
|
+
steps:
|
|
144
|
+
- uses: actions/checkout@v4
|
|
145
|
+
- name: Build sdist
|
|
146
|
+
uses: PyO3/maturin-action@v1
|
|
147
|
+
with:
|
|
148
|
+
command: sdist
|
|
149
|
+
args: --out dist
|
|
150
|
+
- name: Upload sdist
|
|
151
|
+
uses: actions/upload-artifact@v4
|
|
152
|
+
with:
|
|
153
|
+
name: wheels-sdist
|
|
154
|
+
path: dist
|
|
155
|
+
|
|
156
|
+
release:
|
|
157
|
+
name: Release
|
|
158
|
+
runs-on: ubuntu-latest
|
|
159
|
+
if: "startsWith(github.ref, 'refs/tags/')"
|
|
160
|
+
needs: [linux, musllinux, windows, macos, sdist]
|
|
161
|
+
environment: release
|
|
162
|
+
permissions:
|
|
163
|
+
id-token: write
|
|
164
|
+
steps:
|
|
165
|
+
- uses: actions/download-artifact@v4
|
|
166
|
+
- name: Publish to PyPI
|
|
167
|
+
uses: PyO3/maturin-action@v1
|
|
168
|
+
with:
|
|
169
|
+
command: upload
|
|
170
|
+
args: --non-interactive --skip-existing wheels-*/*
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 3
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "aho-corasick"
|
|
7
|
+
version = "1.1.3"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"memchr",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[[package]]
|
|
15
|
+
name = "autocfg"
|
|
16
|
+
version = "1.3.0"
|
|
17
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
18
|
+
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
|
|
19
|
+
|
|
20
|
+
[[package]]
|
|
21
|
+
name = "cfg-if"
|
|
22
|
+
version = "1.0.0"
|
|
23
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
24
|
+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
25
|
+
|
|
26
|
+
[[package]]
|
|
27
|
+
name = "convert_case"
|
|
28
|
+
version = "0.4.0"
|
|
29
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
30
|
+
checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
|
|
31
|
+
|
|
32
|
+
[[package]]
|
|
33
|
+
name = "derive_more"
|
|
34
|
+
version = "0.99.18"
|
|
35
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
36
|
+
checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce"
|
|
37
|
+
dependencies = [
|
|
38
|
+
"convert_case",
|
|
39
|
+
"proc-macro2",
|
|
40
|
+
"quote",
|
|
41
|
+
"rustc_version",
|
|
42
|
+
"syn",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
[[package]]
|
|
46
|
+
name = "form_urlencoded"
|
|
47
|
+
version = "1.2.1"
|
|
48
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
49
|
+
checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
|
|
50
|
+
dependencies = [
|
|
51
|
+
"percent-encoding",
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
[[package]]
|
|
55
|
+
name = "heck"
|
|
56
|
+
version = "0.5.0"
|
|
57
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
58
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
59
|
+
|
|
60
|
+
[[package]]
|
|
61
|
+
name = "idna"
|
|
62
|
+
version = "0.5.0"
|
|
63
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
64
|
+
checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
|
|
65
|
+
dependencies = [
|
|
66
|
+
"unicode-bidi",
|
|
67
|
+
"unicode-normalization",
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
[[package]]
|
|
71
|
+
name = "indoc"
|
|
72
|
+
version = "2.0.5"
|
|
73
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
74
|
+
checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
|
|
75
|
+
|
|
76
|
+
[[package]]
|
|
77
|
+
name = "libc"
|
|
78
|
+
version = "0.2.155"
|
|
79
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
80
|
+
checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
|
|
81
|
+
|
|
82
|
+
[[package]]
|
|
83
|
+
name = "memchr"
|
|
84
|
+
version = "2.7.4"
|
|
85
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
86
|
+
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
|
87
|
+
|
|
88
|
+
[[package]]
|
|
89
|
+
name = "memoffset"
|
|
90
|
+
version = "0.9.1"
|
|
91
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
92
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
93
|
+
dependencies = [
|
|
94
|
+
"autocfg",
|
|
95
|
+
]
|
|
96
|
+
|
|
97
|
+
[[package]]
|
|
98
|
+
name = "once_cell"
|
|
99
|
+
version = "1.19.0"
|
|
100
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
101
|
+
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
|
102
|
+
|
|
103
|
+
[[package]]
|
|
104
|
+
name = "percent-encoding"
|
|
105
|
+
version = "2.3.1"
|
|
106
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
107
|
+
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
|
|
108
|
+
|
|
109
|
+
[[package]]
|
|
110
|
+
name = "portable-atomic"
|
|
111
|
+
version = "1.7.0"
|
|
112
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
113
|
+
checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265"
|
|
114
|
+
|
|
115
|
+
[[package]]
|
|
116
|
+
name = "proc-macro2"
|
|
117
|
+
version = "1.0.86"
|
|
118
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
119
|
+
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
|
|
120
|
+
dependencies = [
|
|
121
|
+
"unicode-ident",
|
|
122
|
+
]
|
|
123
|
+
|
|
124
|
+
[[package]]
|
|
125
|
+
name = "pyo3"
|
|
126
|
+
version = "0.22.2"
|
|
127
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
128
|
+
checksum = "831e8e819a138c36e212f3af3fd9eeffed6bf1510a805af35b0edee5ffa59433"
|
|
129
|
+
dependencies = [
|
|
130
|
+
"cfg-if",
|
|
131
|
+
"indoc",
|
|
132
|
+
"libc",
|
|
133
|
+
"memoffset",
|
|
134
|
+
"once_cell",
|
|
135
|
+
"portable-atomic",
|
|
136
|
+
"pyo3-build-config",
|
|
137
|
+
"pyo3-ffi",
|
|
138
|
+
"pyo3-macros",
|
|
139
|
+
"unindent",
|
|
140
|
+
]
|
|
141
|
+
|
|
142
|
+
[[package]]
|
|
143
|
+
name = "pyo3-build-config"
|
|
144
|
+
version = "0.22.2"
|
|
145
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
146
|
+
checksum = "1e8730e591b14492a8945cdff32f089250b05f5accecf74aeddf9e8272ce1fa8"
|
|
147
|
+
dependencies = [
|
|
148
|
+
"once_cell",
|
|
149
|
+
"target-lexicon",
|
|
150
|
+
]
|
|
151
|
+
|
|
152
|
+
[[package]]
|
|
153
|
+
name = "pyo3-ffi"
|
|
154
|
+
version = "0.22.2"
|
|
155
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
156
|
+
checksum = "5e97e919d2df92eb88ca80a037969f44e5e70356559654962cbb3316d00300c6"
|
|
157
|
+
dependencies = [
|
|
158
|
+
"libc",
|
|
159
|
+
"pyo3-build-config",
|
|
160
|
+
]
|
|
161
|
+
|
|
162
|
+
[[package]]
|
|
163
|
+
name = "pyo3-macros"
|
|
164
|
+
version = "0.22.2"
|
|
165
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
166
|
+
checksum = "eb57983022ad41f9e683a599f2fd13c3664d7063a3ac5714cae4b7bee7d3f206"
|
|
167
|
+
dependencies = [
|
|
168
|
+
"proc-macro2",
|
|
169
|
+
"pyo3-macros-backend",
|
|
170
|
+
"quote",
|
|
171
|
+
"syn",
|
|
172
|
+
]
|
|
173
|
+
|
|
174
|
+
[[package]]
|
|
175
|
+
name = "pyo3-macros-backend"
|
|
176
|
+
version = "0.22.2"
|
|
177
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
178
|
+
checksum = "ec480c0c51ddec81019531705acac51bcdbeae563557c982aa8263bb96880372"
|
|
179
|
+
dependencies = [
|
|
180
|
+
"heck",
|
|
181
|
+
"proc-macro2",
|
|
182
|
+
"pyo3-build-config",
|
|
183
|
+
"quote",
|
|
184
|
+
"syn",
|
|
185
|
+
]
|
|
186
|
+
|
|
187
|
+
[[package]]
|
|
188
|
+
name = "python-urlpattern"
|
|
189
|
+
version = "0.1.0"
|
|
190
|
+
dependencies = [
|
|
191
|
+
"pyo3",
|
|
192
|
+
"regex",
|
|
193
|
+
"url",
|
|
194
|
+
"urlpattern",
|
|
195
|
+
]
|
|
196
|
+
|
|
197
|
+
[[package]]
|
|
198
|
+
name = "quote"
|
|
199
|
+
version = "1.0.36"
|
|
200
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
201
|
+
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
|
|
202
|
+
dependencies = [
|
|
203
|
+
"proc-macro2",
|
|
204
|
+
]
|
|
205
|
+
|
|
206
|
+
[[package]]
|
|
207
|
+
name = "regex"
|
|
208
|
+
version = "1.10.5"
|
|
209
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
210
|
+
checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f"
|
|
211
|
+
dependencies = [
|
|
212
|
+
"aho-corasick",
|
|
213
|
+
"memchr",
|
|
214
|
+
"regex-automata",
|
|
215
|
+
"regex-syntax",
|
|
216
|
+
]
|
|
217
|
+
|
|
218
|
+
[[package]]
|
|
219
|
+
name = "regex-automata"
|
|
220
|
+
version = "0.4.7"
|
|
221
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
222
|
+
checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
|
|
223
|
+
dependencies = [
|
|
224
|
+
"aho-corasick",
|
|
225
|
+
"memchr",
|
|
226
|
+
"regex-syntax",
|
|
227
|
+
]
|
|
228
|
+
|
|
229
|
+
[[package]]
|
|
230
|
+
name = "regex-syntax"
|
|
231
|
+
version = "0.8.4"
|
|
232
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
233
|
+
checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
|
|
234
|
+
|
|
235
|
+
[[package]]
|
|
236
|
+
name = "rustc_version"
|
|
237
|
+
version = "0.4.0"
|
|
238
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
239
|
+
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
|
|
240
|
+
dependencies = [
|
|
241
|
+
"semver",
|
|
242
|
+
]
|
|
243
|
+
|
|
244
|
+
[[package]]
|
|
245
|
+
name = "semver"
|
|
246
|
+
version = "1.0.23"
|
|
247
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
248
|
+
checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
|
|
249
|
+
|
|
250
|
+
[[package]]
|
|
251
|
+
name = "serde"
|
|
252
|
+
version = "1.0.204"
|
|
253
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
254
|
+
checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12"
|
|
255
|
+
dependencies = [
|
|
256
|
+
"serde_derive",
|
|
257
|
+
]
|
|
258
|
+
|
|
259
|
+
[[package]]
|
|
260
|
+
name = "serde_derive"
|
|
261
|
+
version = "1.0.204"
|
|
262
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
263
|
+
checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222"
|
|
264
|
+
dependencies = [
|
|
265
|
+
"proc-macro2",
|
|
266
|
+
"quote",
|
|
267
|
+
"syn",
|
|
268
|
+
]
|
|
269
|
+
|
|
270
|
+
[[package]]
|
|
271
|
+
name = "syn"
|
|
272
|
+
version = "2.0.72"
|
|
273
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
274
|
+
checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af"
|
|
275
|
+
dependencies = [
|
|
276
|
+
"proc-macro2",
|
|
277
|
+
"quote",
|
|
278
|
+
"unicode-ident",
|
|
279
|
+
]
|
|
280
|
+
|
|
281
|
+
[[package]]
|
|
282
|
+
name = "target-lexicon"
|
|
283
|
+
version = "0.12.15"
|
|
284
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
285
|
+
checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2"
|
|
286
|
+
|
|
287
|
+
[[package]]
|
|
288
|
+
name = "tinyvec"
|
|
289
|
+
version = "1.8.0"
|
|
290
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
291
|
+
checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938"
|
|
292
|
+
dependencies = [
|
|
293
|
+
"tinyvec_macros",
|
|
294
|
+
]
|
|
295
|
+
|
|
296
|
+
[[package]]
|
|
297
|
+
name = "tinyvec_macros"
|
|
298
|
+
version = "0.1.1"
|
|
299
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
300
|
+
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
|
301
|
+
|
|
302
|
+
[[package]]
|
|
303
|
+
name = "unic-char-property"
|
|
304
|
+
version = "0.9.0"
|
|
305
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
306
|
+
checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221"
|
|
307
|
+
dependencies = [
|
|
308
|
+
"unic-char-range",
|
|
309
|
+
]
|
|
310
|
+
|
|
311
|
+
[[package]]
|
|
312
|
+
name = "unic-char-range"
|
|
313
|
+
version = "0.9.0"
|
|
314
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
315
|
+
checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc"
|
|
316
|
+
|
|
317
|
+
[[package]]
|
|
318
|
+
name = "unic-common"
|
|
319
|
+
version = "0.9.0"
|
|
320
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
321
|
+
checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc"
|
|
322
|
+
|
|
323
|
+
[[package]]
|
|
324
|
+
name = "unic-ucd-ident"
|
|
325
|
+
version = "0.9.0"
|
|
326
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
327
|
+
checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987"
|
|
328
|
+
dependencies = [
|
|
329
|
+
"unic-char-property",
|
|
330
|
+
"unic-char-range",
|
|
331
|
+
"unic-ucd-version",
|
|
332
|
+
]
|
|
333
|
+
|
|
334
|
+
[[package]]
|
|
335
|
+
name = "unic-ucd-version"
|
|
336
|
+
version = "0.9.0"
|
|
337
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
338
|
+
checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4"
|
|
339
|
+
dependencies = [
|
|
340
|
+
"unic-common",
|
|
341
|
+
]
|
|
342
|
+
|
|
343
|
+
[[package]]
|
|
344
|
+
name = "unicode-bidi"
|
|
345
|
+
version = "0.3.15"
|
|
346
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
347
|
+
checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
|
|
348
|
+
|
|
349
|
+
[[package]]
|
|
350
|
+
name = "unicode-ident"
|
|
351
|
+
version = "1.0.12"
|
|
352
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
353
|
+
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
|
354
|
+
|
|
355
|
+
[[package]]
|
|
356
|
+
name = "unicode-normalization"
|
|
357
|
+
version = "0.1.23"
|
|
358
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
359
|
+
checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5"
|
|
360
|
+
dependencies = [
|
|
361
|
+
"tinyvec",
|
|
362
|
+
]
|
|
363
|
+
|
|
364
|
+
[[package]]
|
|
365
|
+
name = "unindent"
|
|
366
|
+
version = "0.2.3"
|
|
367
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
368
|
+
checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce"
|
|
369
|
+
|
|
370
|
+
[[package]]
|
|
371
|
+
name = "url"
|
|
372
|
+
version = "2.5.2"
|
|
373
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
374
|
+
checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c"
|
|
375
|
+
dependencies = [
|
|
376
|
+
"form_urlencoded",
|
|
377
|
+
"idna",
|
|
378
|
+
"percent-encoding",
|
|
379
|
+
]
|
|
380
|
+
|
|
381
|
+
[[package]]
|
|
382
|
+
name = "urlpattern"
|
|
383
|
+
version = "0.2.0"
|
|
384
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
385
|
+
checksum = "f9bd5ff03aea02fa45b13a7980151fe45009af1980ba69f651ec367121a31609"
|
|
386
|
+
dependencies = [
|
|
387
|
+
"derive_more",
|
|
388
|
+
"regex",
|
|
389
|
+
"serde",
|
|
390
|
+
"unic-ucd-ident",
|
|
391
|
+
"url",
|
|
392
|
+
]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "python-urlpattern"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
authors = ["방성범 (Bang Seongbeom) <bangseongbeom@gmail.com>"]
|
|
5
|
+
edition = "2021"
|
|
6
|
+
description = "An implementation of the URL Pattern Standard for Python written in Rust"
|
|
7
|
+
repository = "https://github.com/urlpattern/python-urlpattern"
|
|
8
|
+
license = "MIT"
|
|
9
|
+
keywords = ["urlpattern"]
|
|
10
|
+
categories = ["web-programming"]
|
|
11
|
+
|
|
12
|
+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
13
|
+
[lib]
|
|
14
|
+
crate-type = ["cdylib"]
|
|
15
|
+
|
|
16
|
+
[dependencies]
|
|
17
|
+
pyo3 = "0.22.0"
|
|
18
|
+
regex = "1.10.0"
|
|
19
|
+
url = "2.5.0"
|
|
20
|
+
urlpattern = "0.2.0"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 방성범 (Bang Seongbeom)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: urlpattern
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Development Status :: 4 - Beta
|
|
5
|
+
Classifier: Intended Audience :: Developers
|
|
6
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
7
|
+
Classifier: Operating System :: OS Independent
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Rust
|
|
16
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
17
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
18
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
19
|
+
Classifier: Typing :: Typed
|
|
20
|
+
License-File: LICENSE.txt
|
|
21
|
+
Summary: An implementation of the URL Pattern Standard for Python written in Rust
|
|
22
|
+
Keywords: urlpattern
|
|
23
|
+
Author: 방성범 (Bang Seongbeom) <bangseongbeom@gmail.com>
|
|
24
|
+
Author-email: "방성범 (Bang Seongbeom)" <bangseongbeom@gmail.com>
|
|
25
|
+
License: MIT
|
|
26
|
+
Requires-Python: >=3.8
|
|
27
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
28
|
+
Project-URL: Homepage, https://github.com/urlpattern/python-urlpattern
|
|
29
|
+
Project-URL: Repository, https://github.com/urlpattern/python-urlpattern.git
|
|
30
|
+
Project-URL: Issues, https://github.com/urlpattern/python-urlpattern/issues
|
|
31
|
+
|
|
32
|
+
# URL Pattern
|
|
33
|
+
|
|
34
|
+
An implementation of [the URL Pattern Standard](https://urlpattern.spec.whatwg.org/) for Python written in Rust
|
|
35
|
+
|
|
36
|
+
This is a thin wrapper of [denoland/rust-urlpattern](https://github.com/denoland/rust-urlpattern) with [PyO3](https://github.com/PyO3/pyo3) + [Maturin](https://github.com/PyO3/maturin).
|
|
37
|
+
|
|
38
|
+
## Installation
|
|
39
|
+
|
|
40
|
+
On Linux/UNIX or macOS:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
pip install urlpattern
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
On Windows:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
py -m pip install urlpattern
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Example
|
|
53
|
+
|
|
54
|
+
```py
|
|
55
|
+
from urlpattern import URLPattern
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
pattern = URLPattern("https://example.com/*")
|
|
59
|
+
print(pattern.test("https://example.com/foo/bar")) # output: True
|
|
60
|
+
|
|
61
|
+
pattern = URLPattern({"pathname": "/:foo/:bar"})
|
|
62
|
+
result = pattern.exec("/abc/def", "https://test.example")
|
|
63
|
+
print(result["pathname"]["groups"]["foo"]) # output: abc
|
|
64
|
+
print(result["pathname"]["groups"]["bar"]) # output: def
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
[MIT License](/LICENSE)
|