http-content-parser 0.0.13__tar.gz → 0.0.15__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.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: http_content_parser
3
- Version: 0.0.13
3
+ Version: 0.0.15
4
4
  Summary: parse http's payload and response
5
5
  Author-email: max su <suleiabc@gmail.com>
6
6
  License-File: LICENSE
@@ -14,14 +14,15 @@ Description-Content-Type: text/markdown
14
14
 
15
15
  This is a http content parser package.
16
16
 
17
- ## package
17
+ ## build package
18
18
 
19
19
  ```bash
20
-
20
+ python3 -m build
21
21
  ```
22
22
 
23
23
  ## upload to pypi
24
24
 
25
25
  ```bash
26
+ rm -f dist/*
26
27
  python3 -m twine upload dist/*
27
28
  ```
@@ -2,14 +2,15 @@
2
2
 
3
3
  This is a http content parser package.
4
4
 
5
- ## package
5
+ ## build package
6
6
 
7
7
  ```bash
8
-
8
+ python3 -m build
9
9
  ```
10
10
 
11
11
  ## upload to pypi
12
12
 
13
13
  ```bash
14
+ rm -f dist/*
14
15
  python3 -m twine upload dist/*
15
16
  ```
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "http_content_parser"
7
- version = "0.0.13"
7
+ version = "0.0.15"
8
8
  authors = [
9
9
  { name="max su", email="suleiabc@gmail.com" },
10
10
  ]
@@ -106,9 +106,8 @@ class CurlParser(object):
106
106
  curl_data = line_i_list[1]
107
107
  else:
108
108
  curl_data = line_i_list[0]
109
- req_data["body"] = re.sub(
110
- r"\n\s*", "", curl_data.replace(" \\\n", "")[:-1]
111
- )
109
+ body = re.sub( r"\n\s*", "", curl_data.replace(" \\\n", ""))
110
+ req_data["body"] = body[:-1]
112
111
 
113
112
  if not req_data.get("method"):
114
113
  req_data["method"] = "post"
@@ -44,7 +44,7 @@ class GenerateApiFile:
44
44
  for payload in payload_list:
45
45
  self.write_api_content_to_yaml(yaml_file, payload)
46
46
  # remove duplicate key
47
- self.remove_duplicate_key_for_yaml(yaml_file)
47
+ # self.remove_duplicate_key_for_yaml(yaml_file)
48
48
 
49
49
  def convert_curl_data_to_model(
50
50
  self, curl_file_path, curl_filter=None
@@ -13,7 +13,7 @@ class TestCases:
13
13
  # with open("./postman.json", "r") as f:
14
14
  # json_dict = json.load(f)
15
15
  # gaf.produce_api_yaml_for_postman(json_dict, "./test.yaml")
16
- curl_file = '/Users/lei.susl/Desktop/test1/iac-dispatcher/tmp'
16
+ curl_file = '/Users/lei.susl/Desktop/test1/iac-dispatcher/tmp2'
17
17
  res = gaf.convert_curl_data_to_model(curl_file_path=curl_file)
18
18
  for r in res:
19
19
  print('body is: \n')