fastapi2postman 0.1.0__tar.gz → 0.1.1__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
1
  Metadata-Version: 2.1
2
2
  Name: fastapi2postman
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: FastAPI APIs to Postman collections
5
5
  Home-page: https://github.com/ashhadahsan/fastapi2postman
6
6
  Author: Ashhad Ahsan Rehman
@@ -0,0 +1,74 @@
1
+ .. _Postman: https://www.postman.com/
2
+ .. _FastAPI: https://fastapi.tiangolo.com/
3
+
4
+ .. _flask2postman: https://github.com/numberly/flask2postman/
5
+ =============
6
+ fastapi2postman
7
+ =============
8
+
9
+ .. image:: https://img.shields.io/pypi/v/flask2postman.svg
10
+ :target: https://pypi.org/project/fastapi2postman
11
+ .. image:: https://img.shields.io/github/license/numberly/flask2postman.svg
12
+ :target: https://github.com/ashhadahsan/fastapi2postman/blob/main/LICENSE
13
+
14
+ |
15
+
16
+ A tool that creates a Postman_ collection from a FastAPI_ application.
17
+
18
+ Inspired from flask2postman_
19
+
20
+
21
+ Install
22
+ =======
23
+
24
+ .. code-block:: sh
25
+
26
+ $ pip install fastapi2postman
27
+
28
+
29
+ Example
30
+ =======
31
+
32
+ Let's say that you have a FastAPI project called "app.py" and you want to generate a Postman collection out of it.
33
+
34
+ You just need to tell :code:`fastapi2postman`
35
+
36
+ .. code-block:: sh
37
+
38
+ $ fastapi2postman --app app.py
39
+
40
+ If you want to change the name of the output file use --output flag, the default name is ofcousre output.json
41
+
42
+ .. code-block:: sh
43
+
44
+ $ fastapi2postman --app app.py --output output.json
45
+
46
+ This will generate the JSON configuration, and write it into the
47
+ :code:`output.json` file. You can then import this file into Postman ("Import
48
+ Collection" button), and profit:
49
+
50
+ On a side note, you can see that endpoint's docstrings are automatically
51
+ imported as descriptions.
52
+
53
+
54
+ Usage
55
+ =====
56
+
57
+ .. code-block:: sh
58
+
59
+ usage: fastapi2postman [-h] [--output OUTPUT] [--name NAME] [--host HOST]
60
+ [--port PORT] --app APP
61
+
62
+ optional arguments:
63
+ -h, --help show this help message and exit
64
+ --output OUTPUT Output file
65
+ --name NAME Collection name
66
+ --host HOST API host
67
+ --port PORT API port
68
+ --app APP Path to FastAPI application instance
69
+
70
+
71
+ License
72
+ =======
73
+
74
+ MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastapi2postman
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: FastAPI APIs to Postman collections
5
5
  Home-page: https://github.com/ashhadahsan/fastapi2postman
6
6
  Author: Ashhad Ahsan Rehman
@@ -1,5 +1,5 @@
1
1
  LICENSE
2
- README.md
2
+ README.rst
3
3
  fastapi2postman.py
4
4
  setup.py
5
5
  fastapi2postman.egg-info/PKG-INFO
@@ -65,7 +65,7 @@ def main():
65
65
  collection["item"].append(item)
66
66
 
67
67
  with open(args.output, "w") as f:
68
- json.dump(collection, f)
68
+ json.dump(collection, f, indent=4)
69
69
 
70
70
 
71
71
  if __name__ == "__main__":
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="fastapi2postman",
5
- version="0.1.0",
5
+ version="0.1.1",
6
6
  description="FastAPI APIs to Postman collections",
7
7
  author="Ashhad Ahsan Rehman",
8
8
  license="MIT",
@@ -1,2 +0,0 @@
1
- # fastapi2postman
2
- fastapi2postman
File without changes