RESTurant
A dead simple CLI to run HTTP requests from YAML collection files.
RESTurant is a lightweight, developer-friendly API testing tool focused on simplicity and CI integration. Define your API requests in YAML and run comprehensive tests from your command line or CI pipeline.
Features
- Simple CLI Interface: Test APIs with minimal commands
- Declarative Testing: Define requests and expected responses in YAML
- CI-Focused: Run API tests separately from application code
- Automatic Discovery: Scan directories for test collections
- Cross-Platform: Works on Linux, macOS, and Windows
Coming Soon
- Environment variable interpolation in requests
- Response dumping to files for detailed analysis
- benchmark endpoints over n requests
Installation
# Install via your package manager of choice
pip install restaurant-cli
Command Reference
Usage: RESTaurant COMMAND
A dead simple CLI to run HTTP requests from a collection file.
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────╮
│ gen-schema Generate the schema for the request collection. │
│ run Scan for request collections in child dirs and run the requests in them. │
│ --help -h Display this message and exit. │
│ --version Display application version. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Quick Start
- Create a
.rest.ymlfile (e.g.github.rest.yml):
# yaml-language-server: $schema=../.request_collection_schema.json
title: "GitHub API Collection"
description: "A collection of example requests for the GitHub API"
headers:
Accept: "application/vnd.github.v3+json"
User-Agent: "API-Test-Client"
requests:
getUserProfile:
method: GET
url: "https://api.github.com/users/octocat"
assert:
status_code: 200
soft_timeout_s: 3.0
getZenMessage:
method: GET
url: "https://api.github.com/zen"
assert:
status_code: 200
getRepository:
method: GET
url: "https://api.github.com/repos/octocat/hello-world"
assert:
status_code: 200
searchRepositories:
method: GET
url: "https://api.github.com/search/repositories"
extra_headers:
Accept: "application/vnd.github.v3.text-match+json"
body:
q: "tetris"
sort: "stars"
order: "desc"
assert:
status_code: 200
- Run your tests:
# Run all request collections in the current directory and subdirectories
restaurant run
Example Output
When you run the command, RESTurant will scan for .rest.yml files and execute the requests in them:
No input files provided, scanning for files in `/Users/toby/dev/projects/restaurant/**/*.rest.yml`
Found 4 collection files.
[1/4] Loading /Users/toby/dev/projects/restaurant/resources/github.rest.yml... Done.
[1/4] GitHub API Collection
[1/4] Running 4 requests...
[1/4] ✅ GET https://api.github.com/users/octocat 200 (0:00:00.199333)
[1/4] ✅ GET https://api.github.com/zen 200 (0:00:00.181543)
[1/4] ✅ GET https://api.github.com/repos/octocat/hello-world 200 (0:00:00.206547)
[1/4] ❌ GET https://api.github.com/search/repositories 422 expected 200 (0:00:00.183207)
[2/4] Loading /Users/toby/dev/projects/restaurant/resources/openweather.rest.yml... Done.
[2/4] OpenWeatherMap API Collection
[2/4] Running 3 requests...
[2/4] ❌ GET https://api.openweathermap.org/data/2.5/weather 401 expected 200 (0:00:00.122748)
[2/4] ❌ GET https://api.openweathermap.org/data/2.5/forecast 401 expected 200 (0:00:00.119949)
[2/4] ❌ GET https://api.openweathermap.org/data/2.5/air_pollution 401 expected 200 (0:00:00.127203)
[3/4] Loading /Users/toby/dev/projects/restaurant/resources/example.rest.yml... Done.
[3/4] Basic API Tests Collection
[3/4] Running 5 requests...
[3/4] ✅ GET https://api.ipify.org/ 200 (0:00:00.140074)
[3/4] ❌ POST https://api.ipify.org/ 520 expected 403 (0:00:00.350254)
[3/4] ✅ GET https://pastebin.com/favicon.ico 200 (0:00:00.081860)
[3/4] ❌ GET https://mockbin.org/bin/create 404 expected 2xx (0:00:00.288823)
[3/4] ❌ POST https://postb.in/api/bin 301 expected 200 (0:00:00.077875)
[4/4] Loading /Users/toby/dev/projects/restaurant/resources/jsonplaceholder.rest.yml... Done.
[4/4] JSON Placeholder API Collection
[4/4] Running 5 requests...
[4/4] ✅ GET https://jsonplaceholder.typicode.com/posts 200 (0:00:00.075812)
[4/4] ✅ GET https://jsonplaceholder.typicode.com/posts/1 200 (0:00:00.075952)
[4/4] ✅ POST https://jsonplaceholder.typicode.com/posts 201 (0:00:00.308094)
[4/4] ✅ PUT https://jsonplaceholder.typicode.com/posts/1 200 (0:00:00.314894)
[4/4] ✅ DELETE https://jsonplaceholder.typicode.com/posts/1 200 (0:00:00.312959)
Some requests failed.
Configuration File Format
Schema Generation - RESTurant can generate a JSON schema for your collection files:
# Generate schema
restaurant gen-schema > .request_collection_schema.json
The .rest.yml file structure:
# yaml-language-server: $schema=path/to/.request_collection_schema.json
# Collection metadata
title: "API Collection Title"
description: "Description of this collection"
# Global headers applied to all requests
headers:
Accept: "application/json"
User-Agent: "RESTurant-Client"
# Individual request definitions
requests:
requestName:
method: GET # HTTP method
url: "https://api.example.com/path" # Full URL
extra_headers: # Additional headers for this request
Authorization: "Bearer token123"
body: # Request body (as JSON)
key: "value"
assert:
status_code: 200 # Expected status code
soft_timeout_s: 5.0 # Timeout in seconds
This schema can be used with editor extensions like VS Code's YAML Language Server for validation and autocompletion.
CI Integration
GitHub Actions Example
# .github/workflows/api-tests.yml
name: API Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install RESTurant
run: pip install restaurant-cli
- name: Run API tests
run: restaurant run
Metadata
Release files for rqstr-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rqstr_cli-0.1.0.tar.gz | 57.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rqstr_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 67.9 kB
Release files / rqstr_cli-0.1.0.tar.gz
| Download URL | rqstr_cli-0.1.0.tar.gz |
|---|---|
| Size | 57.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36a3c09e0bb1234cc276e6fea04989db65d530cb0b8fa0bdc8266d15190a4209
|
|
BLAKE2b-256 checksum How to use checksums |
9fa813404b407ae30f4516d81dc4b055096aa1b866e82df2ec29049079a2b6a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2025.
Transparency logRelease files / rqstr_cli-0.1.0-py3-none-any.whl
| Download URL | rqstr_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eabd40096329702c627a04388ccc8e1c1f9bb27728edc450ed8b273c2d4cc4b6
|
|
BLAKE2b-256 checksum How to use checksums |
0ca24accfeba4f750dbd6af792b6fd029b92d242d6359996e3bfbb409410d510
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2025.
Transparency log