Wazuh Api Rest
Project description
Wazuh Api Rest
This application expose an api rest for handling User and User's tasks.
Run Local Test Server
This application use docker and docker compose to run a local server. So first make sure you have this two installed in your pc.
Steps to run the local server:
$ docker-compose up
After application start you can access the OpenApi documentation at http:://localhost:5002/docs
Run Local Development Server
You need to create a virtualenv and install the dependencies with pip:
$ python3 -m venv $PWD/myvenv
$ source myvenv/bin/activate
$ pip install -r requirements.txt
For test your development you can run the application in debug mode like this:
$ python src/setups/runapp.py --debug
After application start you can access the OpenApi documentation in http:://localhost:5002/docs
Run tests
In order to run the unit test suit, first you need to setup the PYTHONPATH envvar like this
$ export PYTHONPATH=$PWD/src
For run test do
$ python -m pytest test
Build for Distribution
If you need build a distribution package run the following command:
$python -m build
Then you will see a new folder named dist/
which contains the .tar.gz
and .whl
file for
distribution.
Deploy in Heroku
For deploy in Heroku you need first login to your account and then run the following commands:
- Run container login
$heroku container:login
Then create a new app, choose a name for your app, for example I will use your-app-name
$heroku create your-app-name
Now you need to push your container and link it to your app
$heroku container:push web -a your-app-name
Last step is release
$heroku container:release web -a your-app-name
Now you can access your app at your-app-name.herokuapp.com/docs
Project details
Release history Release notifications | RSS feed
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
Hashes for wazuh_api_rest-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d0a0a3e0a36b77f3a47b1701da16b9dba771488c718b54a6fc0df09c4f5fcde |
|
MD5 | 87fa25cf142754f4c3aa712908fc3db8 |
|
BLAKE2b-256 | 54d5a0f123c008fce4675fd136f96990fb7d29b05a1e5f91d1a644f3d1395aba |