Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A repl providing api access using postman configuration

Project Description

# Postman REPL

Postman repl uses IPython to present the user with an interface to communicate with APIs. It loads postman configuration data into global state, allowing for quick and easy communication with an API.

# Features

  • Interactive history
  • Loading postman collections and environments
  • postman environment variable replacement
  • Tab completion
  • Middleware
  • Help descriptions

# Loading

  • You can load middleware, environments, and requests through command line flags
  • You can load new collections at runtime using the load_collection function
  • You can load new environments at runtime using the load_environment function
  • You can load middleware by calling load_middleware

# Requests

  • Requests are loaded into global P variable. Tab completion and help functions supported.
  • Requests are namespaced under there folder name.
  • You can simply call the request with no args to use the default parameters from the Postman config
  • Requests use the “requests” library. You can pass the kwargs for the request.
  • You can pass an environment to the requests, or it will use the global “E” environment
  • Returns the response

# Middleware

  • Middleware is stored in global MW variable
  • Middleware will be called when there is a foldername_request name match
    • For example, if you have a folder “authentication” and a request “authenticate”, your middleware function name should be authentication_authenticate
    • Having no folder is supported, it would just be request name (for example: “authenticate”)
  • Middleware should be defined in a separate python module
  • Middleware is a function that takes 3 parameters
    • The function to run the request, taking a single argument for the kwargs
    • The kwargs that will be ran in the run function
    • The env that the run function will use
  • After request, some global variables are set
    • R holds the response
    • D holds the data
    • J holds the data, parsed as JSON

# History

  • The global H variable holds the history
  • You can see the history by calling H()
  • You can rerun a history call by calling H(index)
  • You can inspect the history with H.history
  • Each history has the response, data, and JSON data attached to it

# TODO

  • TESTS!
  • Support for other serialization formats besides JSON
  • Add auth support
  • Investigate postman unsupported features
Release History

Release History

This version
History Node

0.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
postman_repl-0.0.1-py2.py3-none-any.whl (10.0 kB) Copy SHA256 Checksum SHA256 3.4 Wheel May 4, 2015
postman_repl-0.0.1.tar.gz (8.2 kB) Copy SHA256 Checksum SHA256 Source May 4, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting