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.
- {fastapi2postman-0.1.0 → fastapi2postman-0.1.1}/PKG-INFO +1 -1
- fastapi2postman-0.1.1/README.rst +74 -0
- {fastapi2postman-0.1.0 → fastapi2postman-0.1.1}/fastapi2postman.egg-info/PKG-INFO +1 -1
- {fastapi2postman-0.1.0 → fastapi2postman-0.1.1}/fastapi2postman.egg-info/SOURCES.txt +1 -1
- {fastapi2postman-0.1.0 → fastapi2postman-0.1.1}/fastapi2postman.py +1 -1
- {fastapi2postman-0.1.0 → fastapi2postman-0.1.1}/setup.py +1 -1
- fastapi2postman-0.1.0/README.md +0 -2
- {fastapi2postman-0.1.0 → fastapi2postman-0.1.1}/LICENSE +0 -0
- {fastapi2postman-0.1.0 → fastapi2postman-0.1.1}/fastapi2postman.egg-info/dependency_links.txt +0 -0
- {fastapi2postman-0.1.0 → fastapi2postman-0.1.1}/fastapi2postman.egg-info/entry_points.txt +0 -0
- {fastapi2postman-0.1.0 → fastapi2postman-0.1.1}/fastapi2postman.egg-info/requires.txt +0 -0
- {fastapi2postman-0.1.0 → fastapi2postman-0.1.1}/fastapi2postman.egg-info/top_level.txt +0 -0
- {fastapi2postman-0.1.0 → fastapi2postman-0.1.1}/setup.cfg +0 -0
|
@@ -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
|
fastapi2postman-0.1.0/README.md
DELETED
|
File without changes
|
{fastapi2postman-0.1.0 → fastapi2postman-0.1.1}/fastapi2postman.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|