Skip to content

A modern, graphical REST API testing client for desktop users. Built using Python and PyQt5. Graphical REST and API testing client for desktop users. Built using Python and PyQt5.

License

Notifications You must be signed in to change notification settings

BaseMax/qt-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Qt API Client

A modern, graphical REST API testing client for desktop users. Built using Python and PyQt5.

License Python

Screenshot

Qt API Client Interface

Main interface showing request builder, response viewer, and collections panel

Features

  • Modern Qt Interface: Clean and intuitive user interface built with PyQt5
  • HTTP Methods Support: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
  • Request Collections: Organize and save requests in collections
  • Multiple Authentication Methods:
    • Basic Authentication
    • Bearer Token
    • API Key
  • Environment Variables: Manage multiple environments with variable substitution
  • Response Visualization:
    • Formatted JSON display
    • Headers and cookies viewer
    • Response time tracking
    • Status code color coding
  • Request History: Track and replay previous requests
  • Import/Export: Save and share collections as JSON files

Installation

Prerequisites

  • Python 3.7 or higher
  • pip package manager

Setup

  1. Clone the repository:
git clone https://github.com/BaseMax/qt-api-client.git
cd qt-api-client
  1. Install dependencies:
pip install -r requirements.txt

Usage

Run the application:

python main.py

Demo Script

Test the core functionality without the GUI:

python demo.py

This will demonstrate:

  • Making API requests
  • Managing collections
  • Environment variables
  • Authentication methods
  • Request history

Quick Start

  1. Making a Request:

    • Enter the URL in the address bar
    • Select the HTTP method (GET, POST, etc.)
    • Add headers, query parameters, or body as needed
    • Click "Send" to execute the request
  2. Using Environment Variables:

    • Go to Tools → Environments
    • Create a new environment
    • Add variables (e.g., base_url, api_key)
    • Use variables in requests with {{variable_name}} syntax
  3. Saving Requests:

    • Create a collection from the Collections panel
    • Add requests to the collection
    • Right-click on requests to manage them
  4. Authentication:

    • Use the Authentication tab in the request panel
    • Select your auth type (Basic, Bearer, API Key)
    • Enter credentials
  5. Viewing History:

    • Go to View → History
    • Browse previous requests
    • Load any request to replay it

Example Collections

The examples/ directory contains sample collections you can import:

  • jsonplaceholder-collection.json - Examples using JSONPlaceholder API
  • github-collection.json - Examples using GitHub API

To import an example:

  1. File → Import Collection
  2. Select a JSON file from the examples/ directory
  3. The collection will appear in your Collections panel

Project Structure

qt-api-client/
├── main.py                 # Application entry point
├── requirements.txt        # Python dependencies
├── src/
│   ├── core/              # Core business logic
│   │   ├── request_manager.py      # HTTP request handling
│   │   ├── collection_manager.py   # Collection management
│   │   ├── environment_manager.py  # Environment variables
│   │   ├── history_manager.py      # Request history
│   │   └── authentication.py       # Authentication methods
│   └── ui/                # User interface components
│       ├── main_window.py          # Main application window
│       ├── request_panel.py        # Request builder panel
│       ├── response_panel.py       # Response viewer
│       ├── collection_panel.py     # Collections sidebar
│       ├── history_panel.py        # History dialog
│       └── environment_dialog.py   # Environment manager
└── README.md

Architecture

The application follows a modular architecture:

  • Core Layer: Business logic separated from UI

    • Request handling with the requests library
    • Data persistence using JSON files
    • Environment variable substitution
    • Authentication management
  • UI Layer: PyQt5 components

    • Main window with splitter layout
    • Tab-based interface for request/response
    • Tree-based collection browser
    • Dialog-based environment and history management
  • Extensibility: Easy to extend with:

    • New authentication methods
    • Additional request/response formats
    • Custom visualizers
    • Plugins and integrations

Data Storage

The application stores data in the following directories:

  • collections/: Request collections (JSON)
  • environments/: Environment configurations (JSON)
  • history/: Request history (JSON)

These directories are created automatically and are excluded from git.

License

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

Author

Max Base - @BaseMax

Contributing

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

About

A modern, graphical REST API testing client for desktop users. Built using Python and PyQt5. Graphical REST and API testing client for desktop users. Built using Python and PyQt5.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages