httpr 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.

Potentially problematic release.


This version of httpr might be problematic. Click here for more details.

@@ -0,0 +1,319 @@
1
+ # This file is autogenerated by maturin v1.8.2
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github -o .github/workflows/CI.yml --pytest
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-22.04
28
+ target: x86_64
29
+ manylinux: auto
30
+ - runner: ubuntu-22.04
31
+ target: x86
32
+ manylinux: auto
33
+ - runner: ubuntu-22.04
34
+ target: aarch64
35
+ manylinux: manylinux_2_28
36
+ - runner: ubuntu-22.04
37
+ target: armv7
38
+ manylinux: manylinux_2_28
39
+ # - runner: ubuntu-22.04
40
+ # target: s390x
41
+ # manylinux: auto
42
+ # - runner: ubuntu-22.04
43
+ # target: ppc64le
44
+ # manylinux: auto
45
+ steps:
46
+ - uses: actions/checkout@v4
47
+ - uses: actions/setup-python@v5
48
+ with:
49
+ python-version: 3.x
50
+ - name: Build wheels
51
+ uses: PyO3/maturin-action@v1
52
+ with:
53
+ target: ${{ matrix.platform.target }}
54
+ args: --release --out dist
55
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
56
+ manylinux: ${{ matrix.platform.manylinux }}
57
+ - name: Build free-threaded wheels
58
+ uses: PyO3/maturin-action@v1
59
+ with:
60
+ target: ${{ matrix.platform.target }}
61
+ args: --release --out dist -i python3.13t
62
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
63
+ manylinux: auto
64
+ - name: Upload wheels
65
+ uses: actions/upload-artifact@v4
66
+ with:
67
+ name: wheels-linux-${{ matrix.platform.target }}
68
+ path: dist
69
+ - name: pytest
70
+ if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
71
+ shell: bash
72
+ run: |
73
+ set -e
74
+ python3 -m venv .venv
75
+ source .venv/bin/activate
76
+ pip install httpr --find-links dist --force-reinstall
77
+ pip install httpr[dev]
78
+ pytest
79
+ - name: pytest
80
+ if: ${{ !startsWith(matrix.platform.target, 'x86') && matrix.platform.target != 'ppc64le' }}
81
+ uses: uraimo/run-on-arch-action@v2
82
+ with:
83
+ arch: ${{ matrix.platform.target }}
84
+ distro: ubuntu22.04
85
+ githubToken: ${{ github.token }}
86
+ install: |
87
+ apt-get update
88
+ apt-get install -y --no-install-recommends python3 python3-pip rustc cargo libffi-dev gcc python3-dev libssl-dev
89
+ run: |
90
+ set -e
91
+ pip3 install httpr --find-links dist --force-reinstall
92
+ pip3 install httpr[dev]
93
+ pytest
94
+
95
+ musllinux:
96
+ runs-on: ${{ matrix.platform.runner }}
97
+ strategy:
98
+ matrix:
99
+ platform:
100
+ - runner: ubuntu-22.04
101
+ target: x86_64
102
+ - runner: ubuntu-22.04
103
+ target: x86
104
+ - runner: ubuntu-22.04
105
+ target: aarch64
106
+ - runner: ubuntu-22.04
107
+ target: armv7
108
+ steps:
109
+ - uses: actions/checkout@v4
110
+ - uses: actions/setup-python@v5
111
+ with:
112
+ python-version: 3.x
113
+ - name: Build wheels
114
+ uses: PyO3/maturin-action@v1
115
+ with:
116
+ target: ${{ matrix.platform.target }}
117
+ args: --release --out dist
118
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
119
+ manylinux: musllinux_1_2
120
+ - name: Build free-threaded wheels
121
+ uses: PyO3/maturin-action@v1
122
+ with:
123
+ target: ${{ matrix.platform.target }}
124
+ args: --release --out dist -i python3.13t
125
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
126
+ manylinux: musllinux_1_2
127
+ - name: Upload wheels
128
+ uses: actions/upload-artifact@v4
129
+ with:
130
+ name: wheels-musllinux-${{ matrix.platform.target }}
131
+ path: dist
132
+ - name: pytest
133
+ if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
134
+ uses: addnab/docker-run-action@v3
135
+ with:
136
+ image: alpine:latest
137
+ options: -v ${{ github.workspace }}:/io -w /io
138
+ run: |
139
+ set -e
140
+ apk add py3-pip py3-virtualenv rust cargo libffi-dev gcc python3-dev openssl-dev
141
+ python3 -m virtualenv .venv
142
+ source .venv/bin/activate
143
+ pip install httpr --no-index --find-links dist --force-reinstall
144
+ pip install httpr[dev]
145
+ pytest
146
+ - name: pytest
147
+ if: ${{ !startsWith(matrix.platform.target, 'x86') }}
148
+ uses: uraimo/run-on-arch-action@v2
149
+ with:
150
+ arch: ${{ matrix.platform.target }}
151
+ distro: alpine_latest
152
+ githubToken: ${{ github.token }}
153
+ install: |
154
+ apk add py3-virtualenv rust cargo libffi-dev gcc python3-dev openssl-dev
155
+ run: |
156
+ set -e
157
+ python3 -m virtualenv .venv
158
+ source .venv/bin/activate
159
+ pip install httpr --find-links dist --force-reinstall
160
+ pip install httpr[dev]
161
+ pytest
162
+
163
+ windows:
164
+ runs-on: ${{ matrix.platform.runner }}
165
+ strategy:
166
+ matrix:
167
+ platform:
168
+ - runner: windows-latest
169
+ target: x64
170
+ - runner: windows-latest
171
+ target: x86
172
+ steps:
173
+ - uses: actions/checkout@v4
174
+ - uses: actions/setup-python@v5
175
+ with:
176
+ python-version: 3.x
177
+ architecture: ${{ matrix.platform.target }}
178
+ - name: Build wheels
179
+ uses: PyO3/maturin-action@v1
180
+ with:
181
+ target: ${{ matrix.platform.target }}
182
+ args: --release --out dist
183
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
184
+ - name: Build free-threaded wheels
185
+ uses: PyO3/maturin-action@v1
186
+ with:
187
+ target: ${{ matrix.platform.target }}
188
+ args: --release --out dist -i python3.13t
189
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
190
+ - name: Upload wheels
191
+ uses: actions/upload-artifact@v4
192
+ with:
193
+ name: wheels-windows-${{ matrix.platform.target }}
194
+ path: dist
195
+ - name: pytest
196
+ shell: bash
197
+ run: |
198
+ set -e
199
+ python3 -m venv .venv
200
+ source .venv/Scripts/activate
201
+ pip install httpr --only-binary :all: --find-links dist --force-reinstall
202
+ pip install httpr[dev]
203
+ pytest
204
+
205
+ macos:
206
+ runs-on: ${{ matrix.platform.runner }}
207
+ strategy:
208
+ matrix:
209
+ platform:
210
+ - runner: macos-13
211
+ target: x86_64
212
+ - runner: macos-14
213
+ target: aarch64
214
+ steps:
215
+ - uses: actions/checkout@v4
216
+ - uses: actions/setup-python@v5
217
+ with:
218
+ python-version: 3.x
219
+ - name: Build wheels
220
+ uses: PyO3/maturin-action@v1
221
+ with:
222
+ target: ${{ matrix.platform.target }}
223
+ args: --release --out dist
224
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
225
+ - name: Build free-threaded wheels
226
+ uses: PyO3/maturin-action@v1
227
+ with:
228
+ target: ${{ matrix.platform.target }}
229
+ args: --release --out dist -i python3.13t
230
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
231
+ - name: Upload wheels
232
+ uses: actions/upload-artifact@v4
233
+ with:
234
+ name: wheels-macos-${{ matrix.platform.target }}
235
+ path: dist
236
+ - name: pytest
237
+ run: |
238
+ set -e
239
+ python3 -m venv .venv
240
+ source .venv/bin/activate
241
+ pip install httpr --find-links dist --force-reinstall
242
+ pip install httpr[dev]
243
+ pytest
244
+
245
+ sdist:
246
+ runs-on: ubuntu-latest
247
+ steps:
248
+ - uses: actions/checkout@v4
249
+ - name: Build sdist
250
+ uses: PyO3/maturin-action@v1
251
+ with:
252
+ command: sdist
253
+ args: --out dist
254
+ - name: Upload sdist
255
+ uses: actions/upload-artifact@v4
256
+ with:
257
+ name: wheels-sdist
258
+ path: dist
259
+
260
+ release:
261
+ name: Release
262
+ environment: pypi
263
+ runs-on: ubuntu-latest
264
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
265
+ needs: [linux, musllinux, windows, macos, sdist]
266
+ permissions:
267
+ # Use to sign the release artifacts
268
+ id-token: write
269
+ # Used to upload release artifacts
270
+ contents: write
271
+ # Used to generate artifact attestation
272
+ attestations: write
273
+ steps:
274
+ - uses: actions/download-artifact@v4
275
+ - name: Generate artifact attestation
276
+ uses: actions/attest-build-provenance@v1
277
+ with:
278
+ subject-path: "wheels-*/*"
279
+ - name: Publish to PyPI
280
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
281
+ uses: PyO3/maturin-action@v1
282
+ env:
283
+ MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
284
+ with:
285
+ command: upload
286
+ args: --non-interactive --skip-existing wheels-*/*
287
+
288
+ benchmark:
289
+ permissions:
290
+ contents: write
291
+ runs-on: ubuntu-latest
292
+ needs: [linux]
293
+ steps:
294
+ - uses: actions/checkout@v4
295
+ - name: Set up Python
296
+ uses: actions/setup-python@v5
297
+ with:
298
+ python-version: 3.x
299
+ - name: Download wheels
300
+ uses: actions/download-artifact@v4
301
+ with:
302
+ name: wheels-linux-x86_64
303
+ - name: Install dependencies
304
+ run: |
305
+ pip install -r benchmark/requirements.txt
306
+ pip install httpr --no-index --find-links ./ --force-reinstall
307
+ - name: Start Uvicorn server
308
+ run: |
309
+ uvicorn benchmark.server:app --host 0.0.0.0 --port 8000 &
310
+ sleep 10
311
+ - name: Run benchmark
312
+ run: python benchmark/benchmark.py
313
+ - name: Generate image
314
+ run: python benchmark/generate_image.py
315
+ - name: Commit generated image if changed
316
+ uses: EndBug/add-and-commit@v9
317
+ with:
318
+ message: "Update generated image"
319
+ add: "*.jpg"
@@ -0,0 +1,29 @@
1
+ name: mkdocs
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ - main
7
+ permissions:
8
+ contents: write
9
+ jobs:
10
+ deploy:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Configure Git Credentials
15
+ run: |
16
+ git config user.name github-actions[bot]
17
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
18
+ - uses: actions/setup-python@v5
19
+ with:
20
+ python-version: 3.x
21
+ - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
22
+ - uses: actions/cache@v4
23
+ with:
24
+ key: mkdocs-material-${{ env.cache_id }}
25
+ path: .cache
26
+ restore-keys: |
27
+ mkdocs-material-
28
+ - run: pip install mkdocs-material
29
+ - run: mkdocs gh-deploy --force
httpr-0.1.0/.gitignore ADDED
@@ -0,0 +1,82 @@
1
+ /target
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ .pytest_cache/
6
+ *.py[cod]
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ .venv/
14
+ env/
15
+ bin/
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ include/
26
+ man/
27
+ venv/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+
32
+ # Installer logs
33
+ pip-log.txt
34
+ pip-delete-this-directory.txt
35
+ pip-selfcheck.json
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .coverage
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+
45
+ # Translations
46
+ *.mo
47
+
48
+ # Mr Developer
49
+ .mr.developer.cfg
50
+ .project
51
+ .pydevproject
52
+
53
+ # Rope
54
+ .ropeproject
55
+
56
+ # Django stuff:
57
+ *.log
58
+ *.pot
59
+
60
+ .DS_Store
61
+
62
+ # Sphinx documentation
63
+ docs/_build/
64
+
65
+ # PyCharm
66
+ .idea/
67
+
68
+ # VSCode
69
+ .vscode/
70
+
71
+ # Pyenv
72
+ .python-version
73
+
74
+ # Ignore csv and jpg files in benchmark folder
75
+ benchmark/*.csv
76
+ benchmark/*.jpg
77
+
78
+ .aider*
79
+ .env
80
+
81
+ *.pem
82
+ *.key
@@ -0,0 +1,32 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ # Ruff version.
4
+ rev: v0.9.3
5
+ hooks:
6
+ # Run the linter.
7
+ - id: ruff
8
+ types_or: [python, pyi]
9
+ args: [--fix]
10
+ # Run the formatter.
11
+ - id: ruff-format
12
+ types_or: [python, pyi]
13
+
14
+ - repo: https://github.com/commitizen-tools/commitizen
15
+ rev: v2.24.0
16
+ hooks:
17
+ - id: commitizen
18
+ stages: [commit-msg]
19
+
20
+ - repo: https://github.com/doublify/pre-commit-rust
21
+ rev: v1.0
22
+ hooks:
23
+ - id: fmt
24
+ - id: cargo-check
25
+ - id: clippy
26
+
27
+ - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
28
+ rev: v8.0.0
29
+ hooks:
30
+ - id: commitlint
31
+ stages: [commit-msg]
32
+ additional_dependencies: ["@commitlint/config-conventional"]