Skip to main content

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

Metadata

Release files for wazuh-api-rest 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wazuh-api-rest 0.0.1
File Size Uploaded
wazuh-api-rest-0.0.1.tar.gz 11.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wazuh-api-rest 0.0.1
File Interpreter ABI Platform
wazuh_api_rest-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.6 kB

Release files / wazuh-api-rest-0.0.1.tar.gz

Download URL wazuh-api-rest-0.0.1.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
657d5b39bac755314eb01de722edf72d3be57b9f5ed559163d0a84c6f0b9f878
BLAKE2b-256 checksum
How to use checksums
9335e874b422f1a989206b4e3fb29653f176a7352759f73f3d94d49f335bec41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

Release files / wazuh_api_rest-0.0.1-py3-none-any.whl

Download URL wazuh_api_rest-0.0.1-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d0a0a3e0a36b77f3a47b1701da16b9dba771488c718b54a6fc0df09c4f5fcde
BLAKE2b-256 checksum
How to use checksums
54d5a0f123c008fce4675fd136f96990fb7d29b05a1e5f91d1a644f3d1395aba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page