Skip to main content

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


Download files

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

Source Distribution

wazuh-api-rest-0.0.1.tar.gz (11.5 kB view hashes)

Uploaded Source

Built Distribution

wazuh_api_rest-0.0.1-py3-none-any.whl (12.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page