Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tmstieff/Woke
A native multiplatform desktop REST client with grand ambitions and limited scope
https://github.com/tmstieff/Woke
desktop desktop-app desktop-application linux macos qt qt5 rest-client windows
Last synced: about 1 month ago
JSON representation
A native multiplatform desktop REST client with grand ambitions and limited scope
- Host: GitHub
- URL: https://github.com/tmstieff/Woke
- Owner: tmstieff
- License: lgpl-3.0
- Created: 2017-08-10T02:21:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-08-21T15:01:59.000Z (over 4 years ago)
- Last Synced: 2024-08-01T12:15:56.171Z (4 months ago)
- Topics: desktop, desktop-app, desktop-application, linux, macos, qt, qt5, rest-client, windows
- Language: C++
- Homepage:
- Size: 1.26 MB
- Stars: 18
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-starred - tmstieff/Woke - A native multiplatform desktop REST client with grand ambitions and limited scope (windows)
README
# Woke
[![Build status](https://ci.appveyor.com/api/projects/status/ixwvi3wi6mfosm9j/branch/master?svg=true)](https://ci.appveyor.com/project/tmstieff/woke/branch/master)A native multiplatform REST client with grand ambitions and limited scope.
## Binaries
Releases are currently provided for Linux as AppImages and for Windows as a portable ZIP or executable installer. Currently there are no binaries available for Mac.## Features
* Supports most basic HTTP request types
* Focus on Python scripting
* Raw header input
* Request body input
* Response body JSON parser
* Simple request history
* Simple request savingThe memory footprint is also quite low compared with the Electorn based alternatives.
```
➜ ~ ps_mem -S -p $(pgrep woke)
Private + Shared = RAM used Swap used Program30.9 MiB + 10.6 MiB = 41.5 MiB 0.0 KiB woke
---------------------------------------------
41.5 MiB 0.0 KiB
=============================================
```## Scripting
The pre and post tabs can be used to retrieve and set variables for your project. For instance, you may wish to login, capture the authentication token from the response body / headers, and declare it as a project variable to be used in the headers of another request. The script tabs run a full python interpreter, so any standard Python libraries are available to be imported. The following additional functions are used to set and retrieve variables. The get is scoped from most to least specific.
```
get_var("var_name")
set_local_var("var_name", "local_value")
set_project_var("var_name", "project_value")
set_global_var("var_name", "global_value")
```Because the additional methods are evaluated with Python, any valid Python statement can be evaluted, and the result of the evaluation will be assigned as the value of the variable. However, for now, everything needs to be evaluated as string. As an example, you can add the following to a "Post-Request Script" for a login request.
```
set_project_var('token', body['token'])
```In another request, in the request headers you can add:
```
Authorization: Bearer {{token}}
```## Ambitions
* NeoVim editor built in
* Parsing of Swagger, JSON Schema, and other applicable REST specifications
* Support for various authentication protocols## Building From Source
You will need QT 5.X and the fork of the QDjango (https://github.com/tmstieff/qdjango) library to build from source. Instructions are provided for Ubuntu and Arch, but the steps should apply for most Linux distributions. Just substitute aptitude for your package manager of choice.### Ubuntu
Add some PPAs required for the Qt binaries.
```
sudo add-apt-repository ppa:beineri/opt-qt-5.10.1-trusty -y
sudo add-apt-repository ppa:fkrull/deadsnakes -y
```
Activate Python3 and install Python3.6 if not already installed.
```
pyenv global $(pyenv whence 2to3)
sudo apt-get install python3.6 --allow-unauthenticated
sudo apt-get install python3.6-dev --allow-unauthenticated
```
Install Qt binaries and headers.
```
sudo apt-get install qt510base
source /opt/qt510/bin/qt510-env.sh
```
Clone the fork of qdjango dependency without Qt keywords and build it from source.
```
git clone https://github.com/tmstieff/qdjango.git
cd qdjango
qmake
make
sudo make install
cd ../
```
Clone the pybind11 project and build it from source.
```
git clone https://github.com/pybind/pybind11.git
cd pybind11
mkdir build
cd build
python3 -m pip install pytest
cmake ..
sudo make install
sudo ldconfig
```
Build the Woke project.
```
qmake -v
qmake CONFIG+=test
make
./woke-test
qmake CONFIG+=release PREFIX=/usr
make
make install
```### Arch
Arch users will need Python3, Qt 5, and possibly CMake and GCC.
```
sudo pacman -S python qt5-base cmake gcc
```
Once installed, the instructions above should be identical.### Windows
The project can be built from source within Windows using the MSVC2017 compiler. Instructions will vary based on the project location, but you will need to install 64-bit version of Python 3, Qt 5, and CMake. Ensure that all dependencies are available through your system path.
Build the qdjango fork and the pybind11 project from source.
```
git clone https://github.com/tmstieff/qdjango.git
cd qdjango
qmake qdjango.pro
nmake release
nmake install
C:\Python36-x64\Scripts\pip install pytest
cd ..
git clone https://github.com/pybind/pybind11.git
cd pybind11
mkdir build
cd build
cmake -A x64 ..
cmake -A x64 --build .
cmake --build . --config Release --target INSTALL
```
Build woke from source.
```
mkdir build
cd build
qmake ..
nmake release
```
Copy the qdjango libaries and the pybind11 libraries into the same folder as your executable prior to running. It may also be necessary to copy the OpenSSL dynamic libaries from the `/misc/win` folder.