Skip to main content

athena

PYPI - Version GitHub release (latest by date)

athena is a file-based rest api client.

$ pip install haondt-athena
$ athena init
$ cat << EOF > athena/hello.py
from athena.client import Athena

def run(athena: Athena):
    client = athena.client()
    client.get('http://echo.jsontest.com/key/value')
EOF
$ athena responses athena/hello.py
hello •
│ execution
│  environment: __default__
│
│ timings
│  http://echo...m/key/value    ························ 470ms
│
│ traces
│  http://echo.jsontest.com/key/value
│    GET http://echo.jsontest.com/key/value
│    200 OK 470ms
│  │
│   response
│    headers
│     Access-Control-Allow-Origin | *
│     Content-Type                | application/json
│     X-Cloud-Trace-Context       | 35b9c247eaaa4175c1949b97dd13548a
│     Date                        | Fri, 05 Jul 2024 20:33:16 GMT
│     Server                      | Google Frontend
│     Content-Length              | 17   │
│    body | application/json [json] 17B
│     1 {     2   "key": "value"     3 }    │
│   │
│  │
│ │
│

athena provides a lightweight alternative to full-blown api platforms like Postman with a few key advantages:

  • You are free to use any text editor you would like as the api client. Lightweight editors like Neovim or VSCode allow for a much thinner client.
  • As the workbook is just a collection of plaintext files, you can keep it in the same git repo as the project it is testing.
  • Since requests are just python modules, you can script to your hearts content, and leverage external python libraries.

Installation

athena can be installed as a pypi package or from source. athena requires python>=3.11.

# from pypi
python3 -m pip install haondt-athena

# from gitlab
python3 -m pip install haondt-athena --index-url https://gitlab.com/api/v4/projects/57154225/packages/pypi/simple

# from source
git clone https://gitlab.com/haondt/athena.git
python3 -m pip install .

Usage

Quickstart guide and API / CLI reference available here: https://haondt.gitlab.io/docs/athena/

Development

Running Tests

How to run the E2E tests

  • build docker images for the api echo server and for the test runner images
./tests/e2e/build_dockerfile.sh
  • start both images to run the tests
./tests/e2e/run_tests.sh

Download files

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

Source Distribution

haondt_athena-4.1.1.tar.gz (38.7 kB view details)

Uploaded Source

Built Distribution

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

haondt_athena-4.1.1-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

Details for the file haondt_athena-4.1.1.tar.gz.

File metadata

  • Download URL: haondt_athena-4.1.1.tar.gz
  • Upload date:
  • Size: 38.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for haondt_athena-4.1.1.tar.gz
Algorithm Hash digest
SHA256 804eaa40b2b371b0c19687b343ba3205e0cdf8b5dabd9df94839b6dfc25ccc30
MD5 7f17dec0ae21056b599167946b7abbbd
BLAKE2b-256 7667f57404d14d4969a112ff267774fa7004b66a0a5a1c8116b2665497977841

See more details on using hashes here.

File details

Details for the file haondt_athena-4.1.1-py3-none-any.whl.

File metadata

  • Download URL: haondt_athena-4.1.1-py3-none-any.whl
  • Upload date:
  • Size: 32.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for haondt_athena-4.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18be37d6f35c9250580c181dc970e7a321dbf7b150d171114380b9f8f29ae1a2
MD5 3b243feeabe56e605eacb8990d3ebfc1
BLAKE2b-256 5034b67bc2200c3ac84750a4e5115bd3cb06b409dda7462c5f397e79cd3fa615

See more details on using hashes here.

Release history Release notifications | RSS feed

5.1.2

2 files

5.1.1

2 files

5.1.0

2 files

5.0.4

2 files

5.0.3

2 files

5.0.2

2 files

5.0.1

2 files

5.0.0

2 files

This release

4.1.1 This release

2 files

4.1.0

2 files

4.0.2

2 files

4.0.1

2 files

4.0.0

2 files

3.0.2

2 files

3.0.1

2 files

3.0.0

2 files

2.4.0

2 files

2.3.2

2 files

2.3.1

2 files

2.3.0

2 files

2.2.2

2 files

2.2.1

2 files

2.2.0

2 files

2.1.0

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.2.0

1 file

1.1.0

1 file

1.0.5

1 file

1.0.4

1 file

1.0.3

1 file

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page