WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

libninjacom/postman-py

Repository files navigation

Stars Build Status Pypi

Postman client, generated from the OpenAPI spec.

Usage

import os
from postman_api import AsyncPostmanClient
from postman_api import PostmanClient

def main():
    client = PostmanClient.from_env()
    response = client.get_all_apis()
    print(f"{response!r}")

async def async_main():
    client = AsyncPostmanClient.from_env()
    response = await client.get_all_apis()
    print(f"{response!r}")


if __name__ == "__main__":
    if os.environ.get("ASYNC"):
        import asyncio
        asyncio.run(async_main())
    else:
        main()

This example loads configuration from environment variables, specifically:

  • POSTMAN_API_KEY

Documentation

You can see working examples of every API call in the examples/ directory.

Contributing

Contributions are welcome!

Library created with Libninja.