Skip to main content

flask2postman

Project description

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

Install

$ pip install flask2postman

Example

We have a Flask project called “example”, (see example.py), and we want to generate a Postman collection out of it.

We just need to tell flask2postman how to import the Flask instance, and optionally give a name to the collection:

$ flask2postman example.app --name "Example Collection" > example.json

This will generate the JSON configuration, and write it into the example.json file.

Then we just have to import this file into Postman (“Import Collection” button, left panel, top right), and profit:

Postman screenshot

Usage

usage: flask2postman [-h] [-n NAME] [-b BASE_URL] [-a] 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
  -i, --indent          indent the output

License

MIT

Download files

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

Source Distribution

flask2postman-1.1.1.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file flask2postman-1.1.1.tar.gz.

File metadata

File hashes

Hashes for flask2postman-1.1.1.tar.gz
Algorithm Hash digest
SHA256 fbc7c6f98a8145be788781b562fbf8771e8ece7bf0a64a8718fbb435f0698bee
MD5 9a086763674dfb47496cb567d1bc452c
BLAKE2b-256 bc7bc7a0fea5edd9915be9d24dd4cfc5e99baac71b4308443a8eb0623307b23a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page