Skip to main content

No project description provided

Project description

Fast-Man

PyPI version License: MIT CI Release CodeQL

Fast-Man is a project that aims to automate the creation of postman_collection.json for a FastAPI app. This tool simplifies the process of generating Postman collections, making it easier to test and document your FastAPI APIs.

Table of Contents

Features

  • Automated Postman Collection Generation: Automatically generate a Postman collection from your FastAPI app.
  • Customizable Output: Specify the output file name, collection name, and host URL.
  • Bearer Token Authentication: Supports bearer token authentication for secure API testing.
  • Detailed Route Information: Includes request headers, body, parameters, and responses in the generated collection.

Installation

You can install fast-man using pip:

pip install fast-man

Usage

To generate a Postman collection, use the fast-man command-line tool. You need to provide the path to your FastAPI app, and you can optionally specify the output file, collection name, and host URL.

fast-man --app core.main:app --output postman_collection.json --name "test-api" --host "http://test.com:8000/api/v1" --readme "README.md"

Command-Line Arguments

  • --app: The path to the FastAPI app instance (required).
  • --output: The output file name for the Postman collection (default: postman_collection.json).
  • --name: The name of the Postman collection (default: API Collection).
  • --host: The host URL for the API (default: http://localhost).
  • --readme: The path to the README.md file (default: README.md).

Note: If you want a custom documentation to be displayed in the Postman collection other than your project's README.md, you can use the --readme flag.

Example

Here is an example of how to use fast-man.

Given the project structure:

my-project/
├── core/
│   ├── main.py
├── tests/
│   ├── test_main.py
├── README.md

You can generate the Postman collection using the following command at root:

export PYTHONPATH=$(pwd)
pip install fastapi pydantic requests numpy==1.26.4
pip install -e /Users/renzof/Documents/GitHub/fast-man
fast-man --app core.main:app --output postman_collection.json --name "test-api" --host "http://test.com:8000/api/v1" --readme "README.md"

Project Structure

The project is structured as follows:

  • fast_man/: Contains the main code for the fast-man tool.
    • __init__.py: Initializes the package.
    • converter.py: Contains the logic for generating the Postman collection.
    • utils.py: Utility functions used by the converter.
  • tests/: Contains tests for the fast-man tool.
    • test_converter.py: Tests for the converter module.
  • setup.py: Setup script for packaging the project.
  • LICENSE: License file for the project.
  • .gitignore: Git ignore file to exclude unnecessary files from version control.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contributing

Contributions are welcomed! Please open an issue or submit a pull request on GitHub; or just get in contact.

Contact

For any questions or issues, please contact Renzo Franceschini at [rennf93@gmail.com].

Acknowledgements

Special thanks to the FastAPI and Pydantic communities for their excellent libraries and documentation.

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

fast_man-0.1.1.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

fast_man-0.1.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file fast_man-0.1.1.tar.gz.

File metadata

  • Download URL: fast_man-0.1.1.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for fast_man-0.1.1.tar.gz
Algorithm Hash digest
SHA256 df9c01a3abd5acc5dbc6697173fb39b0cf2c51799047058fc134a38589cd1b06
MD5 71c7d7a4e0fef6b6138e1a1663dcc94e
BLAKE2b-256 92c3dbe74b8b0b9cac306e7aefc9b69f8d26361aa6ac5e4848e20fde41aec787

See more details on using hashes here.

File details

Details for the file fast_man-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fast_man-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for fast_man-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e1dcb98d02ac4aabe0649d954122dd220638da96f0303383ced6280d4afc3d3
MD5 5c55ca29e81cccadc5f114c1226c628a
BLAKE2b-256 de5f4192516d5815dfdf8f56354a657081d8e38ae81f41f4e7d6b458b6e327b3

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