httpbinx 1.5.2__py3-none-any.whl → 1.7.0__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.
- httpbinx/__init__.py +1 -8
- httpbinx/cli.py +65 -0
- httpbinx/main.py +0 -10
- httpbinx/routers/statuscodes.py +1 -1
- httpbinx/schemas.py +7 -8
- httpbinx/templates/moby.html +42 -10
- httpbinx/templates/sample.xml +9 -7
- httpbinx/templates/trackingscripts.html +13 -13
- httpbinx-1.7.0.dist-info/METADATA +109 -0
- {httpbinx-1.5.2.dist-info → httpbinx-1.7.0.dist-info}/RECORD +17 -18
- {httpbinx-1.5.2.dist-info → httpbinx-1.7.0.dist-info}/WHEEL +1 -2
- httpbinx-1.7.0.dist-info/entry_points.txt +5 -0
- httpbinx/VERSION +0 -1
- httpbinx/templates/index.html +0 -251
- httpbinx-1.5.2.dist-info/METADATA +0 -86
- httpbinx-1.5.2.dist-info/top_level.txt +0 -1
- {httpbinx-1.5.2.dist-info → httpbinx-1.7.0.dist-info/licenses}/LICENSE +0 -0
httpbinx/__init__.py
CHANGED
@@ -1,12 +1,5 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
# flake8: noqa
|
3
|
-
import pkgutil
|
4
|
-
|
5
1
|
from .main import app
|
6
2
|
|
7
|
-
__version__ =
|
8
|
-
version_info = tuple(int(v) if v.isdigit() else v for v in __version__.split('.'))
|
9
|
-
|
10
|
-
del pkgutil
|
3
|
+
__version__ = '1.7.0'
|
11
4
|
|
12
5
|
app.version = __version__
|
httpbinx/cli.py
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
"""httpbinx"""
|
2
|
+
|
3
|
+
import argparse
|
4
|
+
|
5
|
+
import httpbinx
|
6
|
+
|
7
|
+
|
8
|
+
def version(args):
|
9
|
+
# TODO
|
10
|
+
print(httpbinx.__version__)
|
11
|
+
|
12
|
+
|
13
|
+
def info(args):
|
14
|
+
# TODO
|
15
|
+
pass
|
16
|
+
|
17
|
+
|
18
|
+
def server(args):
|
19
|
+
"""Start the httpbinx server"""
|
20
|
+
import uvicorn
|
21
|
+
uvicorn.run(
|
22
|
+
'httpbinx.main:app',
|
23
|
+
host=args.host,
|
24
|
+
port=args.port
|
25
|
+
)
|
26
|
+
|
27
|
+
|
28
|
+
def execute():
|
29
|
+
parser = argparse.ArgumentParser(
|
30
|
+
prog='httpbinx',
|
31
|
+
description='httpbinx is a fastapi server for testing.'
|
32
|
+
)
|
33
|
+
parser.add_argument('--version', action='version', version='%(prog)s 1.0')
|
34
|
+
subparsers = parser.add_subparsers(dest='command')
|
35
|
+
# version
|
36
|
+
parser_version = subparsers.add_parser('version', help='show version')
|
37
|
+
parser_version.set_defaults(func=version)
|
38
|
+
# info
|
39
|
+
parser_info = subparsers.add_parser('info', help='show info')
|
40
|
+
parser_info.set_defaults(func=info)
|
41
|
+
# server
|
42
|
+
parser_server = subparsers.add_parser('server', help='start server')
|
43
|
+
parser_server.set_defaults(func=server)
|
44
|
+
parser_server.add_argument(
|
45
|
+
'--host',
|
46
|
+
type=str,
|
47
|
+
help='host',
|
48
|
+
default='0.0.0.0'
|
49
|
+
)
|
50
|
+
parser_server.add_argument(
|
51
|
+
'--port',
|
52
|
+
type=int,
|
53
|
+
help='port',
|
54
|
+
default=80
|
55
|
+
)
|
56
|
+
|
57
|
+
parse_args = parser.parse_args()
|
58
|
+
if hasattr(parse_args, 'func'):
|
59
|
+
parse_args.func(parse_args)
|
60
|
+
else:
|
61
|
+
parser.print_help()
|
62
|
+
|
63
|
+
|
64
|
+
if __name__ == '__main__':
|
65
|
+
execute()
|
httpbinx/main.py
CHANGED
@@ -1,9 +1,7 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
1
|
from os import path
|
3
2
|
|
4
3
|
from fastapi import FastAPI
|
5
4
|
from fastapi.staticfiles import StaticFiles
|
6
|
-
from starlette.middleware.cors import CORSMiddleware
|
7
5
|
|
8
6
|
from httpbinx.meta import tags_metadata
|
9
7
|
from httpbinx.routers import router
|
@@ -23,13 +21,5 @@ app.mount(
|
|
23
21
|
name='static'
|
24
22
|
)
|
25
23
|
|
26
|
-
app.add_middleware(
|
27
|
-
CORSMiddleware,
|
28
|
-
allow_origins=['*'],
|
29
|
-
allow_credentials=True,
|
30
|
-
allow_methods=['*'],
|
31
|
-
allow_headers=['*'],
|
32
|
-
)
|
33
|
-
|
34
24
|
# app.openapi_tags = []
|
35
25
|
app.include_router(router=router)
|
httpbinx/routers/statuscodes.py
CHANGED
@@ -12,7 +12,7 @@ router = APIRouter(tags=['Status codes'])
|
|
12
12
|
|
13
13
|
@router.api_route(
|
14
14
|
'/status/{codes}',
|
15
|
-
methods=['GET'
|
15
|
+
methods=['GET'],
|
16
16
|
summary='Return status code or random status code '
|
17
17
|
'if more than one are given',
|
18
18
|
response_description='Response corresponding to different HTTP status codes.'
|
httpbinx/schemas.py
CHANGED
@@ -1,14 +1,10 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
|
+
import json
|
2
3
|
from enum import Enum
|
3
4
|
from functools import lru_cache
|
4
|
-
import
|
5
|
-
from typing import AnyStr
|
6
|
-
from typing import Dict
|
7
|
-
from typing import Union
|
5
|
+
from typing import AnyStr, Dict, Union
|
8
6
|
|
9
|
-
from pydantic import AnyHttpUrl
|
10
|
-
from pydantic import BaseModel
|
11
|
-
from pydantic import Field
|
7
|
+
from pydantic import AnyHttpUrl, BaseModel, Field
|
12
8
|
from starlette.requests import Request
|
13
9
|
|
14
10
|
|
@@ -103,7 +99,10 @@ class RequestAttrs:
|
|
103
99
|
@property
|
104
100
|
def client_host(self) -> str:
|
105
101
|
"""request client host."""
|
106
|
-
|
102
|
+
client = self.request.client
|
103
|
+
if client is None:
|
104
|
+
return ''
|
105
|
+
return client.host
|
107
106
|
|
108
107
|
@property
|
109
108
|
async def data(self):
|
httpbinx/templates/moby.html
CHANGED
@@ -1,14 +1,46 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
<head>
|
4
|
+
</head>
|
5
|
+
<body>
|
6
|
+
<h1>Herman Melville - Moby-Dick</h1>
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
<div>
|
9
|
+
<p>
|
10
|
+
Availing himself of the mild, summer-cool weather that now reigned in these latitudes, and in preparation for
|
11
|
+
the peculiarly active pursuits shortly to be anticipated, Perth, the begrimed, blistered old blacksmith, had not
|
12
|
+
removed his portable forge to the hold again, after concluding his contributory work for Ahab's leg, but still
|
13
|
+
retained it on deck, fast lashed to ringbolts by the foremast; being now almost incessantly invoked by the
|
14
|
+
headsmen, and harpooneers, and bowsmen to do some little job for them; altering, or repairing, or new shaping
|
15
|
+
their various weapons and boat furniture. Often he would be surrounded by an eager circle, all waiting to be
|
16
|
+
served; holding boat-spades, pike-heads, harpoons, and lances, and jealously watching his every sooty movement,
|
17
|
+
as he toiled. Nevertheless, this old man's was a patient hammer wielded by a patient arm. No murmur, no
|
18
|
+
impatience, no petulance did come from him. Silent, slow, and solemn; bowing over still further his chronically
|
19
|
+
broken back, he toiled away, as if toil were life itself, and the heavy beating of his hammer the heavy beating
|
20
|
+
of his heart. And so it was.—Most miserable! A peculiar walk in this old man, a certain slight but painful
|
21
|
+
appearing yawing in his gait, had at an early period of the voyage excited the curiosity of the mariners. And to
|
22
|
+
the importunity of their persisted questionings he had finally given in; and so it came to pass that every one
|
23
|
+
now knew the shameful story of his wretched fate. Belated, and not innocently, one bitter winter's midnight, on
|
24
|
+
the road running between two country towns, the blacksmith half-stupidly felt the deadly numbness stealing over
|
25
|
+
him, and sought refuge in a leaning, dilapidated barn. The issue was, the loss of the extremities of both feet.
|
26
|
+
Out of this revelation, part by part, at last came out the four acts of the gladness, and the one long, and as
|
27
|
+
yet uncatastrophied fifth act of the grief of his life's drama. He was an old man, who, at the age of nearly
|
28
|
+
sixty, had postponedly encountered that thing in sorrow's technicals called ruin. He had been an artisan of
|
29
|
+
famed excellence, and with plenty to do; owned a house and garden; embraced a youthful, daughter-like, loving
|
30
|
+
wife, and three blithe, ruddy children; every Sunday went to a cheerful-looking church, planted in a grove. But
|
31
|
+
one night, under cover of darkness, and further concealed in a most cunning disguisement, a desperate burglar
|
32
|
+
slid into his happy home, and robbed them all of everything. And darker yet to tell, the blacksmith himself did
|
33
|
+
ignorantly conduct this burglar into his family's heart. It was the Bottle Conjuror! Upon the opening of that
|
34
|
+
fatal cork, forth flew the fiend, and shrivelled up his home. Now, for prudent, most wise, and economic reasons,
|
35
|
+
the blacksmith's shop was in the basement of his dwelling, but with a separate entrance to it; so that always
|
36
|
+
had the young and loving healthy wife listened with no unhappy nervousness, but with vigorous pleasure, to the
|
37
|
+
stout ringing of her young-armed old husband's hammer; whose reverberations, muffled by passing through the
|
38
|
+
floors and walls, came up to her, not unsweetly, in her nursery; and so, to stout Labor's iron lullaby, the
|
39
|
+
blacksmith's infants were rocked to slumber. Oh, woe on woe! Oh, Death, why canst thou not sometimes be timely?
|
40
|
+
Hadst thou taken this old blacksmith to thyself ere his full ruin came upon him, then had the young widow had a
|
41
|
+
delicious grief, and her orphans a truly venerable, legendary sire to dream of in their after years; and all of
|
42
|
+
them a care-killing competency.
|
43
|
+
</p>
|
44
|
+
</div>
|
45
|
+
</body>
|
14
46
|
</html>
|
httpbinx/templates/sample.xml
CHANGED
@@ -3,22 +3,24 @@
|
|
3
3
|
<!-- A SAMPLE set of slides -->
|
4
4
|
|
5
5
|
<slideshow
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
title="Sample Slide Show"
|
7
|
+
date="Date of publication"
|
8
|
+
author="Yours Truly"
|
9
|
+
>
|
10
10
|
|
11
11
|
<!-- TITLE SLIDE -->
|
12
12
|
<slide type="all">
|
13
|
-
|
13
|
+
<title>Wake up to WonderWidgets!</title>
|
14
14
|
</slide>
|
15
15
|
|
16
16
|
<!-- OVERVIEW -->
|
17
17
|
<slide type="all">
|
18
18
|
<title>Overview</title>
|
19
|
-
<item>Why <em>WonderWidgets</em> are great
|
19
|
+
<item>Why <em>WonderWidgets</em> are great
|
20
|
+
</item>
|
20
21
|
<item/>
|
21
|
-
<item>Who <em>buys</em> WonderWidgets
|
22
|
+
<item>Who <em>buys</em> WonderWidgets
|
23
|
+
</item>
|
22
24
|
</slide>
|
23
25
|
|
24
26
|
</slideshow>
|
@@ -1,18 +1,18 @@
|
|
1
1
|
{#
|
2
|
-
|
2
|
+
place tracking scripts (like Google Analytics) here
|
3
3
|
#}
|
4
4
|
|
5
5
|
<script type="text/javascript">
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
6
|
+
const _gauges = _gauges || [];
|
7
|
+
(function () {
|
8
|
+
const t = document.createElement('script');
|
9
|
+
t.type = 'text/javascript';
|
10
|
+
t.async = true;
|
11
|
+
t.id = 'gauges-tracker';
|
12
|
+
t.setAttribute('data-site-id', '58cb2e71c88d9043ac01d000');
|
13
|
+
t.setAttribute('data-track-path', 'https://track.gaug.es/track.gif');
|
14
|
+
t.src = 'https://d36ee2fcip1434.cloudfront.net/track.js';
|
15
|
+
const s = document.getElementsByTagName('script')[0];
|
16
|
+
s.parentNode.insertBefore(t, s);
|
17
|
+
})();
|
18
18
|
</script>
|
@@ -0,0 +1,109 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: httpbinx
|
3
|
+
Version: 1.7.0
|
4
|
+
Summary: HTTP Request & Response Service, written in Python + FastAPI.
|
5
|
+
Author-Email: Leo <imleowoo@outlook.com>
|
6
|
+
Maintainer-Email: Leo <imleowoo@outlook.com>
|
7
|
+
License: MIT License
|
8
|
+
|
9
|
+
Copyright (c) 2021 Leo
|
10
|
+
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
13
|
+
in the Software without restriction, including without limitation the rights
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
16
|
+
furnished to do so, subject to the following conditions:
|
17
|
+
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
19
|
+
copies or substantial portions of the Software.
|
20
|
+
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
27
|
+
SOFTWARE.
|
28
|
+
|
29
|
+
Classifier: Programming Language :: Python
|
30
|
+
Classifier: Programming Language :: Python :: 3
|
31
|
+
Classifier: Programming Language :: Python :: 3.8
|
32
|
+
Classifier: Programming Language :: Python :: 3.9
|
33
|
+
Classifier: Programming Language :: Python :: 3.10
|
34
|
+
Classifier: Programming Language :: Python :: 3.11
|
35
|
+
Classifier: Programming Language :: Python :: 3.12
|
36
|
+
Classifier: License :: OSI Approved :: MIT License
|
37
|
+
Project-URL: Homepage, https://github.com/imleowoo/httpbinx
|
38
|
+
Project-URL: Repository, https://github.com/imleowoo/httpbinx
|
39
|
+
Requires-Python: >=3.8
|
40
|
+
Requires-Dist: fastapi
|
41
|
+
Requires-Dist: uvicorn
|
42
|
+
Requires-Dist: starlette
|
43
|
+
Requires-Dist: jinja2
|
44
|
+
Requires-Dist: brotli
|
45
|
+
Requires-Dist: python-multipart
|
46
|
+
Provides-Extra: test
|
47
|
+
Requires-Dist: httpx; extra == "test"
|
48
|
+
Requires-Dist: pytest-cov; extra == "test"
|
49
|
+
Requires-Dist: pytest-mock; extra == "test"
|
50
|
+
Requires-Dist: pytest-xdist; extra == "test"
|
51
|
+
Requires-Dist: pytest; extra == "test"
|
52
|
+
Description-Content-Type: text/markdown
|
53
|
+
|
54
|
+
](https://raw.githubusercontent.com/imleowoo/httpbinx/main/httpbinx/static/images/httpbinx_cover.png)
|
55
|
+
|
56
|
+
[](https://github.com/postmanlabs/httpbin)
|
57
|
+

|
58
|
+
|
59
|
+
# httpbinx
|
60
|
+
|
61
|
+
HTTP Request & Response Service, written in Python + FastAPI.
|
62
|
+
|
63
|
+
## Reference project
|
64
|
+
|
65
|
+
A [Kenneth Reitz](http://kennethreitz.org/bitcoin) Project. See https://github.com/postmanlabs/httpbin
|
66
|
+
|
67
|
+
## Quick Start
|
68
|
+
|
69
|
+
## Installation
|
70
|
+
|
71
|
+
### PyPI
|
72
|
+
|
73
|
+
**[httpbinx](https://pypi.org/project/httpbinx/)** is available on PyPI
|
74
|
+
|
75
|
+
```shell
|
76
|
+
$ pip install httpbinx
|
77
|
+
```
|
78
|
+
|
79
|
+
### Source Code
|
80
|
+
|
81
|
+
```shell
|
82
|
+
$ git clone https://github.com/imleowoo/httpbinx.git
|
83
|
+
$ python setup.py install # or `pip install .`
|
84
|
+
```
|
85
|
+
|
86
|
+
## Run it
|
87
|
+
|
88
|
+
### Run directly
|
89
|
+
|
90
|
+
```shell
|
91
|
+
$ httpbinx server --host=0.0.0.0 --port=80
|
92
|
+
```
|
93
|
+
|
94
|
+
### Run with Docker
|
95
|
+
|
96
|
+
```shell
|
97
|
+
$ docker pull leowoo/httpbinx:latest
|
98
|
+
$ docker run -p 80:80 --name httpbinx leowoo/httpbinx:latest
|
99
|
+
```
|
100
|
+
|
101
|
+
### It starts running
|
102
|
+
|
103
|
+
```text
|
104
|
+
INFO: Started server process [17044]
|
105
|
+
INFO: Waiting for application startup.
|
106
|
+
INFO: Application startup complete.
|
107
|
+
INFO: Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
|
108
|
+
...
|
109
|
+
```
|
@@ -1,12 +1,14 @@
|
|
1
|
-
httpbinx/
|
2
|
-
httpbinx/
|
1
|
+
httpbinx-1.7.0.dist-info/METADATA,sha256=lq16eYKPDfvYVcUQjmKsbJGAxVZ-Oz9yLTew3P9OAww,3730
|
2
|
+
httpbinx-1.7.0.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
3
|
+
httpbinx-1.7.0.dist-info/entry_points.txt,sha256=sRkqxXJlZzL_lyEEQOecT_wue4JP64lYhpLwrPCZ-lI,66
|
4
|
+
httpbinx-1.7.0.dist-info/licenses/LICENSE,sha256=t6oZPzEcm1CsBu9sB_8JYTc5rSOUhyQUee5qvAg4o-A,1060
|
5
|
+
httpbinx/__init__.py,sha256=r5PcxwlTsHcKSegPCbofDdMLXduzUb47_kzegLrOm5w,72
|
6
|
+
httpbinx/cli.py,sha256=bMPWV5HbOzqNJr3HBqFsZkaFqLI5YJneQQpAzF66mOg,1417
|
3
7
|
httpbinx/constants.py,sha256=aJay1yI313fLxfFXgBPLE6p_UABlHq1KGEcdO7Nf2FQ,906
|
8
|
+
httpbinx/examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
9
|
httpbinx/helpers.py,sha256=-fJyFbToQ0QwRY5UZ3Bkx7Ui_nj_bk8Wd4qKRtYGIsg,3787
|
5
|
-
httpbinx/main.py,sha256=
|
10
|
+
httpbinx/main.py,sha256=OmXi1FgApFBxNISDv4m5DU2hKAPu7kGEjZcQ5AxdAJE,614
|
6
11
|
httpbinx/meta.py,sha256=gqWHplgb0SiUFVmZ8-gbOrZA468R-y9uDCQjqeQSHN8,1185
|
7
|
-
httpbinx/schemas.py,sha256=8RAV3xZkVOPgvWL5veyBOT5JSvS404lTdeN_Wu5phIs,4032
|
8
|
-
httpbinx/utils.py,sha256=kMVB5ORarUJj6MdySbb8utCbgyM2WbitSmiDYBAFnSs,464
|
9
|
-
httpbinx/examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
12
|
httpbinx/routers/__init__.py,sha256=xwbZGA3-sV07HCPAly8o5uUJGbdKH3pBHUakXEjvRK4,1409
|
11
13
|
httpbinx/routers/anything.py,sha256=KtNMHx4aEGQS6fc21YdHszorm1_gPIfpYuCkImgQFCA,564
|
12
14
|
httpbinx/routers/auth.py,sha256=nGZA1aQtrS2B74vM2NORHSWMXf5q25JC2J63hAO2_Us,717
|
@@ -14,12 +16,13 @@ httpbinx/routers/cookies.py,sha256=TB3ADXXg0kgZX5nE1QlrVk1mKXjdFAMJ7iMfd8kfMBc,2
|
|
14
16
|
httpbinx/routers/dynamicdata.py,sha256=Cas2JWkQnCaKNuE0Vw84h4YKcfl8PlsvAy6kYdvw_f4,6790
|
15
17
|
httpbinx/routers/httpmethods.py,sha256=X9YPADi9D6FQnybJWyXc5BTDErgFZ5Xa4OIy7OKAifQ,1531
|
16
18
|
httpbinx/routers/images.py,sha256=JBZ08Ez2gmXiGfA-jNXN3SaQzvQMmFkRrX9E0f_k3fk,2261
|
17
|
-
httpbinx/routers/redirects.py,sha256=aEWL1VcEaqzAz-nr7fPgKw1_iA_JCtbzS6syB0Urs4E,3023
|
18
|
-
httpbinx/routers/responseformats.py,sha256=sqRLzSFjUmN5B9urbMVR7X_AydqvuT1pvHGIXyzhedw,4996
|
19
|
-
httpbinx/routers/statuscodes.py,sha256=3vCh_QlNWc9ilkTMnfTPlkKDQubMeM-VQo2Eb0nICNY,1783
|
20
19
|
httpbinx/routers/inspection/__init__.py,sha256=OMPci9p6uK9L6uFKQKbIqOn-r5MndCWSqlw-bJsUE3E,166
|
21
20
|
httpbinx/routers/inspection/request.py,sha256=8b5HEuX2ED-YjMB5S0h-2xZDAmyo4ru9RX2S1tCwaqs,1224
|
22
21
|
httpbinx/routers/inspection/response.py,sha256=yJ46k1O80WO8hq4gF09KHrsQJeP7Cn0aj6AAphfyyAY,2863
|
22
|
+
httpbinx/routers/redirects.py,sha256=aEWL1VcEaqzAz-nr7fPgKw1_iA_JCtbzS6syB0Urs4E,3023
|
23
|
+
httpbinx/routers/responseformats.py,sha256=sqRLzSFjUmN5B9urbMVR7X_AydqvuT1pvHGIXyzhedw,4996
|
24
|
+
httpbinx/routers/statuscodes.py,sha256=Iu0dcGsXLv34otIrH6WrWm_vOHt-9zAnblojM-d_qV0,1740
|
25
|
+
httpbinx/schemas.py,sha256=QxBcsd4Go1azLPWF8E_uLyUVcnzI7Rwny-woDPvAzp0,4029
|
23
26
|
httpbinx/static/UTF-8-demo.txt,sha256=rtAgU6uoYvQ0w7ij9JbkKdw6c3q-RchO1bAmrVzhksw,14058
|
24
27
|
httpbinx/static/favicon.png,sha256=EsETjrMhmZy6X3LgRmOr_nu6dMWYGPGQ4XH3ESebrco,1291
|
25
28
|
httpbinx/static/images/httbinx_logo.png,sha256=wqrQoDwsMvFgXtXeHfmtTqFrnsTA94N_esLo-5yfF58,3893
|
@@ -28,12 +31,8 @@ httpbinx/static/images/jackal.jpg,sha256=wCjXqhXoUbDu-zFjihhWSYojf68YKQUIMtO5sZ-
|
|
28
31
|
httpbinx/static/images/pig_icon.png,sha256=VBoe9Tc749xJ_FQv2aZRd7ZkrsAcjYYI-Z5uyVV32ME,8090
|
29
32
|
httpbinx/static/images/svg_logo.svg,sha256=LRFGCOzBcGDJK23iK_93dKcQjz2ilokvrRMsNSR4rrE,8982
|
30
33
|
httpbinx/static/images/wolf_1.webp,sha256=Vnz6-U668nnOpOsLwFxGVQIftO4ASspSwJZwnTuoemM,10568
|
31
|
-
httpbinx/templates/
|
32
|
-
httpbinx/templates/
|
33
|
-
httpbinx/templates/
|
34
|
-
httpbinx/
|
35
|
-
httpbinx-1.
|
36
|
-
httpbinx-1.5.2.dist-info/METADATA,sha256=i5B2wfXJVRdYRkm4GTynA9qmajuW0UI40Ncl92s6PhI,2309
|
37
|
-
httpbinx-1.5.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
38
|
-
httpbinx-1.5.2.dist-info/top_level.txt,sha256=zg7vMSUefYOTEUftRjOOmG3W5kfueHlHWG7zr46q1jI,9
|
39
|
-
httpbinx-1.5.2.dist-info/RECORD,,
|
34
|
+
httpbinx/templates/moby.html,sha256=o519fgNb4vga6kx6ARW3MYpV7xrRJFzmyrOZwUmrYw8,3962
|
35
|
+
httpbinx/templates/sample.xml,sha256=K12JbH36KNaAaBLkfyOhsUeXc-GfLHluHffGY3l2-V0,550
|
36
|
+
httpbinx/templates/trackingscripts.html,sha256=3E-Lg6NpBpF74H3srJuswtHfD87gNEsuVxsjm9cqIYM,625
|
37
|
+
httpbinx/utils.py,sha256=kMVB5ORarUJj6MdySbb8utCbgyM2WbitSmiDYBAFnSs,464
|
38
|
+
httpbinx-1.7.0.dist-info/RECORD,,
|
httpbinx/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.5.2
|
httpbinx/templates/index.html
DELETED
@@ -1,251 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
|
4
|
-
<head>
|
5
|
-
<meta http-equiv='content-type' value='text/html;charset=utf8'>
|
6
|
-
<meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
|
7
|
-
<title>httpbin(1): HTTP Client Testing Service</title>
|
8
|
-
<style type='text/css' media='all'>
|
9
|
-
/* style: man */
|
10
|
-
|
11
|
-
body#manpage {
|
12
|
-
margin: 0;
|
13
|
-
}
|
14
|
-
|
15
|
-
.mp {
|
16
|
-
max-width: 100ex;
|
17
|
-
padding: 0 9ex 1ex 4ex;
|
18
|
-
}
|
19
|
-
|
20
|
-
.mp p,
|
21
|
-
.mp pre,
|
22
|
-
.mp ul,
|
23
|
-
.mp ol,
|
24
|
-
.mp dl {
|
25
|
-
margin: 0 0 20px 0;
|
26
|
-
}
|
27
|
-
|
28
|
-
.mp h2 {
|
29
|
-
margin: 10px 0 0 0;
|
30
|
-
}
|
31
|
-
|
32
|
-
.mp>p,
|
33
|
-
.mp>pre,
|
34
|
-
.mp>ul,
|
35
|
-
.mp>ol,
|
36
|
-
.mp>dl {
|
37
|
-
margin-left: 8ex;
|
38
|
-
}
|
39
|
-
|
40
|
-
.mp h3 {
|
41
|
-
margin: 0 0 0 4ex;
|
42
|
-
}
|
43
|
-
|
44
|
-
.mp dt {
|
45
|
-
margin: 0;
|
46
|
-
clear: left;
|
47
|
-
}
|
48
|
-
|
49
|
-
.mp dt.flush {
|
50
|
-
float: left;
|
51
|
-
width: 8ex;
|
52
|
-
}
|
53
|
-
|
54
|
-
.mp dd {
|
55
|
-
margin: 0 0 0 9ex;
|
56
|
-
}
|
57
|
-
|
58
|
-
.mp h1,
|
59
|
-
.mp h2,
|
60
|
-
.mp h3,
|
61
|
-
.mp h4 {
|
62
|
-
clear: left;
|
63
|
-
}
|
64
|
-
|
65
|
-
.mp pre {
|
66
|
-
margin-bottom: 20px;
|
67
|
-
}
|
68
|
-
|
69
|
-
.mp pre+h2,
|
70
|
-
.mp pre+h3 {
|
71
|
-
margin-top: 22px;
|
72
|
-
}
|
73
|
-
|
74
|
-
.mp h2+pre,
|
75
|
-
.mp h3+pre {
|
76
|
-
margin-top: 5px;
|
77
|
-
}
|
78
|
-
|
79
|
-
.mp img {
|
80
|
-
display: block;
|
81
|
-
margin: auto;
|
82
|
-
}
|
83
|
-
|
84
|
-
.mp h1.man-title {
|
85
|
-
display: none;
|
86
|
-
}
|
87
|
-
|
88
|
-
.mp,
|
89
|
-
.mp code,
|
90
|
-
.mp pre,
|
91
|
-
.mp tt,
|
92
|
-
.mp kbd,
|
93
|
-
.mp samp,
|
94
|
-
.mp h3,
|
95
|
-
.mp h4 {
|
96
|
-
font-family: monospace;
|
97
|
-
font-size: 14px;
|
98
|
-
line-height: 1.42857142857143;
|
99
|
-
}
|
100
|
-
|
101
|
-
.mp h2 {
|
102
|
-
font-size: 16px;
|
103
|
-
line-height: 1.25;
|
104
|
-
}
|
105
|
-
|
106
|
-
.mp h1 {
|
107
|
-
font-size: 20px;
|
108
|
-
line-height: 2;
|
109
|
-
}
|
110
|
-
|
111
|
-
.mp {
|
112
|
-
text-align: justify;
|
113
|
-
background: #fff;
|
114
|
-
}
|
115
|
-
|
116
|
-
.mp,
|
117
|
-
.mp code,
|
118
|
-
.mp pre,
|
119
|
-
.mp pre code,
|
120
|
-
.mp tt,
|
121
|
-
.mp kbd,
|
122
|
-
.mp samp {
|
123
|
-
color: #131211;
|
124
|
-
}
|
125
|
-
|
126
|
-
.mp h1,
|
127
|
-
.mp h2,
|
128
|
-
.mp h3,
|
129
|
-
.mp h4 {
|
130
|
-
color: #030201;
|
131
|
-
}
|
132
|
-
|
133
|
-
.mp u {
|
134
|
-
text-decoration: underline;
|
135
|
-
}
|
136
|
-
|
137
|
-
.mp code,
|
138
|
-
.mp strong,
|
139
|
-
.mp b {
|
140
|
-
font-weight: bold;
|
141
|
-
color: #131211;
|
142
|
-
}
|
143
|
-
|
144
|
-
.mp em,
|
145
|
-
.mp var {
|
146
|
-
font-style: italic;
|
147
|
-
color: #232221;
|
148
|
-
text-decoration: none;
|
149
|
-
}
|
150
|
-
|
151
|
-
.mp a,
|
152
|
-
.mp a:link,
|
153
|
-
.mp a:hover,
|
154
|
-
.mp a code,
|
155
|
-
.mp a pre,
|
156
|
-
.mp a tt,
|
157
|
-
.mp a kbd,
|
158
|
-
.mp a samp {
|
159
|
-
color: #0000ff;
|
160
|
-
}
|
161
|
-
|
162
|
-
.mp b.man-ref {
|
163
|
-
font-weight: normal;
|
164
|
-
color: #434241;
|
165
|
-
}
|
166
|
-
|
167
|
-
.mp pre {
|
168
|
-
padding: 0 4ex;
|
169
|
-
}
|
170
|
-
|
171
|
-
.mp pre code {
|
172
|
-
font-weight: normal;
|
173
|
-
color: #434241;
|
174
|
-
}
|
175
|
-
|
176
|
-
.mp h2+pre,
|
177
|
-
h3+pre {
|
178
|
-
padding-left: 0;
|
179
|
-
}
|
180
|
-
|
181
|
-
ol.man-decor,
|
182
|
-
ol.man-decor li {
|
183
|
-
margin: 3px 0 10px 0;
|
184
|
-
padding: 0;
|
185
|
-
float: left;
|
186
|
-
width: 33%;
|
187
|
-
list-style-type: none;
|
188
|
-
text-transform: uppercase;
|
189
|
-
color: #999;
|
190
|
-
letter-spacing: 1px;
|
191
|
-
}
|
192
|
-
|
193
|
-
ol.man-decor {
|
194
|
-
width: 100%;
|
195
|
-
}
|
196
|
-
|
197
|
-
ol.man-decor li.tl {
|
198
|
-
text-align: left;
|
199
|
-
}
|
200
|
-
|
201
|
-
ol.man-decor li.tc {
|
202
|
-
text-align: center;
|
203
|
-
letter-spacing: 4px;
|
204
|
-
}
|
205
|
-
|
206
|
-
ol.man-decor li.tr {
|
207
|
-
text-align: right;
|
208
|
-
float: right;
|
209
|
-
}
|
210
|
-
</style>
|
211
|
-
<style type='text/css' media='all'>
|
212
|
-
/* style: 80c */
|
213
|
-
|
214
|
-
.mp {
|
215
|
-
max-width: 86ex
|
216
|
-
}
|
217
|
-
|
218
|
-
ul {
|
219
|
-
list-style: None;
|
220
|
-
margin-left: 1em !important
|
221
|
-
}
|
222
|
-
|
223
|
-
.man-navigation {
|
224
|
-
left: 101ex
|
225
|
-
}
|
226
|
-
|
227
|
-
.scheme-container {
|
228
|
-
display: none !important;
|
229
|
-
}
|
230
|
-
</style>
|
231
|
-
</head>
|
232
|
-
|
233
|
-
<body id='manpage'>
|
234
|
-
<a href="https://github.com/requests/httpbin" class="github-corner" aria-label="View source on Github">
|
235
|
-
<svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;"
|
236
|
-
aria-hidden="true">
|
237
|
-
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
|
238
|
-
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
|
239
|
-
fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
|
240
|
-
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
|
241
|
-
fill="currentColor" class="octo-body"></path>
|
242
|
-
</svg>
|
243
|
-
</a>
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
{% include 'httpbin.1.html' %} {% if tracking_enabled %} {% include 'trackingscripts.html' %} {% endif %}
|
248
|
-
|
249
|
-
</body>
|
250
|
-
|
251
|
-
</html>
|
@@ -1,86 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: httpbinx
|
3
|
-
Version: 1.5.2
|
4
|
-
Summary: HTTP Request & Response Service, written in Python + FastAPI.
|
5
|
-
Home-page: https://github.com/imleowoo/httpbinx
|
6
|
-
Author: Leo
|
7
|
-
Author-email: imleowoo@outlook.com
|
8
|
-
Maintainer: Leo
|
9
|
-
Maintainer-email: imleowoo@outlook.com
|
10
|
-
License: MIT
|
11
|
-
Project-URL: Source, https://github.com/imleowoo/httpbinx
|
12
|
-
Classifier: Programming Language :: Python
|
13
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
15
|
-
Classifier: Programming Language :: Python :: 3.7
|
16
|
-
Classifier: Programming Language :: Python :: 3.8
|
17
|
-
Classifier: Programming Language :: Python :: 3.9
|
18
|
-
Classifier: Programming Language :: Python :: 3.10
|
19
|
-
Classifier: Programming Language :: Python :: 3.11
|
20
|
-
Requires-Python: >=3.7
|
21
|
-
Description-Content-Type: text/markdown
|
22
|
-
License-File: LICENSE
|
23
|
-
Requires-Dist: fastapi
|
24
|
-
Requires-Dist: pydantic
|
25
|
-
Requires-Dist: uvicorn
|
26
|
-
Requires-Dist: starlette
|
27
|
-
Requires-Dist: jinja2
|
28
|
-
Requires-Dist: brotli
|
29
|
-
Requires-Dist: python-multipart
|
30
|
-
|
31
|
-
](https://raw.githubusercontent.com/imleowoo/httpbinx/main/httpbinx/static/images/httpbinx_cover.png)
|
32
|
-
|
33
|
-
[](https://github.com/postmanlabs/httpbin)
|
34
|
-

|
35
|
-
|
36
|
-
# httpbinx
|
37
|
-
|
38
|
-
HTTP Request & Response Service, written in Python + FastAPI.
|
39
|
-
|
40
|
-
## Reference project
|
41
|
-
|
42
|
-
A [Kenneth Reitz](http://kennethreitz.org/bitcoin) Project. See https://github.com/postmanlabs/httpbin
|
43
|
-
|
44
|
-
## Quick Start
|
45
|
-
|
46
|
-
## Installation
|
47
|
-
|
48
|
-
### PyPI
|
49
|
-
|
50
|
-
**[httpbinx](https://pypi.org/project/httpbinx/)** is available on PyPI
|
51
|
-
|
52
|
-
```shell
|
53
|
-
$ pip install httpbinx
|
54
|
-
```
|
55
|
-
|
56
|
-
### Source Code
|
57
|
-
|
58
|
-
```shell
|
59
|
-
$ git clone https://github.com/imleowoo/httpbinx.git
|
60
|
-
$ python setup.py install # or `pip install .`
|
61
|
-
```
|
62
|
-
|
63
|
-
## Run it
|
64
|
-
|
65
|
-
### Run directly
|
66
|
-
|
67
|
-
```shell
|
68
|
-
$ uvicorn httpbinx:app --host=0.0.0.0 --port=80
|
69
|
-
```
|
70
|
-
|
71
|
-
### Run with Docker
|
72
|
-
|
73
|
-
```shell
|
74
|
-
$ docker pull leowoo/httpbinx:latest
|
75
|
-
$ docker run -p 80:80 --name httpbinx leowoo/httpbinx:latest
|
76
|
-
```
|
77
|
-
|
78
|
-
### It starts running
|
79
|
-
|
80
|
-
```text
|
81
|
-
INFO: Started server process [17044]
|
82
|
-
INFO: Waiting for application startup.
|
83
|
-
INFO: Application startup complete.
|
84
|
-
INFO: Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
|
85
|
-
...
|
86
|
-
```
|
@@ -1 +0,0 @@
|
|
1
|
-
httpbinx
|
File without changes
|