prefxpy 0.1.3__py3-none-any.whl
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.
- LICENSE +21 -0
- THIRD_PARTY_NOTICES.md +78 -0
- prefxpy-0.1.3.dist-info/METADATA +99 -0
- prefxpy-0.1.3.dist-info/RECORD +8 -0
- prefxpy-0.1.3.dist-info/WHEEL +4 -0
- prefxpy-0.1.3.dist-info/entry_points.txt +2 -0
- prefxpy-0.1.3.dist-info/licenses/LICENSE +21 -0
- prefxpy-0.1.3.dist-info/licenses/THIRD_PARTY_NOTICES.md +78 -0
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 kushi
|
|
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.
|
THIRD_PARTY_NOTICES.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
PrefxPy (prefxpy) is licensed under the MIT License. See [LICENSE](LICENSE).
|
|
4
|
+
|
|
5
|
+
This product bundles or depends on the following third-party software.
|
|
6
|
+
When you install `prefxpy` from PyPI, `pip` may also install transitive
|
|
7
|
+
dependencies required by the packages below.
|
|
8
|
+
|
|
9
|
+
## Runtime dependencies (installed with `pip install prefxpy`)
|
|
10
|
+
|
|
11
|
+
| Package | License | Project |
|
|
12
|
+
|---------|---------|---------|
|
|
13
|
+
| aiohttp | Apache License 2.0 | https://github.com/aio-libs/aiohttp |
|
|
14
|
+
| httpx | BSD 3-Clause License | https://github.com/encode/httpx |
|
|
15
|
+
| tomli (Python 3.10 only) | MIT License | https://github.com/hukkin/tomli |
|
|
16
|
+
|
|
17
|
+
Python 3.11 and later use the standard library module `tomllib` instead of
|
|
18
|
+
`tomli`.
|
|
19
|
+
|
|
20
|
+
### Apache License 2.0 (aiohttp)
|
|
21
|
+
|
|
22
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
23
|
+
you may not use this file except in compliance with the License.
|
|
24
|
+
You may obtain a copy of the License at:
|
|
25
|
+
|
|
26
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
27
|
+
|
|
28
|
+
Unless required by applicable law or agreed to in writing, software
|
|
29
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
30
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
31
|
+
See the License for the specific language governing permissions and
|
|
32
|
+
limitations under the License.
|
|
33
|
+
|
|
34
|
+
### BSD 3-Clause License (httpx)
|
|
35
|
+
|
|
36
|
+
Redistribution and use in source and binary forms, with or without
|
|
37
|
+
modification, are permitted provided that the following conditions are met:
|
|
38
|
+
|
|
39
|
+
1. Redistributions of source code must retain the above copyright notice,
|
|
40
|
+
this list of conditions and the following disclaimer.
|
|
41
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
42
|
+
this list of conditions and the following disclaimer in the documentation
|
|
43
|
+
and/or other materials provided with the distribution.
|
|
44
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
45
|
+
contributors may be used to endorse or promote products derived from
|
|
46
|
+
this software without specific prior written permission.
|
|
47
|
+
|
|
48
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
49
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
50
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
51
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
52
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
53
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
54
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
55
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
56
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
57
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
58
|
+
POSSIBILITY OF SUCH DAMAGE.
|
|
59
|
+
|
|
60
|
+
## Development dependencies (optional, `pip install prefxpy[dev]`)
|
|
61
|
+
|
|
62
|
+
These packages are used for tests and linting only. They are **not** required
|
|
63
|
+
to run the `prefxpy` command in production or local use.
|
|
64
|
+
|
|
65
|
+
| Package | License | Project |
|
|
66
|
+
|---------|---------|---------|
|
|
67
|
+
| pytest | MIT License | https://github.com/pytest-dev/pytest |
|
|
68
|
+
| pytest-asyncio | Apache License 2.0 | https://github.com/pytest-dev/pytest-asyncio |
|
|
69
|
+
| ruff | MIT License | https://github.com/astral-sh/ruff |
|
|
70
|
+
|
|
71
|
+
## Notes
|
|
72
|
+
|
|
73
|
+
- License texts above are summaries for convenience. The authoritative license
|
|
74
|
+
for each dependency is included in that package's installation metadata and
|
|
75
|
+
source repository.
|
|
76
|
+
- If your organization requires a full compliance review, obtain the complete
|
|
77
|
+
license files from each installed package (for example under
|
|
78
|
+
`site-packages/` after installation).
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: prefxpy
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: Local dev reverse proxy to reproduce production prefix and forwarded-header behavior.
|
|
5
|
+
Project-URL: Homepage, https://github.com/smyrk2031/prefxpy
|
|
6
|
+
Project-URL: Documentation, https://smyrk2031.github.io/prefxpy/
|
|
7
|
+
Project-URL: Repository, https://github.com/smyrk2031/prefxpy
|
|
8
|
+
Project-URL: Issues, https://github.com/smyrk2031/prefxpy/issues
|
|
9
|
+
Author: kushi
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
License-File: THIRD_PARTY_NOTICES.md
|
|
13
|
+
Keywords: django,fastapi,flask,proxy,reverse-proxy,subpath
|
|
14
|
+
Requires-Python: >=3.10
|
|
15
|
+
Requires-Dist: aiohttp>=3.10.0
|
|
16
|
+
Requires-Dist: httpx>=0.27.0
|
|
17
|
+
Requires-Dist: tomli>=2.0.1; python_version < '3.11'
|
|
18
|
+
Provides-Extra: dev
|
|
19
|
+
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
|
|
20
|
+
Requires-Dist: pytest>=8.3.0; extra == 'dev'
|
|
21
|
+
Requires-Dist: ruff>=0.8.0; extra == 'dev'
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# PrefxPy
|
|
25
|
+
|
|
26
|
+
[](https://github.com/smyrk2031/prefxpy/actions/workflows/ci.yml)
|
|
27
|
+
[](https://pypi.org/project/prefxpy/)
|
|
28
|
+
[](https://pypi.org/project/prefxpy/)
|
|
29
|
+
[](LICENSE)
|
|
30
|
+
|
|
31
|
+
A small local reverse proxy for reproducing **production subpath / reverse-proxy issues** during development.
|
|
32
|
+
|
|
33
|
+
Works well when your app behaves differently behind a path prefix (e.g. `/myapp/`) or with `X-Forwarded-*` headers — problems that often only show up in staging or production.
|
|
34
|
+
|
|
35
|
+
**Not** a high-performance production proxy. Use it for local verification with FastAPI, Django, Flask, and similar stacks.
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install prefxpy
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Quick start
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
prefxpy
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Defaults:
|
|
50
|
+
|
|
51
|
+
- Public URL: `http://127.0.0.1:9000/myapp/`
|
|
52
|
+
- Upstream: `http://127.0.0.1:8000`
|
|
53
|
+
|
|
54
|
+
Another upstream port:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
prefxpy --target http://127.0.0.1:5000
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
On startup, PrefxPy prints the **URL to open** in your browser.
|
|
61
|
+
|
|
62
|
+
## Config file
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
prefxpy --config prefxpy.toml
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
See [`examples/prefxpy.example.toml`](examples/prefxpy.example.toml) for a sample. CLI flags override file values when set.
|
|
69
|
+
|
|
70
|
+
By default PrefxPy sets these forwarded headers on upstream requests:
|
|
71
|
+
|
|
72
|
+
- `X-Forwarded-Host`
|
|
73
|
+
- `X-Forwarded-Proto`
|
|
74
|
+
- `X-Forwarded-Prefix`
|
|
75
|
+
- `X-Forwarded-For`
|
|
76
|
+
|
|
77
|
+
## Development
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
git clone https://github.com/smyrk2031/prefxpy.git
|
|
81
|
+
cd prefxpy
|
|
82
|
+
pip install -e ".[dev]"
|
|
83
|
+
pytest
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Publishing to TestPyPI / PyPI: [`docs/PYPI.md`](docs/PYPI.md).
|
|
87
|
+
|
|
88
|
+
## Documentation
|
|
89
|
+
|
|
90
|
+
| Language | Topic |
|
|
91
|
+
|----------|-------|
|
|
92
|
+
| 日本語 | [仕様](docs/仕様.md) · [設計](docs/設計.md) |
|
|
93
|
+
| English | This README · [Project site](https://smyrk2031.github.io/prefxpy/) |
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
PrefxPy is released under the [MIT License](LICENSE).
|
|
98
|
+
|
|
99
|
+
Third-party licenses for runtime dependencies (aiohttp, httpx, etc.) are listed in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
LICENSE,sha256=82PO4rvbV_UIsG6G3NwZRVbpokPOz2J9G2Y5_-w05HE,1062
|
|
2
|
+
THIRD_PARTY_NOTICES.md,sha256=iSrCHxq8DCDK-Yvx2DeJZw64VKk6CgKcnRCAOlpKOGo,3603
|
|
3
|
+
prefxpy-0.1.3.dist-info/METADATA,sha256=8EjfXW6DqzlgOV1kYKVCccu9rQsjX3SfaQGkAFpdGZo,2977
|
|
4
|
+
prefxpy-0.1.3.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
5
|
+
prefxpy-0.1.3.dist-info/entry_points.txt,sha256=0jL6hgdnhPNIzKNNIiU0ni4uR4S_5hgc6uWhyUR7sM0,45
|
|
6
|
+
prefxpy-0.1.3.dist-info/licenses/LICENSE,sha256=82PO4rvbV_UIsG6G3NwZRVbpokPOz2J9G2Y5_-w05HE,1062
|
|
7
|
+
prefxpy-0.1.3.dist-info/licenses/THIRD_PARTY_NOTICES.md,sha256=iSrCHxq8DCDK-Yvx2DeJZw64VKk6CgKcnRCAOlpKOGo,3603
|
|
8
|
+
prefxpy-0.1.3.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 kushi
|
|
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,78 @@
|
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
PrefxPy (prefxpy) is licensed under the MIT License. See [LICENSE](LICENSE).
|
|
4
|
+
|
|
5
|
+
This product bundles or depends on the following third-party software.
|
|
6
|
+
When you install `prefxpy` from PyPI, `pip` may also install transitive
|
|
7
|
+
dependencies required by the packages below.
|
|
8
|
+
|
|
9
|
+
## Runtime dependencies (installed with `pip install prefxpy`)
|
|
10
|
+
|
|
11
|
+
| Package | License | Project |
|
|
12
|
+
|---------|---------|---------|
|
|
13
|
+
| aiohttp | Apache License 2.0 | https://github.com/aio-libs/aiohttp |
|
|
14
|
+
| httpx | BSD 3-Clause License | https://github.com/encode/httpx |
|
|
15
|
+
| tomli (Python 3.10 only) | MIT License | https://github.com/hukkin/tomli |
|
|
16
|
+
|
|
17
|
+
Python 3.11 and later use the standard library module `tomllib` instead of
|
|
18
|
+
`tomli`.
|
|
19
|
+
|
|
20
|
+
### Apache License 2.0 (aiohttp)
|
|
21
|
+
|
|
22
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
23
|
+
you may not use this file except in compliance with the License.
|
|
24
|
+
You may obtain a copy of the License at:
|
|
25
|
+
|
|
26
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
27
|
+
|
|
28
|
+
Unless required by applicable law or agreed to in writing, software
|
|
29
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
30
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
31
|
+
See the License for the specific language governing permissions and
|
|
32
|
+
limitations under the License.
|
|
33
|
+
|
|
34
|
+
### BSD 3-Clause License (httpx)
|
|
35
|
+
|
|
36
|
+
Redistribution and use in source and binary forms, with or without
|
|
37
|
+
modification, are permitted provided that the following conditions are met:
|
|
38
|
+
|
|
39
|
+
1. Redistributions of source code must retain the above copyright notice,
|
|
40
|
+
this list of conditions and the following disclaimer.
|
|
41
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
42
|
+
this list of conditions and the following disclaimer in the documentation
|
|
43
|
+
and/or other materials provided with the distribution.
|
|
44
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
45
|
+
contributors may be used to endorse or promote products derived from
|
|
46
|
+
this software without specific prior written permission.
|
|
47
|
+
|
|
48
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
49
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
50
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
51
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
52
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
53
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
54
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
55
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
56
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
57
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
58
|
+
POSSIBILITY OF SUCH DAMAGE.
|
|
59
|
+
|
|
60
|
+
## Development dependencies (optional, `pip install prefxpy[dev]`)
|
|
61
|
+
|
|
62
|
+
These packages are used for tests and linting only. They are **not** required
|
|
63
|
+
to run the `prefxpy` command in production or local use.
|
|
64
|
+
|
|
65
|
+
| Package | License | Project |
|
|
66
|
+
|---------|---------|---------|
|
|
67
|
+
| pytest | MIT License | https://github.com/pytest-dev/pytest |
|
|
68
|
+
| pytest-asyncio | Apache License 2.0 | https://github.com/pytest-dev/pytest-asyncio |
|
|
69
|
+
| ruff | MIT License | https://github.com/astral-sh/ruff |
|
|
70
|
+
|
|
71
|
+
## Notes
|
|
72
|
+
|
|
73
|
+
- License texts above are summaries for convenience. The authoritative license
|
|
74
|
+
for each dependency is included in that package's installation metadata and
|
|
75
|
+
source repository.
|
|
76
|
+
- If your organization requires a full compliance review, obtain the complete
|
|
77
|
+
license files from each installed package (for example under
|
|
78
|
+
`site-packages/` after installation).
|