Skip to main content

FastAPI APIs to Postman collections

Project description

https://img.shields.io/pypi/v/flask2postman.svg https://img.shields.io/github/license/numberly/flask2postman.svg

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

Inspired from flask2postman

Install

$ pip install fastapi2postman

Example

Let’s say that you have a FastAPI project called “app.py” and you want to generate a Postman collection out of it.

You just need to tell fastapi2postman

$ fastapi2postman --app app.py

If you want to change the name of the output file use –output flag, the default name is ofcousre output.json

$ fastapi2postman --app app.py --output output.json

This will generate the JSON configuration, and write it into the output.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: fastapi2postman [-h] [--output OUTPUT] [--name NAME] [--host HOST]
                   [--port PORT] --app APP
optional arguments:
-h, --help

show this help message and exit

--output OUTPUT

Output file

--name NAME

Collection name

--host HOST

API host

--port PORT

API port

--app APP

Path to FastAPI application instance

License

MIT

Project details


Download files

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

Source Distribution

fastapi2postman-0.1.2.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

fastapi2postman-0.1.2-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

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