Metadata-Version: 2.1
Name: python-postman
Version: 0.3.0
Summary: Pypostman allows users to parse postman environments and postman collections.
License: MIT
Keywords: postman,python-postman,pypostman,api,requests
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic
Requires-Dist: cryptography
Requires-Dist: python-dotenv
Requires-Dist: urllib3
Requires-Dist: requests
Requires-Dist: logbook
Requires-Dist: pendulum
Requires-Dist: boto3
Requires-Dist: pytz
Requires-Dist: retry2
Provides-Extra: black
Requires-Dist: black ; extra == 'black'
Provides-Extra: mypy
Requires-Dist: mypy ; extra == 'mypy'

# Python Postman

**pypostman** is a command-line interface that allows to `automate` multiple api calls from postman collections, additionally it also allow you to `compress` and `save` the response to a local directory or to an AWS S3 bucket.
Thereby allowing you to manage your api calls using postman, then `automate` and `process` their response using python.

Example:

```
from pypostman.postman import Postman
from pypostman.modules.http import Request

postman = Postman()

collections_dir = "../collections"
collections = postman._get_collections(dir=collections_dir)
pokeapi_collection = postman._get_collection(name="PokeAPI", collections=collections)
pokeapi_requests = postman._get_requests(collection=pokeapi_collection)

def pokemon(self, **kwargs):
    # Make an API request.
    # The request name should match the Postman request name.
    name = "/pokemon"
    pokemon = postman._get_request(name=name, requests=pokeapi_requests)
    prepared_request: Request = Request(request=pokemon)
    prepared_request.set_path_vars(kwargs)
    prepared_request.set_params(kwargs)
    response = prepared_request.send
    return response
```
## What is Included?

- The **pypostman** source code.
- collections
  - Coinmarketcap.postman_collection.json
  - PokeAPI.postman_collection.json
- models
  - coinmarketcap_example.py
  - pokeapi_example.py

### Included Modules
- file.py
- http.py
- logger.py

## Installation

### Python >= 3.8

Pypi Test:
  ```
  pip install -i https://test.pypi.org/simple/ python-postman
  ```
Pypi (Not implemented Yet):
  ```  
  pip install python-postman
  ```

## How to Use It

See examples.
