Name | haondt-athena JSON |
Version |
5.0.4
JSON |
| download |
home_page | None |
Summary | a file-based rest api client |
upload_time | 2024-11-01 12:30:58 |
maintainer | None |
docs_url | None |
author | haondt |
requires_python | >=3.11 |
license | None |
keywords |
api
rest
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# athena
[](https://pypi.org/project/haondt-athena/)
[](https://gitlab.com/haondt/athena/-/releases/permalink/latest)
athena is a file-based rest api client.
```sh
$ 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.
```sh
# 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://docs.haondt.dev/athena/
## Development
### Running Tests
#### How to run the E2E tests
- build docker images for the api echo server and for the test runner images
```sh
./tests/e2e/build_dockerfile.sh
```
- start both images to run the tests
```sh
./tests/e2e/run_tests.sh
```
Raw data
{
"_id": null,
"home_page": null,
"name": "haondt-athena",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "api, rest",
"author": "haondt",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/21/f8/6955d799624b2635e93bd58cb056562e22abb2359e58ebfe42a49c3fa06d/haondt_athena-5.0.4.tar.gz",
"platform": null,
"description": "# athena\n\n[](https://pypi.org/project/haondt-athena/)\n[](https://gitlab.com/haondt/athena/-/releases/permalink/latest)\n\nathena is a file-based rest api client.\n\n```sh\n$ pip install haondt-athena\n$ athena init\n$ cat << EOF > athena/hello.py\nfrom athena.client import Athena\n\ndef run(athena: Athena):\n client = athena.client()\n client.get('http://echo.jsontest.com/key/value')\nEOF\n$ athena responses athena/hello.py\nhello \u2022\n\u2502 execution\n\u2502 \u2502 environment: __default__\n\u2502\n\u2502 timings\n\u2502 \u2502 http://echo...m/key/value \u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7\u00b7 470ms\n\u2502\n\u2502 traces\n\u2502 \u2502 http://echo.jsontest.com/key/value\n\u2502 \u2502 \u2502 \u2502 GET http://echo.jsontest.com/key/value\n\u2502 \u2502 \u2502 \u2502 200 OK 470ms\n\u2502 \u2502 \u2502\n\u2502 \u2502 \u2502 response\n\u2502 \u2502 \u2502 \u2502 headers\n\u2502 \u2502 \u2502 \u2502 \u2502 Access-Control-Allow-Origin | *\n\u2502 \u2502 \u2502 \u2502 \u2502 Content-Type | application/json\n\u2502 \u2502 \u2502 \u2502 \u2502 X-Cloud-Trace-Context | 35b9c247eaaa4175c1949b97dd13548a\n\u2502 \u2502 \u2502 \u2502 \u2502 Date | Fri, 05 Jul 2024 20:33:16 GMT\n\u2502 \u2502 \u2502 \u2502 \u2502 Server | Google Frontend\n\u2502 \u2502 \u2502 \u2502 \u2502 Content-Length | 17\n\u2502 \u2502 \u2502 \u2502\n\u2502 \u2502 \u2502 \u2502 body | application/json [json] 17B\n\u2502 \u2502 \u2502 \u2502 \u2502 1 {\n\u2502 \u2502 \u2502 \u2502 \u2502 2 \"key\": \"value\"\n\u2502 \u2502 \u2502 \u2502 \u2502 3 }\n\u2502 \u2502 \u2502 \u2502 \u2502\n\u2502 \u2502 \u2502 \u2502\n\u2502 \u2502 \u2502\n\u2502 \u2502\n\u2502\n```\n\nathena provides a lightweight alternative to full-blown api platforms like Postman with a few key advantages:\n\n- 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.\n- 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.\n- Since requests are just python modules, you can script to your hearts content, and leverage external python libraries.\n\n## Installation \n\nathena can be installed as a pypi package or from source. athena requires python>=3.11.\n\n```sh\n# from pypi\npython3 -m pip install haondt-athena\n\n# from gitlab\npython3 -m pip install haondt-athena --index-url https://gitlab.com/api/v4/projects/57154225/packages/pypi/simple\n\n# from source\ngit clone https://gitlab.com/haondt/athena.git\npython3 -m pip install .\n```\n\n## Usage\n\nQuickstart guide and API / CLI reference available here: https://docs.haondt.dev/athena/\n\n\n## Development\n\n### Running Tests\n\n#### How to run the E2E tests\n\n- build docker images for the api echo server and for the test runner images\n\n```sh\n./tests/e2e/build_dockerfile.sh\n```\n\n- start both images to run the tests\n\n```sh\n./tests/e2e/run_tests.sh\n```\n\n",
"bugtrack_url": null,
"license": null,
"summary": "a file-based rest api client",
"version": "5.0.4",
"project_urls": {
"Homepage": "https://gitlab.com/haondt/athena",
"Repository": "https://gitlab.com/haondt/athena"
},
"split_keywords": [
"api",
" rest"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8f97d9cd68184726e985230157d4ea819bd6033a806af7c659fa100ab18e0563",
"md5": "7d1ae65fcc1b500e83dc67fcbfaf5526",
"sha256": "41a8c63710aecf1aba2068395237af16f68dd488312c11cd68e56d2aa234bec4"
},
"downloads": -1,
"filename": "haondt_athena-5.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7d1ae65fcc1b500e83dc67fcbfaf5526",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 36837,
"upload_time": "2024-11-01T12:30:57",
"upload_time_iso_8601": "2024-11-01T12:30:57.545240Z",
"url": "https://files.pythonhosted.org/packages/8f/97/d9cd68184726e985230157d4ea819bd6033a806af7c659fa100ab18e0563/haondt_athena-5.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "21f86955d799624b2635e93bd58cb056562e22abb2359e58ebfe42a49c3fa06d",
"md5": "0ce432c493f8076504d2bdbfcf9d1506",
"sha256": "70af48236f59421bce2d3f4ad162d5ed0e6096925cdc18675b175699d19adb9f"
},
"downloads": -1,
"filename": "haondt_athena-5.0.4.tar.gz",
"has_sig": false,
"md5_digest": "0ce432c493f8076504d2bdbfcf9d1506",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 44157,
"upload_time": "2024-11-01T12:30:58",
"upload_time_iso_8601": "2024-11-01T12:30:58.619795Z",
"url": "https://files.pythonhosted.org/packages/21/f8/6955d799624b2635e93bd58cb056562e22abb2359e58ebfe42a49c3fa06d/haondt_athena-5.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-01 12:30:58",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "haondt",
"gitlab_project": "athena",
"lcname": "haondt-athena"
}