🌐 Zapman
An API Client for the terminal. A Python CLI for API testing and development.
usage: zap [-h] {run,curl,cookies,vars,version} ...
An API Client for the terminal. A Python CLI for API testing and development.
options:
-h, --help show this help message and exit
commands:
{run,curl,cookies,vars,version}
run 🚀 run a Zapfile
curl 🌊 print the curl command for a Zapfile
cookies 🍪 view stored cookies
vars 📋 view stored variables
version 🔖 show version
✨ Features
- 🛠️ Environments & variables
- 🔄 Scriptable & easily shareable via git
- 🖥️ A simple and small CLI
- 🌈 Colored output
- 🐍 Pure python
🚀 Using
To install this package, run:
pip install zapman
Create a Zapfile called get.py (Zapfiles are just regular python files):
GET = "https://httpbin.org/get"
PARAMS = {
"foo": "bar"
}
Run with:
zap run get.py
Output:
GET /get?foo=bar HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: httpbin.org
User-Agent: Zapman/0.0.0
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 325
Content-Type: application/json
Date: Thu, 19 Dec 2024 23:26:56 GMT
Server: gunicorn/19.9.0
{
"args": {
"foo": "bar"
},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Host": "httpbin.org",
"User-Agent": "Zapman/0.0.0",
"X-Amzn-Trace-Id": "Root=1-6764abbf-60e6ac856a6fe7c32c0e2f3b"
},
"origin": "0.0.0.0",
"url": "https://httpbin.org/get?foo=bar"
}
Elapsed time: 1.10440575s
More example Zapfiles in zaps.
🧑💻 Contributing
Prerequisites
1. Install Docker
- Go to Docker, download and install docker.
- Configure Docker to use the BuildKit build system. On macOS and Windows, BuildKit is enabled by default in Docker Desktop.
2. Install VS Code
Go to VS Code, download and install VS Code.
1. Open DevContainer with VS Code
Open this repository with VS Code, and run Ctrl/⌘ + ⇧ + P → Dev Containers: Reopen in Container.
The following commands can be used inside a DevContainer.
2. Run linters
poe lint
3. Run tests
poe test
4. Update poetry lock file
poetry lock --no-update
See how to develop with PyCharm or any other IDE.
️⚡️ Scaffolded with Poetry Copier.
🛠️ Open an issue if you have any questions or suggestions.
Release files for zapman 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zapman-0.0.2.tar.gz | 15.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zapman-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.7 kB
Release files / zapman-0.0.2.tar.gz
| Download URL | zapman-0.0.2.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5db0477e1ea2d4cb0f04cba81dbac6b69c9b0d2e14a188b7d5673db2508f5a67
|
|
BLAKE2b-256 checksum How to use checksums |
77581d448cd69891a4db0e2972eb0a915223873365e2bac315e71d3ad6b60b58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.13.0 Linux/6.5.0-1025-azure
|
Release files / zapman-0.0.2-py3-none-any.whl
| Download URL | zapman-0.0.2-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b9eff4e055bd9458d553cc329f5b201534f485e655531b3c6ad319ff3897ffd0
|
|
BLAKE2b-256 checksum How to use checksums |
7988031253174bee039737688cedcbed68fed45163c186a9bb4ec3bb880632b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.13.0 Linux/6.5.0-1025-azure
|