Skip to content
Dbgr is a terminal tool to test and debug HTTP APIs.
Python Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
dbgr
docs
examples
tests
.coveragerc
.gitignore
.pylintrc
.travis.yml
CHANGELOG.rst
CONTRIBUTORS.rst
LICENCE
MANIFEST.in
Makefile
README.rst
app.py
requirements-dev.txt
requirements.txt
setup.py

README.rst

DBGR: HTTP client that gives you full control

PyPI version License Build Status Code Coverage Documentation Status

Dbgr [read 'ˌdiːˈbʌɡər'] is a interactive terminal tool to test and debug HTTP APIs. It offers alternative to Postman, Insomnia and other HTTP clients. It is designed for programmers that prefer to use code instead of graphical tools and want full control over their HTTP requests.

Full documentation can be found on Read the Docs

Features

DBGR Basic Usage Example

Installation

The easiest way to install DBGR is via PyPi:

$ pip install dbgr
$ dbgr -v
1.1.0

DBGR requires Python >=3.6.

Quick Start

First step when working with DBGR is to create a directory which will DBGR search for requests and environment settings.

You can also download the quickstart from Github.
$ mkdir quickstart
$ cd quickstart

Inside create your default environment file default.ini. For now just place a section header inside:

[default]

Now create another file, call it quickstart.py and place create your first request:

from dbgr import request

@request
async def get_example(session):
    await session.get('http://example.com')

You can check that DBGR registered the request by running dbgr list:

$ dbgr list
quickstart:
 - get_example

To execute it, run dbgr request get_example:

# Output in this example is shortened
> GET http://example.com
> 200 OK
>
> Request headers:
>  Host: example.com
>  Accept: */*
>  Accept-Encoding: gzip, deflate
>  User-Agent: Python/3.6 aiohttp/3.5.4
<
< Response headers:
<  Content-Encoding: gzip
<  Accept-Ranges: bytes
<  Cache-Control: max-age=604800
<  Content-Type: text/html; charset=UTF-8
<  Date: Sun, 16 Jun 2019 15:29:41 GMT
<  Last-Modified: Fri, 09 Aug 2013 23:54:35 GMT
<  Content-Length: 606
<
< Response data (text/html):
<!doctype html>
<html>
<head>
    <title>Example Domain</title>
    <meta charset="utf-8" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
</head>

<body>
<div>
    <h1>Example Domain</h1>
    <p>This domain is established to be used for illustrative examples in documents. You may use this
    domain in examples without prior coordination or asking for permission.</p>
    <p><a href="http://www.iana.org/domains/example">More information...</a></p>
</div>
</body>
</html>
Result (NoneType)

Read the full documentation on Read the Docs

You can’t perform that action at this time.