Name | postmanlite JSON |
Version |
1.0.0
JSON |
| download |
home_page | https://github.com/postmanlite/postmanlite |
Summary | A lightweight CLI HTTP client with rich formatting |
upload_time | 2025-08-04 04:11:55 |
maintainer | None |
docs_url | None |
author | BenTex2006 |
requires_python | >=3.7 |
license | MIT License
Copyright (c) 2025 PostmanLite Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
http
cli
api
testing
requests
postman
curl
rest
api-client
http-client
command-line
terminal
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# PostmanLite
A lightweight CLI HTTP client built for educational purposes - bringing Postman-like functionality to your terminal. Perfect for learning API testing, exploring REST services, and quick HTTP requests without the overhead of a full desktop application.
[](https://badge.fury.io/py/postmanlite)
[](https://pypi.org/project/postmanlite/)
[](https://opensource.org/licenses/MIT)
## Features
- **Beautiful Terminal Output**: Rich formatting with syntax highlighting for JSON, XML, and HTML responses
- **Educational Focus**: Learn HTTP methods, headers, and API interactions through hands-on CLI experience
- **Postman-Inspired Design**: Familiar concepts like collections and request history in a lightweight package
- **Library and CLI**: Use as a command-line tool or import into Python scripts for programmatic HTTP requests
- **Request Collections**: Save frequently used API calls and organize your testing workflow
- **Automatic History**: Track all requests with response times and status codes for learning and debugging
- **Multiple Output Modes**: Verbose mode for detailed request/response inspection
- **Cross-Platform**: Works on Windows, macOS, and Linux with Python 3.7+
## Installation
```bash
pip install postmanlite
```
## Quick Start
### CLI Usage
```bash
# Simple GET request
postmanlite https://api.github.com/users/octocat
# POST with JSON data
postmanlite -X POST https://httpbin.org/post -d '{"name": "John", "age": 30}' --json
# GET with custom headers
postmanlite https://api.example.com -H "Authorization: Bearer your-token"
# Verbose output with request details
postmanlite https://httpbin.org/get -v
# Save request to collection
postmanlite https://api.github.com/users/octocat --save github-user
# Load and execute saved request
postmanlite --load github-user
# View request history
postmanlite --history
# Show examples
postmanlite --examples
```
### Library Usage
```python
from postmanlite import request
# Simple GET request
response = request('GET', 'https://api.github.com/users/octocat')
print(f"Status: {response.status_code}")
print(f"JSON: {response.json()}")
# POST with data
response = request('POST', 'https://httpbin.org/post',
data='{"key": "value"}',
headers={'Content-Type': 'application/json'})
print(f"Response time: {response.elapsed_ms}ms")
# Convenience methods
from postmanlite import get, post, put, delete
response = get('https://httpbin.org/get')
response = post('https://httpbin.org/post', data={'key': 'value'})
```
## Educational Focus
PostmanLite is designed as a learning tool for understanding HTTP protocols and API testing. Unlike the full Postman desktop application, this lightweight version focuses on:
- **HTTP Fundamentals**: Learn request methods, headers, status codes, and response formats
- **API Testing Basics**: Practice with real APIs using a simple command-line interface
- **REST API Concepts**: Understand GET, POST, PUT, DELETE operations through hands-on experience
- **Request/Response Cycle**: See detailed request and response information to understand HTTP communication
- **Collection Management**: Learn to organize and reuse API calls like in professional testing workflows
Perfect for students, developers learning APIs, or anyone who wants Postman-like functionality without the complexity.
## Command Line Options
```
Usage: postmanlite [OPTIONS] [URL]
Options:
-X, --method [GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS]
HTTP method to use
-d, --data TEXT Request body data (JSON string or @filename)
-H, --header TEXT Custom headers in format "Key: Value"
-t, --timeout INTEGER Request timeout in seconds
-v, --verbose Verbose output with request details
--json Force JSON content-type header
--save TEXT Save request to collection with given name
--load TEXT Load and execute saved request from collection
--history Show request history
--examples Show usage examples
--version Show version information
--no-verify Disable SSL certificate verification
--follow-redirects / --no-follow-redirects
Follow HTTP redirects
--help Show this message and exit.
```
## 🎯 Advanced Examples
### Working with Files
```bash
# Send data from file
postmanlite -X POST https://httpbin.org/post -d @data.json
# Multiple headers
postmanlite https://api.example.com \
-H "Authorization: Bearer token123" \
-H "Content-Type: application/json" \
-H "X-API-Key: secret123"
```
### Request Collections
```bash
# Save frequently used requests
postmanlite https://api.github.com/user --save github-profile
postmanlite -X POST https://api.example.com/login -d @login.json --save login-request
# Execute saved requests
postmanlite --load github-profile
postmanlite --load login-request
```
### History and Statistics
```bash
# View request history
postmanlite --history
# All requests are automatically saved to history with:
# - Timestamp
# - Method and URL
# - Status code
# - Response time
# - Response size
```
## 🐍 Python Library
### Basic Usage
```python
from postmanlite import request, get, post, put, delete
# Make requests
response = get('https://httpbin.org/get')
response = post('https://httpbin.org/post', data={'key': 'value'})
response = put('https://httpbin.org/put', data='{"updated": true}')
response = delete('https://httpbin.org/delete')
# Access response properties
print(f"Status: {response.status_code}")
print(f"Headers: {response.headers}")
print(f"Body: {response.text}")
print(f"JSON: {response.json()}")
print(f"Response time: {response.elapsed_ms}ms")
print(f"Content type: {response.get_content_type()}")
```
### Advanced Usage
```python
from postmanlite import request
# Custom timeout and headers
response = request(
method='GET',
url='https://api.example.com/data',
headers={
'Authorization': 'Bearer token123',
'User-Agent': 'MyApp/1.0'
},
timeout=10,
verify=True
)
# Handle different content types
if response.is_json():
data = response.json()
elif response.is_xml():
xml_content = response.text
elif response.is_html():
html_content = response.text
else:
raw_content = response.content
```
## 🎨 Rich Output Features
PostmanLite provides beautiful terminal output with:
- **Syntax highlighting** for JSON, XML, HTML, CSS, JavaScript
- **Color-coded status codes** (green for success, red for errors)
- **Formatted headers** in easy-to-read tables
- **Response timing** and size information
- **JSON statistics** showing object keys and array lengths
- **Smart content detection** and appropriate formatting
## 📁 File Structure
Your requests and settings are stored in `~/.postmanlite/`:
```
~/.postmanlite/
├── collections.json # Saved request collections
├── history.json # Request history
└── settings.json # User settings and preferences
```
## 🛠️ Development
### Setup Development Environment
```bash
git clone https://github.com/postmanlite/postmanlite.git
cd postmanlite
pip install -e ".[dev]"
```
### Run Tests
```bash
pytest
pytest --cov=postmanlite # With coverage
```
### Code Quality
```bash
black postmanlite/ # Format code
flake8 postmanlite/ # Lint code
mypy postmanlite/ # Type checking
```
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## 🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
## ⭐ Support
If you find PostmanLite helpful, please consider:
- ⭐ **Starring** the repository on GitHub
- 🐛 **Reporting** bugs or requesting features
- 💬 **Sharing** it with your colleagues and friends
- ☕ **Buying us a coffee** at [ko-fi.com/postmanlite](https://ko-fi.com/postmanlite)
## 📊 Why PostmanLite?
| Feature | PostmanLite | curl | httpie | Postman Desktop |
|---------|-------------|------|--------|-----------------|
| Beautiful output | ✅ | ❌ | ✅ | ✅ |
| Lightweight | ✅ | ✅ | ✅ | ❌ |
| Python library | ✅ | ❌ | ❌ | ❌ |
| Request collections | ✅ | ❌ | ❌ | ✅ |
| History tracking | ✅ | ❌ | ❌ | ✅ |
| No GUI required | ✅ | ✅ | ✅ | ❌ |
| Cross-platform | ✅ | ✅ | ✅ | ✅ |
| Open source | ✅ | ✅ | ✅ | ❌ |
PostmanLite strikes the perfect balance between simplicity and functionality, offering the power of Postman in a lightweight, terminal-friendly package.
Raw data
{
"_id": null,
"home_page": "https://github.com/postmanlite/postmanlite",
"name": "postmanlite",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "http, cli, api, testing, requests, postman, curl, rest, api-client, http-client, command-line, terminal",
"author": "BenTex2006",
"author_email": "BenTex2006 <hello.b3xtopia@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/88/cd/ff242c6926b4ddfa5467b4738a692e6efc471221f85900edad1e5db5457a/postmanlite-1.0.0.tar.gz",
"platform": null,
"description": "# PostmanLite\n\nA lightweight CLI HTTP client built for educational purposes - bringing Postman-like functionality to your terminal. Perfect for learning API testing, exploring REST services, and quick HTTP requests without the overhead of a full desktop application.\n\n[](https://badge.fury.io/py/postmanlite)\n[](https://pypi.org/project/postmanlite/)\n[](https://opensource.org/licenses/MIT)\n\n## Features\n\n- **Beautiful Terminal Output**: Rich formatting with syntax highlighting for JSON, XML, and HTML responses\n- **Educational Focus**: Learn HTTP methods, headers, and API interactions through hands-on CLI experience\n- **Postman-Inspired Design**: Familiar concepts like collections and request history in a lightweight package\n- **Library and CLI**: Use as a command-line tool or import into Python scripts for programmatic HTTP requests\n- **Request Collections**: Save frequently used API calls and organize your testing workflow\n- **Automatic History**: Track all requests with response times and status codes for learning and debugging\n- **Multiple Output Modes**: Verbose mode for detailed request/response inspection\n- **Cross-Platform**: Works on Windows, macOS, and Linux with Python 3.7+\n\n## Installation\n\n```bash\npip install postmanlite\n```\n\n## Quick Start\n\n### CLI Usage\n\n```bash\n# Simple GET request\npostmanlite https://api.github.com/users/octocat\n\n# POST with JSON data\npostmanlite -X POST https://httpbin.org/post -d '{\"name\": \"John\", \"age\": 30}' --json\n\n# GET with custom headers\npostmanlite https://api.example.com -H \"Authorization: Bearer your-token\"\n\n# Verbose output with request details\npostmanlite https://httpbin.org/get -v\n\n# Save request to collection\npostmanlite https://api.github.com/users/octocat --save github-user\n\n# Load and execute saved request\npostmanlite --load github-user\n\n# View request history\npostmanlite --history\n\n# Show examples\npostmanlite --examples\n```\n\n### Library Usage\n\n```python\nfrom postmanlite import request\n\n# Simple GET request\nresponse = request('GET', 'https://api.github.com/users/octocat')\nprint(f\"Status: {response.status_code}\")\nprint(f\"JSON: {response.json()}\")\n\n# POST with data\nresponse = request('POST', 'https://httpbin.org/post', \n data='{\"key\": \"value\"}',\n headers={'Content-Type': 'application/json'})\nprint(f\"Response time: {response.elapsed_ms}ms\")\n\n# Convenience methods\nfrom postmanlite import get, post, put, delete\n\nresponse = get('https://httpbin.org/get')\nresponse = post('https://httpbin.org/post', data={'key': 'value'})\n```\n\n## Educational Focus\n\nPostmanLite is designed as a learning tool for understanding HTTP protocols and API testing. Unlike the full Postman desktop application, this lightweight version focuses on:\n\n- **HTTP Fundamentals**: Learn request methods, headers, status codes, and response formats\n- **API Testing Basics**: Practice with real APIs using a simple command-line interface \n- **REST API Concepts**: Understand GET, POST, PUT, DELETE operations through hands-on experience\n- **Request/Response Cycle**: See detailed request and response information to understand HTTP communication\n- **Collection Management**: Learn to organize and reuse API calls like in professional testing workflows\n\nPerfect for students, developers learning APIs, or anyone who wants Postman-like functionality without the complexity.\n\n## Command Line Options\n\n```\nUsage: postmanlite [OPTIONS] [URL]\n\nOptions:\n -X, --method [GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS]\n HTTP method to use\n -d, --data TEXT Request body data (JSON string or @filename)\n -H, --header TEXT Custom headers in format \"Key: Value\"\n -t, --timeout INTEGER Request timeout in seconds\n -v, --verbose Verbose output with request details\n --json Force JSON content-type header\n --save TEXT Save request to collection with given name\n --load TEXT Load and execute saved request from collection\n --history Show request history\n --examples Show usage examples\n --version Show version information\n --no-verify Disable SSL certificate verification\n --follow-redirects / --no-follow-redirects\n Follow HTTP redirects\n --help Show this message and exit.\n```\n\n## \ud83c\udfaf Advanced Examples\n\n### Working with Files\n\n```bash\n# Send data from file\npostmanlite -X POST https://httpbin.org/post -d @data.json\n\n# Multiple headers\npostmanlite https://api.example.com \\\n -H \"Authorization: Bearer token123\" \\\n -H \"Content-Type: application/json\" \\\n -H \"X-API-Key: secret123\"\n```\n\n### Request Collections\n\n```bash\n# Save frequently used requests\npostmanlite https://api.github.com/user --save github-profile\npostmanlite -X POST https://api.example.com/login -d @login.json --save login-request\n\n# Execute saved requests\npostmanlite --load github-profile\npostmanlite --load login-request\n```\n\n### History and Statistics\n\n```bash\n# View request history\npostmanlite --history\n\n# All requests are automatically saved to history with:\n# - Timestamp\n# - Method and URL\n# - Status code\n# - Response time\n# - Response size\n```\n\n## \ud83d\udc0d Python Library\n\n### Basic Usage\n\n```python\nfrom postmanlite import request, get, post, put, delete\n\n# Make requests\nresponse = get('https://httpbin.org/get')\nresponse = post('https://httpbin.org/post', data={'key': 'value'})\nresponse = put('https://httpbin.org/put', data='{\"updated\": true}')\nresponse = delete('https://httpbin.org/delete')\n\n# Access response properties\nprint(f\"Status: {response.status_code}\")\nprint(f\"Headers: {response.headers}\")\nprint(f\"Body: {response.text}\")\nprint(f\"JSON: {response.json()}\")\nprint(f\"Response time: {response.elapsed_ms}ms\")\nprint(f\"Content type: {response.get_content_type()}\")\n```\n\n### Advanced Usage\n\n```python\nfrom postmanlite import request\n\n# Custom timeout and headers\nresponse = request(\n method='GET',\n url='https://api.example.com/data',\n headers={\n 'Authorization': 'Bearer token123',\n 'User-Agent': 'MyApp/1.0'\n },\n timeout=10,\n verify=True\n)\n\n# Handle different content types\nif response.is_json():\n data = response.json()\nelif response.is_xml():\n xml_content = response.text\nelif response.is_html():\n html_content = response.text\nelse:\n raw_content = response.content\n```\n\n## \ud83c\udfa8 Rich Output Features\n\nPostmanLite provides beautiful terminal output with:\n\n- **Syntax highlighting** for JSON, XML, HTML, CSS, JavaScript\n- **Color-coded status codes** (green for success, red for errors)\n- **Formatted headers** in easy-to-read tables\n- **Response timing** and size information\n- **JSON statistics** showing object keys and array lengths\n- **Smart content detection** and appropriate formatting\n\n## \ud83d\udcc1 File Structure\n\nYour requests and settings are stored in `~/.postmanlite/`:\n\n```\n~/.postmanlite/\n\u251c\u2500\u2500 collections.json # Saved request collections\n\u251c\u2500\u2500 history.json # Request history\n\u2514\u2500\u2500 settings.json # User settings and preferences\n```\n\n## \ud83d\udee0\ufe0f Development\n\n### Setup Development Environment\n\n```bash\ngit clone https://github.com/postmanlite/postmanlite.git\ncd postmanlite\npip install -e \".[dev]\"\n```\n\n### Run Tests\n\n```bash\npytest\npytest --cov=postmanlite # With coverage\n```\n\n### Code Quality\n\n```bash\nblack postmanlite/ # Format code\nflake8 postmanlite/ # Lint code\nmypy postmanlite/ # Type checking\n```\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n## \u2b50 Support\n\nIf you find PostmanLite helpful, please consider:\n\n- \u2b50 **Starring** the repository on GitHub\n- \ud83d\udc1b **Reporting** bugs or requesting features\n- \ud83d\udcac **Sharing** it with your colleagues and friends\n- \u2615 **Buying us a coffee** at [ko-fi.com/postmanlite](https://ko-fi.com/postmanlite)\n\n## \ud83d\udcca Why PostmanLite?\n\n| Feature | PostmanLite | curl | httpie | Postman Desktop |\n|---------|-------------|------|--------|-----------------|\n| Beautiful output | \u2705 | \u274c | \u2705 | \u2705 |\n| Lightweight | \u2705 | \u2705 | \u2705 | \u274c |\n| Python library | \u2705 | \u274c | \u274c | \u274c |\n| Request collections | \u2705 | \u274c | \u274c | \u2705 |\n| History tracking | \u2705 | \u274c | \u274c | \u2705 |\n| No GUI required | \u2705 | \u2705 | \u2705 | \u274c |\n| Cross-platform | \u2705 | \u2705 | \u2705 | \u2705 |\n| Open source | \u2705 | \u2705 | \u2705 | \u274c |\n\nPostmanLite strikes the perfect balance between simplicity and functionality, offering the power of Postman in a lightweight, terminal-friendly package.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 PostmanLite Contributors\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "A lightweight CLI HTTP client with rich formatting",
"version": "1.0.0",
"project_urls": {
"Bug Tracker": "https://github.com/postmanlite/postmanlite/issues",
"Documentation": "https://github.com/postmanlite/postmanlite#readme",
"Funding": "https://ko-fi.com/postmanlite",
"Homepage": "https://github.com/postmanlite/postmanlite",
"Source Code": "https://github.com/postmanlite/postmanlite"
},
"split_keywords": [
"http",
" cli",
" api",
" testing",
" requests",
" postman",
" curl",
" rest",
" api-client",
" http-client",
" command-line",
" terminal"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "3ca20930aa8b8871a1910f4e5f50e9a8eac713505b8a7e8eb7e2be3e80327eab",
"md5": "f5bfe75f185eb0cc2f3cb486dbf9b8fe",
"sha256": "8b63453f75342473f89a61912d0cc2ff1d1053a57c1883eea8e3392f1f13287c"
},
"downloads": -1,
"filename": "postmanlite-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f5bfe75f185eb0cc2f3cb486dbf9b8fe",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 18699,
"upload_time": "2025-08-04T04:11:53",
"upload_time_iso_8601": "2025-08-04T04:11:53.743021Z",
"url": "https://files.pythonhosted.org/packages/3c/a2/0930aa8b8871a1910f4e5f50e9a8eac713505b8a7e8eb7e2be3e80327eab/postmanlite-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "88cdff242c6926b4ddfa5467b4738a692e6efc471221f85900edad1e5db5457a",
"md5": "4b763df8154268a0627c315c36c9ff8f",
"sha256": "2fd18a7ed100b23d6861dc4b8b8d7d4f72dcd456c0cc48fc57eae427a448b1f1"
},
"downloads": -1,
"filename": "postmanlite-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "4b763df8154268a0627c315c36c9ff8f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 16129,
"upload_time": "2025-08-04T04:11:55",
"upload_time_iso_8601": "2025-08-04T04:11:55.160847Z",
"url": "https://files.pythonhosted.org/packages/88/cd/ff242c6926b4ddfa5467b4738a692e6efc471221f85900edad1e5db5457a/postmanlite-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-04 04:11:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "postmanlite",
"github_project": "postmanlite",
"github_not_found": true,
"lcname": "postmanlite"
}