Skip to main content

A Python tool for API testing and development in your terminal.

Project description

Lint and Test

🌐 Zapman

An API Client for the terminal. A Python CLI for API testing and development.

✨ 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
  1. Go to Docker, download and install docker.
  2. 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/⌘ + + PDev 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.

Project details


Download files

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

Source Distribution

zapman-0.0.1.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zapman-0.0.1-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file zapman-0.0.1.tar.gz.

File metadata

  • Download URL: zapman-0.0.1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Linux/6.5.0-1025-azure

File hashes

Hashes for zapman-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0105ce5a52e0af0195b760ae9f461cac049d5cde815189df1ce30018cea20b52
MD5 f0ea43fa22f2d326ff22c4879bd4a277
BLAKE2b-256 6d8c4d158850b3eedf61f08915d8663e8851acc0df08ea1e0f108ccc816d2b56

See more details on using hashes here.

File details

Details for the file zapman-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: zapman-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Linux/6.5.0-1025-azure

File hashes

Hashes for zapman-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 451db56b814df9a26b89da0d58babaae0f9d33e72dd900747f5c150663afef77
MD5 fcb9b7b30bd0c32fe2e928c2097a1e08
BLAKE2b-256 fbb09b498a2a90da8c48b3ca755e0992b14131be7762fa2bac2b6177e48b8c19

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page