Skip to main content

Generate a Postman collection from your Flask application

Project description

A tool that creates a Postman collection from a Flask application.


$ pip install flask2postman


Let’s say that you have a Flask project called “example” (see, 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 --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:

Postman screenshot

On a side note, you can see that endpoint’s docstrings are automatically imported as descriptions.


usage: flask2postman [-h] [-n NAME] [-b BASE_URL] [-a] [-i] [-f]

positional arguments:

optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Postman collection name (default: current directory
  -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



Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flask2postman, version 1.4.4
Filename, size File type Python version Upload date Hashes
Filename, size flask2postman-1.4.4-py3-none-any.whl (6.2 kB) File type Wheel Python version 3.6 Upload date Hashes View
Filename, size flask2postman-1.4.4.tar.gz (5.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page