Skip to main content

Forks Stargazers Issues MIT License


Logo

GetMan

GetMan is a versatile tool inspired by Postman that simplifies the process of testing and exploring APIs.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Acknowledgments

About The Project

GetMan is a Python-based API testing tool inspired by Postman. It simplifies the process of testing and exploring APIs by providing a simple and intuitive functions for making HTTP requests.

Key features of GetMan include:

  • Versatile HTTP Client: GetMan supports all common HTTP methods and allows you to customize your requests with headers, query parameters, and body data.
  • Queue Management: GetMan allows you to queue your requests and execute them concurrently. This can significantly improve the performance of your program when dealing with a large number of requests.
  • Report Generation: GetMan can generate detailed reports of your API requests, including the request URL, method, status code, headers, and response data.
  • And Much More...

Whether you're a developer testing your own APIs or a tester exploring third-party APIs, GetMan provides a powerful and flexible tool to help you get the job done.

(back to top)

Built With

This project built with the following technologies:

  • Python

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

Before you can use GetMan, you need to have the following software installed on your system:

  • Python
    Install python from https://www.python.org/
    

Installation

To install the library, you can just run the following command:

  1. Install library
    pip install getman
    

(back to top)

Usage

GetMan is designed to be simple and intuitive to use. Below are some examples of how you can use GetMan to test and explore APIs.

Making a Simple GET Request

from getman import GetMan
from getman.constant import HttpMethod
from getman.manager.dict import ParamManager

url = "https://example.com"
version = "your-version"  # Optional
client = GetMan(base_url=url, version=version)
client.add_cookie("sessionid", "RANDOM SESSION ID")

params = ParamManager()
params["category"] = "tools"

route = client.routes("product")
response = client.perform_request(method=HttpMethod.GET, routes=route, params=params.data)

client.get_report(response)

Making a POST Request with JSON Body

from getman import GetMan
from getman.constant import HttpMethod
from getman.manager.dict import DictManager

url = "https://example.com"
version = "your-version"  # Optional
client = GetMan(base_url=url, version=version)
client.add_cookie("sessionid", "RANDOM SESSION ID")

body = DictManager()
body["product_name"] = "getman"

route = client.routes("product")
response = client.perform_request(method=HttpMethod.POST, routes=route, body=body.data)

client.get_report(response)

Making a Queue Request or simulate concurrent requests

from getman import GetMan
from getman.constant import HttpMethod
from getman.manager.dict import DictManager
from getman.utils.decorators import coroutine


@coroutine  # use this to run coroutine
async def main():
    url = "https://example.com"

    client = GetMan(base_url=url)

    body = DictManager()
    body["product_name"] = "getman"

    route = client.routes("product")
    total_request = 100
    for i in range(total_request):
        await client.perform_request(method=HttpMethod.POST, routes=route, body=body.data, queue=True)

    client.execute_queue()  # Execute all queued requests concurrently

For more examples, please refer to the Documentation_

(back to top)

Roadmap

  • Support Mock Server
  • Generate Report such as PDF, HTML, etc
  • Add Security scan
  • Add stress testing

See the open issues for a full list of proposed features ( and known issues).

(back to top)

Contributing

Getman is an open-source project, and we welcome contributions of all kinds. Whether you want to report a bug, request a feature, or submit a pull request, we appreciate your help! Please refer to the contribution guidelines for more information.

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Acknowledgments

(back to top)

Release files for getman 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for getman 1.0.0
File Size Uploaded
getman-1.0.0.tar.gz 22.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for getman 1.0.0
File Interpreter ABI Platform
getman-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 46.5 kB

Release files / getman-1.0.0.tar.gz

Download URL getman-1.0.0.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2af64fcf1b6170ab2dec1057bcec3f07a7a5f48800fd30512abe3ca2a02eecd7
BLAKE2b-256 checksum
How to use checksums
ee5fb3efc12d8cce537a315ff95d41e2dd2225c9776f3cd24ad2a4ec2693ff0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / getman-1.0.0-py3-none-any.whl

Download URL getman-1.0.0-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2db74fe9d8aa9d90b7a1c5ba6c47d22110fec82f2203a93164f9c5bca031272c
BLAKE2b-256 checksum
How to use checksums
35801b92f759e785c74b4db59756a87f9e5d24c9b04e8362fed8d9e33e6d7af8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page