http-content-parser 0.0.16__tar.gz → 0.0.17__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.
Files changed (18) hide show
  1. {http_content_parser-0.0.16 → http_content_parser-0.0.17}/PKG-INFO +1 -1
  2. http_content_parser-0.0.17/pyproject.toml +19 -0
  3. http_content_parser-0.0.17/src/http_content_parser/__init__.py +1 -0
  4. http_content_parser-0.0.17/tests/test_curl.py +20 -0
  5. http_content_parser-0.0.16/pyproject.toml +0 -18
  6. http_content_parser-0.0.16/src/http_content_parser/__init__.py +0 -0
  7. http_content_parser-0.0.16/tests/test_curl.py +0 -33
  8. {http_content_parser-0.0.16 → http_content_parser-0.0.17}/.gitignore +0 -0
  9. {http_content_parser-0.0.16 → http_content_parser-0.0.17}/LICENSE +0 -0
  10. {http_content_parser-0.0.16 → http_content_parser-0.0.17}/README.md +0 -0
  11. {http_content_parser-0.0.16 → http_content_parser-0.0.17}/requirements.txt +0 -0
  12. {http_content_parser-0.0.16 → http_content_parser-0.0.17}/src/http_content_parser/curl_parser.py +0 -0
  13. {http_content_parser-0.0.16 → http_content_parser-0.0.17}/src/http_content_parser/generate_api_file.py +0 -0
  14. {http_content_parser-0.0.16 → http_content_parser-0.0.17}/src/http_content_parser/openapi_parser.py +0 -0
  15. {http_content_parser-0.0.16 → http_content_parser-0.0.17}/src/http_content_parser/param_util.py +0 -0
  16. {http_content_parser-0.0.16 → http_content_parser-0.0.17}/src/http_content_parser/postman_parser.py +0 -0
  17. {http_content_parser-0.0.16 → http_content_parser-0.0.17}/src/http_content_parser/req_data.py +0 -0
  18. {http_content_parser-0.0.16 → http_content_parser-0.0.17}/src/http_content_parser/swagger2_parser.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: http_content_parser
3
- Version: 0.0.16
3
+ Version: 0.0.17
4
4
  Summary: parse http's payload and response
5
5
  Author-email: max su <suleiabc@gmail.com>
6
6
  License-File: LICENSE
@@ -0,0 +1,19 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "http_content_parser"
7
+ version = "0.0.17"
8
+ authors = [{ name = "max su", email = "suleiabc@gmail.com" }]
9
+ description = "parse http's payload and response"
10
+ readme = "README.md"
11
+ requires-python = ">=3.8"
12
+ classifiers = [
13
+ "Programming Language :: Python :: 3",
14
+ "License :: OSI Approved :: MIT License",
15
+ "Operating System :: OS Independent",
16
+ ]
17
+
18
+ [tool.pytest.ini_options]
19
+ pythonpath = [".", "src"]
@@ -0,0 +1,20 @@
1
+ import json
2
+
3
+ from http_content_parser.generate_api_file import GenerateApiFile
4
+
5
+
6
+ def test_curl():
7
+ gaf = GenerateApiFile()
8
+ # with open("./postman.json", "r") as f:
9
+ # json_dict = json.load(f)
10
+ # gaf.produce_api_yaml_for_postman(json_dict, "./test.yaml")
11
+ curl_file = ""
12
+ res = gaf.produce_api_yaml_for_curl(curl_file=curl_file, yaml_file="api.yaml")
13
+
14
+
15
+ def test_for():
16
+ data = {"name": "John", "age": 30, "city": "New York"}
17
+ temp = '{ "job_id":{{job_id}}, "product_id": 4, "local_user_id": 0}'
18
+ temp = json.dumps(data)
19
+ temp = json.loads(temp)
20
+ print(temp)
@@ -1,18 +0,0 @@
1
- [build-system]
2
- requires = ["hatchling"]
3
- build-backend = "hatchling.build"
4
-
5
- [project]
6
- name = "http_content_parser"
7
- version = "0.0.16"
8
- authors = [
9
- { name="max su", email="suleiabc@gmail.com" },
10
- ]
11
- description = "parse http's payload and response"
12
- readme = "README.md"
13
- requires-python = ">=3.8"
14
- classifiers = [
15
- "Programming Language :: Python :: 3",
16
- "License :: OSI Approved :: MIT License",
17
- "Operating System :: OS Independent",
18
- ]
@@ -1,33 +0,0 @@
1
- import json
2
- import sys
3
- from os.path import abspath, join, dirname
4
-
5
- sys.path.insert(0, join(abspath(dirname(__file__)), "src"))
6
- print(sys.path)
7
- from http_content_parser.generate_api_file import GenerateApiFile
8
-
9
-
10
- class TestCases:
11
- def test_curl(self):
12
- gaf = GenerateApiFile()
13
- # with open("./postman.json", "r") as f:
14
- # json_dict = json.load(f)
15
- # gaf.produce_api_yaml_for_postman(json_dict, "./test.yaml")
16
- curl_file = ""
17
- res = gaf.produce_api_yaml_for_curl(
18
- curl_file=curl_file, yaml_file="api.yaml"
19
- )
20
-
21
- def test_for(self):
22
- # c = 1
23
- # for i in range(6):
24
- # if i > c:
25
- # i += 1
26
- # while i < 6:
27
- # i += 1
28
- # print(str(i))
29
- data = {"name": "John", "age": 30, "city": "New York"}
30
- temp = '{ "job_id":{{job_id}}, "product_id": 4, "local_user_id": 0}'
31
- temp = json.dumps(data)
32
- temp = json.loads(temp)
33
- print(temp)