httpbinx 1.6.0__tar.gz → 1.7.0__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. {httpbinx-1.6.0/httpbinx.egg-info → httpbinx-1.7.0}/PKG-INFO +36 -13
  2. {httpbinx-1.6.0 → httpbinx-1.7.0}/README.md +1 -1
  3. httpbinx-1.7.0/httpbinx/__init__.py +5 -0
  4. httpbinx-1.7.0/httpbinx/cli.py +65 -0
  5. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/main.py +0 -10
  6. httpbinx-1.7.0/httpbinx/templates/moby.html +46 -0
  7. httpbinx-1.7.0/httpbinx/templates/sample.xml +26 -0
  8. httpbinx-1.7.0/httpbinx/templates/trackingscripts.html +18 -0
  9. httpbinx-1.7.0/pyproject.toml +63 -0
  10. httpbinx-1.7.0/tests/__init__.py +0 -0
  11. httpbinx-1.6.0/MANIFEST.in +0 -1
  12. httpbinx-1.6.0/PKG-INFO +0 -86
  13. httpbinx-1.6.0/httpbinx/VERSION +0 -1
  14. httpbinx-1.6.0/httpbinx/__init__.py +0 -12
  15. httpbinx-1.6.0/httpbinx/templates/index.html +0 -251
  16. httpbinx-1.6.0/httpbinx/templates/moby.html +0 -14
  17. httpbinx-1.6.0/httpbinx/templates/sample.xml +0 -24
  18. httpbinx-1.6.0/httpbinx/templates/trackingscripts.html +0 -18
  19. httpbinx-1.6.0/httpbinx.egg-info/SOURCES.txt +0 -51
  20. httpbinx-1.6.0/httpbinx.egg-info/dependency_links.txt +0 -1
  21. httpbinx-1.6.0/httpbinx.egg-info/requires.txt +0 -7
  22. httpbinx-1.6.0/httpbinx.egg-info/top_level.txt +0 -1
  23. httpbinx-1.6.0/setup.cfg +0 -4
  24. httpbinx-1.6.0/setup.py +0 -65
  25. {httpbinx-1.6.0 → httpbinx-1.7.0}/LICENSE +0 -0
  26. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/constants.py +0 -0
  27. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/examples/__init__.py +0 -0
  28. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/helpers.py +0 -0
  29. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/meta.py +0 -0
  30. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/routers/__init__.py +0 -0
  31. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/routers/anything.py +0 -0
  32. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/routers/auth.py +0 -0
  33. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/routers/cookies.py +0 -0
  34. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/routers/dynamicdata.py +0 -0
  35. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/routers/httpmethods.py +0 -0
  36. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/routers/images.py +0 -0
  37. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/routers/inspection/__init__.py +0 -0
  38. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/routers/inspection/request.py +0 -0
  39. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/routers/inspection/response.py +0 -0
  40. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/routers/redirects.py +0 -0
  41. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/routers/responseformats.py +0 -0
  42. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/routers/statuscodes.py +0 -0
  43. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/schemas.py +0 -0
  44. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/static/UTF-8-demo.txt +0 -0
  45. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/static/favicon.png +0 -0
  46. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/static/images/httbinx_logo.png +0 -0
  47. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/static/images/httpbinx_cover.png +0 -0
  48. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/static/images/jackal.jpg +0 -0
  49. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/static/images/pig_icon.png +0 -0
  50. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/static/images/svg_logo.svg +0 -0
  51. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/static/images/wolf_1.webp +0 -0
  52. {httpbinx-1.6.0 → httpbinx-1.7.0}/httpbinx/utils.py +0 -0
  53. {httpbinx-1.6.0 → httpbinx-1.7.0}/tests/test_anything.py +0 -0
  54. {httpbinx-1.6.0 → httpbinx-1.7.0}/tests/test_dynamic_data.py +0 -0
  55. {httpbinx-1.6.0 → httpbinx-1.7.0}/tests/test_http_methods.py +0 -0
  56. {httpbinx-1.6.0 → httpbinx-1.7.0}/tests/test_images.py +0 -0
  57. {httpbinx-1.6.0 → httpbinx-1.7.0}/tests/test_redirects.py +0 -0
  58. {httpbinx-1.6.0 → httpbinx-1.7.0}/tests/test_request_inspection.py +0 -0
  59. {httpbinx-1.6.0 → httpbinx-1.7.0}/tests/test_response_formats.py +0 -0
  60. {httpbinx-1.6.0 → httpbinx-1.7.0}/tests/test_status_codes.py +0 -0
@@ -1,32 +1,55 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: httpbinx
3
- Version: 1.6.0
3
+ Version: 1.7.0
4
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
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
+
12
29
  Classifier: Programming Language :: Python
13
- Classifier: Programming Language :: Python :: 3 :: Only
14
30
  Classifier: Programming Language :: Python :: 3
15
31
  Classifier: Programming Language :: Python :: 3.8
16
32
  Classifier: Programming Language :: Python :: 3.9
17
33
  Classifier: Programming Language :: Python :: 3.10
18
34
  Classifier: Programming Language :: Python :: 3.11
19
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
20
39
  Requires-Python: >=3.8
21
- Description-Content-Type: text/markdown
22
- License-File: LICENSE
23
40
  Requires-Dist: fastapi
24
- Requires-Dist: pydantic
25
41
  Requires-Dist: uvicorn
26
42
  Requires-Dist: starlette
27
43
  Requires-Dist: jinja2
28
44
  Requires-Dist: brotli
29
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
30
53
 
31
54
  ![![cover](httpbinx/static/images/httpbinx_cover.png)](https://raw.githubusercontent.com/imleowoo/httpbinx/main/httpbinx/static/images/httpbinx_cover.png)
32
55
 
@@ -65,7 +88,7 @@ $ python setup.py install # or `pip install .`
65
88
  ### Run directly
66
89
 
67
90
  ```shell
68
- $ uvicorn httpbinx:app --host=0.0.0.0 --port=80
91
+ $ httpbinx server --host=0.0.0.0 --port=80
69
92
  ```
70
93
 
71
94
  ### Run with Docker
@@ -35,7 +35,7 @@ $ python setup.py install # or `pip install .`
35
35
  ### Run directly
36
36
 
37
37
  ```shell
38
- $ uvicorn httpbinx:app --host=0.0.0.0 --port=80
38
+ $ httpbinx server --host=0.0.0.0 --port=80
39
39
  ```
40
40
 
41
41
  ### Run with Docker
@@ -0,0 +1,5 @@
1
+ from .main import app
2
+
3
+ __version__ = '1.7.0'
4
+
5
+ app.version = __version__
@@ -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()
@@ -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)
@@ -0,0 +1,46 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ </head>
5
+ <body>
6
+ <h1>Herman Melville - Moby-Dick</h1>
7
+
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>
46
+ </html>
@@ -0,0 +1,26 @@
1
+ <?xml version='1.0' encoding='us-ascii'?>
2
+
3
+ <!-- A SAMPLE set of slides -->
4
+
5
+ <slideshow
6
+ title="Sample Slide Show"
7
+ date="Date of publication"
8
+ author="Yours Truly"
9
+ >
10
+
11
+ <!-- TITLE SLIDE -->
12
+ <slide type="all">
13
+ <title>Wake up to WonderWidgets!</title>
14
+ </slide>
15
+
16
+ <!-- OVERVIEW -->
17
+ <slide type="all">
18
+ <title>Overview</title>
19
+ <item>Why <em>WonderWidgets</em> are great
20
+ </item>
21
+ <item/>
22
+ <item>Who <em>buys</em> WonderWidgets
23
+ </item>
24
+ </slide>
25
+
26
+ </slideshow>
@@ -0,0 +1,18 @@
1
+ {#
2
+ place tracking scripts (like Google Analytics) here
3
+ #}
4
+
5
+ <script type="text/javascript">
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
+ </script>
@@ -0,0 +1,63 @@
1
+ [build-system]
2
+ requires = [
3
+ "pdm-backend",
4
+ ]
5
+ build-backend = "pdm.backend"
6
+
7
+ [project]
8
+ name = "httpbinx"
9
+ dynamic = []
10
+ description = "HTTP Request & Response Service, written in Python + FastAPI."
11
+ readme = "README.md"
12
+ requires-python = ">=3.8"
13
+ dependencies = [
14
+ "fastapi",
15
+ "uvicorn",
16
+ "starlette",
17
+ "jinja2",
18
+ "brotli",
19
+ "python-multipart",
20
+ ]
21
+ authors = [
22
+ { name = "Leo", email = "imleowoo@outlook.com" },
23
+ ]
24
+ maintainers = [
25
+ { name = "Leo", email = "imleowoo@outlook.com" },
26
+ ]
27
+ classifiers = [
28
+ "Programming Language :: Python",
29
+ "Programming Language :: Python :: 3",
30
+ "Programming Language :: Python :: 3.8",
31
+ "Programming Language :: Python :: 3.9",
32
+ "Programming Language :: Python :: 3.10",
33
+ "Programming Language :: Python :: 3.11",
34
+ "Programming Language :: Python :: 3.12",
35
+ "License :: OSI Approved :: MIT License",
36
+ ]
37
+ version = "1.7.0"
38
+
39
+ [project.license]
40
+ file = "LICENSE"
41
+
42
+ [project.scripts]
43
+ httpbinx = "httpbinx.cli:execute"
44
+
45
+ [project.urls]
46
+ Homepage = "https://github.com/imleowoo/httpbinx"
47
+ Repository = "https://github.com/imleowoo/httpbinx"
48
+
49
+ [project.optional-dependencies]
50
+ test = [
51
+ "httpx",
52
+ "pytest-cov",
53
+ "pytest-mock",
54
+ "pytest-xdist",
55
+ "pytest",
56
+ ]
57
+
58
+ [tool.pdm]
59
+ distribution = true
60
+
61
+ [tool.pdm.version]
62
+ source = "file"
63
+ path = "httpbinx/__init__.py"
File without changes
@@ -1 +0,0 @@
1
- recursive-include httpbinx *
httpbinx-1.6.0/PKG-INFO DELETED
@@ -1,86 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: httpbinx
3
- Version: 1.6.0
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.8
16
- Classifier: Programming Language :: Python :: 3.9
17
- Classifier: Programming Language :: Python :: 3.10
18
- Classifier: Programming Language :: Python :: 3.11
19
- Classifier: Programming Language :: Python :: 3.12
20
- Requires-Python: >=3.8
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
- ![![cover](httpbinx/static/images/httpbinx_cover.png)](https://raw.githubusercontent.com/imleowoo/httpbinx/main/httpbinx/static/images/httpbinx_cover.png)
32
-
33
- [![thanks](https://img.shields.io/badge/thanks-httpbin-green)](https://github.com/postmanlabs/httpbin)
34
- ![python](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)
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
- 1.6.0
@@ -1,12 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # flake8: noqa
3
- import pkgutil
4
-
5
- from .main import app
6
-
7
- __version__ = (pkgutil.get_data(__package__, 'VERSION') or b'').decode('ascii').strip()
8
- version_info = tuple(int(v) if v.isdigit() else v for v in __version__.split('.'))
9
-
10
- del pkgutil
11
-
12
- app.version = __version__
@@ -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,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- </head>
5
- <body>
6
- <h1>Herman Melville - Moby-Dick</h1>
7
-
8
- <div>
9
- <p>
10
- Availing himself of the mild, summer-cool weather that now reigned in these latitudes, and in preparation for the peculiarly active pursuits shortly to be anticipated, Perth, the begrimed, blistered old blacksmith, had not removed his portable forge to the hold again, after concluding his contributory work for Ahab's leg, but still retained it on deck, fast lashed to ringbolts by the foremast; being now almost incessantly invoked by the headsmen, and harpooneers, and bowsmen to do some little job for them; altering, or repairing, or new shaping their various weapons and boat furniture. Often he would be surrounded by an eager circle, all waiting to be served; holding boat-spades, pike-heads, harpoons, and lances, and jealously watching his every sooty movement, as he toiled. Nevertheless, this old man's was a patient hammer wielded by a patient arm. No murmur, no impatience, no petulance did come from him. Silent, slow, and solemn; bowing over still further his chronically broken back, he toiled away, as if toil were life itself, and the heavy beating of his hammer the heavy beating of his heart. And so it was.—Most miserable! A peculiar walk in this old man, a certain slight but painful appearing yawing in his gait, had at an early period of the voyage excited the curiosity of the mariners. And to the importunity of their persisted questionings he had finally given in; and so it came to pass that every one now knew the shameful story of his wretched fate. Belated, and not innocently, one bitter winter's midnight, on the road running between two country towns, the blacksmith half-stupidly felt the deadly numbness stealing over him, and sought refuge in a leaning, dilapidated barn. The issue was, the loss of the extremities of both feet. Out of this revelation, part by part, at last came out the four acts of the gladness, and the one long, and as yet uncatastrophied fifth act of the grief of his life's drama. He was an old man, who, at the age of nearly sixty, had postponedly encountered that thing in sorrow's technicals called ruin. He had been an artisan of famed excellence, and with plenty to do; owned a house and garden; embraced a youthful, daughter-like, loving wife, and three blithe, ruddy children; every Sunday went to a cheerful-looking church, planted in a grove. But one night, under cover of darkness, and further concealed in a most cunning disguisement, a desperate burglar slid into his happy home, and robbed them all of everything. And darker yet to tell, the blacksmith himself did ignorantly conduct this burglar into his family's heart. It was the Bottle Conjuror! Upon the opening of that fatal cork, forth flew the fiend, and shrivelled up his home. Now, for prudent, most wise, and economic reasons, the blacksmith's shop was in the basement of his dwelling, but with a separate entrance to it; so that always had the young and loving healthy wife listened with no unhappy nervousness, but with vigorous pleasure, to the stout ringing of her young-armed old husband's hammer; whose reverberations, muffled by passing through the floors and walls, came up to her, not unsweetly, in her nursery; and so, to stout Labor's iron lullaby, the blacksmith's infants were rocked to slumber. Oh, woe on woe! Oh, Death, why canst thou not sometimes be timely? Hadst thou taken this old blacksmith to thyself ere his full ruin came upon him, then had the young widow had a delicious grief, and her orphans a truly venerable, legendary sire to dream of in their after years; and all of them a care-killing competency.
11
- </p>
12
- </div>
13
- </body>
14
- </html>
@@ -1,24 +0,0 @@
1
- <?xml version='1.0' encoding='us-ascii'?>
2
-
3
- <!-- A SAMPLE set of slides -->
4
-
5
- <slideshow
6
- title="Sample Slide Show"
7
- date="Date of publication"
8
- author="Yours Truly"
9
- >
10
-
11
- <!-- TITLE SLIDE -->
12
- <slide type="all">
13
- <title>Wake up to WonderWidgets!</title>
14
- </slide>
15
-
16
- <!-- OVERVIEW -->
17
- <slide type="all">
18
- <title>Overview</title>
19
- <item>Why <em>WonderWidgets</em> are great</item>
20
- <item/>
21
- <item>Who <em>buys</em> WonderWidgets</item>
22
- </slide>
23
-
24
- </slideshow>
@@ -1,18 +0,0 @@
1
- {#
2
- place tracking scripts (like Google Analytics) here
3
- #}
4
-
5
- <script type="text/javascript">
6
- var _gauges = _gauges || [];
7
- (function() {
8
- var 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
- var s = document.getElementsByTagName('script')[0];
16
- s.parentNode.insertBefore(t, s);
17
- })();
18
- </script>
@@ -1,51 +0,0 @@
1
- LICENSE
2
- MANIFEST.in
3
- README.md
4
- setup.py
5
- httpbinx/VERSION
6
- httpbinx/__init__.py
7
- httpbinx/constants.py
8
- httpbinx/helpers.py
9
- httpbinx/main.py
10
- httpbinx/meta.py
11
- httpbinx/schemas.py
12
- httpbinx/utils.py
13
- httpbinx.egg-info/PKG-INFO
14
- httpbinx.egg-info/SOURCES.txt
15
- httpbinx.egg-info/dependency_links.txt
16
- httpbinx.egg-info/requires.txt
17
- httpbinx.egg-info/top_level.txt
18
- httpbinx/examples/__init__.py
19
- httpbinx/routers/__init__.py
20
- httpbinx/routers/anything.py
21
- httpbinx/routers/auth.py
22
- httpbinx/routers/cookies.py
23
- httpbinx/routers/dynamicdata.py
24
- httpbinx/routers/httpmethods.py
25
- httpbinx/routers/images.py
26
- httpbinx/routers/redirects.py
27
- httpbinx/routers/responseformats.py
28
- httpbinx/routers/statuscodes.py
29
- httpbinx/routers/inspection/__init__.py
30
- httpbinx/routers/inspection/request.py
31
- httpbinx/routers/inspection/response.py
32
- httpbinx/static/UTF-8-demo.txt
33
- httpbinx/static/favicon.png
34
- httpbinx/static/images/httbinx_logo.png
35
- httpbinx/static/images/httpbinx_cover.png
36
- httpbinx/static/images/jackal.jpg
37
- httpbinx/static/images/pig_icon.png
38
- httpbinx/static/images/svg_logo.svg
39
- httpbinx/static/images/wolf_1.webp
40
- httpbinx/templates/index.html
41
- httpbinx/templates/moby.html
42
- httpbinx/templates/sample.xml
43
- httpbinx/templates/trackingscripts.html
44
- tests/test_anything.py
45
- tests/test_dynamic_data.py
46
- tests/test_http_methods.py
47
- tests/test_images.py
48
- tests/test_redirects.py
49
- tests/test_request_inspection.py
50
- tests/test_response_formats.py
51
- tests/test_status_codes.py
@@ -1,7 +0,0 @@
1
- fastapi
2
- pydantic
3
- uvicorn
4
- starlette
5
- jinja2
6
- brotli
7
- python-multipart
@@ -1 +0,0 @@
1
- httpbinx
httpbinx-1.6.0/setup.cfg DELETED
@@ -1,4 +0,0 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
httpbinx-1.6.0/setup.py DELETED
@@ -1,65 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- from pathlib import Path
3
-
4
- from setuptools import find_packages, setup
5
-
6
- version = (Path(__file__).parent / 'httpbinx' / 'VERSION').read_text('ascii').strip()
7
-
8
- install_requires = [
9
- 'fastapi',
10
- 'pydantic',
11
- 'uvicorn',
12
- 'starlette',
13
- 'jinja2',
14
- 'brotli',
15
- 'python-multipart'
16
- ]
17
-
18
- test_require = [
19
- 'httpx', # https://fastapi.tiangolo.com/tutorial/testing/
20
- 'pytest-cov',
21
- 'pytest-mock',
22
- 'pytest-xdist',
23
- 'pytest',
24
- ]
25
-
26
- setup(
27
- name='httpbinx',
28
- version=version,
29
- description='HTTP Request & Response Service, '
30
- 'written in Python + FastAPI.',
31
- long_description=open('README.md', encoding='utf-8').read(),
32
- long_description_content_type='text/markdown',
33
- # The project URL
34
- url='https://github.com/imleowoo/httpbinx',
35
-
36
- # Author
37
- author='Leo',
38
- author_email='imleowoo@outlook.com',
39
- maintainer='Leo',
40
- maintainer_email='imleowoo@outlook.com',
41
-
42
- # license
43
- license='MIT',
44
-
45
- classifiers=[
46
- 'Programming Language :: Python',
47
- 'Programming Language :: Python :: 3 :: Only',
48
- 'Programming Language :: Python :: 3',
49
- 'Programming Language :: Python :: 3.8',
50
- 'Programming Language :: Python :: 3.9',
51
- 'Programming Language :: Python :: 3.10',
52
- 'Programming Language :: Python :: 3.11',
53
- 'Programming Language :: Python :: 3.12',
54
- ],
55
- packages=find_packages(
56
- include=['httpbinx'],
57
- ),
58
- include_package_data=True,
59
- install_requires=install_requires,
60
- tests_require=test_require,
61
- python_requires='>=3.8',
62
- project_urls={
63
- 'Source': 'https://github.com/imleowoo/httpbinx',
64
- },
65
- )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes