A tool that creates a Postman collection from a Flask application.
Install
$ pip install flask2postman
Example
Let’s say that you have a Flask project called “example” (see
example.py), and you want to generate a Postman collection out of it.
You just need to tell flask2postman how to import the Flask instance,
and optionally give a name to the Postman collection:
$ flask2postman example.app --name "Example Collection" --folders > example.json
If you don’t have a global Flask instance but rather use a function to initialize your application, that works too:
$ flask2postman example.create_app --name "Example Collection" --folders > example.json
This will generate the JSON configuration, and write it into the
example.json file. You can then import this file into Postman (“Import
Collection” button), and profit:
On a side note, you can see that endpoint’s docstrings are automatically imported as descriptions.
Usage
usage: flask2postman [-h] [-n NAME] [-b BASE_URL] [-a] [-i] [-f]
flask_instance
positional arguments:
flask_instance
optional arguments:
-h, --help show this help message and exit
-n NAME, --name NAME Postman collection name (default: current directory
name)
-b BASE_URL, --base_url BASE_URL
the base of every URL (default: {{base_url}})
-a, --all also generate OPTIONS/HEAD methods
-s, --static also generate /static/{{filename}} (Flask internal)
-i, --indent indent the output
-f, --folders add Postman folders for blueprints
License
MIT
Metadata
Release files for flask2postman 1.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| flask2postman-1.4.4.tar.gz | 5.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flask2postman-1.4.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / flask2postman-1.4.4.tar.gz
| Download URL | flask2postman-1.4.4.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f3bfae7c2c7e1c3ce3de3cfecef3d4fdd17ed9eb17479ec94f59a86a9b30a717
|
|
BLAKE2b-256 checksum How to use checksums |
19fc4223b669ba06ebf59af28854d7c9f7f5cdca97b423c2d608cdc295486f57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.6
|
Release files / flask2postman-1.4.4-py3-none-any.whl
| Download URL | flask2postman-1.4.4-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c2ad2244b52b59197d4decfd39d7d6df1c21d5ee6acec8e7feb73210c688ceba
|
|
BLAKE2b-256 checksum How to use checksums |
2d9ed53eb4f20ba923f71b68f3cdb7211b20292390e208257498a0c085b98759
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.6
|
Security for flask2postman 1.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.