athena
athena is a file-based rest api client.
$ pip install haondt-athena
$ athena init
$ cat << EOF > athena/hello.py
from athena.client import Athena
from athena.test import athert
def run(athena: Athena):
client = athena.client()
response = client.get('https://example.com')
athert(response.status_code).equals(200)
EOF
$ athena run athena/hello.py
hello: passed
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 ./athena
Usage
Quickstart guide and API / CLI reference available here: https://haondt.gitlab.io/docs/athena/
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file haondt_athena-2.2.2.tar.gz.
File metadata
- Download URL: haondt_athena-2.2.2.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a3c2ca6c62e5f414abf049e4913eb542421d2fc15184edd08c25e34acc0243f
|
|
| MD5 |
fed9b26c6c65f7debd12bb6b85f4d495
|
|
| BLAKE2b-256 |
1c9d75d815b1ebd1ff5138dae35d2a0337a8e12e6d6496af04b5cb109a4e0f41
|
File details
Details for the file haondt_athena-2.2.2-py3-none-any.whl.
File metadata
- Download URL: haondt_athena-2.2.2-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e72baf7a0fdfbedf7502a7b479db90c88bbc9ef4587d9515f2b84a88cae53d4a
|
|
| MD5 |
7b7c5666ed51ba0b51d8d5feac861f0b
|
|
| BLAKE2b-256 |
0221fbe7752481195290ce5eca05fa559889aeffb891f128f6446bb8059fbc5e
|