Socket
Book a DemoInstallSign in
Socket

postman2openapi

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postman2openapi

Convert Postman Collections to OpenAPI (Swagger) specification

1.0.1
pipPyPI
Maintainers
1

Postman2OpenAPI

A Python module to convert Postman collections to OpenAPI (Swagger) format without any third-party dependencies.

Installation

pip install postman2openapi

Usage

from postman2openapi import PostmanToOpenAPIConverter, read_postman_collection, write_openapi_spec

# Read your Postman collection
collection_data = read_postman_collection("path/to/collection.json")

# Create converter instance
converter = PostmanToOpenAPIConverter()

# Convert to OpenAPI
openapi_spec = converter.parse_postman_collection(collection_data)

# Save as YAML (default) or JSON
write_openapi_spec(openapi_spec, "openapi_spec.yaml")  # For YAML
write_openapi_spec(openapi_spec, "openapi_spec.json", format="json")  # For JSON

Features

  • Converts Postman collections to OpenAPI 3.0.0 specification
  • Supports:
    • Basic request information (URL, method, description)
    • Query parameters
    • Request bodies (JSON and form-data)
    • Path parameters
    • Folder structure
  • No third-party dependencies except PyYAML
  • Outputs in both YAML and JSON formats

Development

To set up the development environment:

# Clone the repository
git clone https://github.com/Pulkit-Py/postman2openapi.git
cd postman2openapi

# Create a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Created by Pulkit-Py

Connect with Me

Package Information

  • Version: 1.0.0
  • Last Updated: 2025-05-04
  • Created: 2025-05-04
  • PyPI: postman2openapi

Support

If you found this project helpful, consider:

  • Giving it a ⭐ on GitHub
  • Following me on social media
  • Sharing it with others who might find it useful

Made with ❤️ by Pulkit-Py From 🇮🇳 India

Keywords

postman

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.