Metadata-Version: 2.4
Name: vm-console-client
Version: 6.6.55
Summary: Python client for the InsightVM/Nexpose REST API
Home-page: https://github.com/Muhammad-Rebaal/vm-console-client-python
Author: Muhammad-Rebaal
Author-email: mrebaal47@gmail.com
Project-URL: Source, https://github.com/Muhammad-Rebaal/vm-console-client-python
Project-URL: Bug Tracker, https://github.com/Muhammad-Rebaal/vm-console-client-python/issues
Keywords: InsightVM,Nexpose,API,security,vulnerability
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Security
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: certifi>=2017.4.17
Requires-Dist: python-dateutil>=2.1
Requires-Dist: six>=1.10
Requires-Dist: urllib3>=1.23
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# vm-console-client

Python library for the InsightVM/Nexpose RESTful API.

**Author:** [Muhammad-Rebaal](https://github.com/Muhammad-Rebaal)

## Install

```bash
pip install vm-console-client
```

Then import:

```python
import rapid7vmconsole
```

## Quick Setup (from source)

```bash
cd vm-console-client-python
python3 -m venv env
source env/bin/activate   # Windows: env\Scripts\activate
pip install -r requirements.txt
pip install .
```

Run one of the sample clients:

```bash
mv samples/list_assets.py .
# Edit username, password, and host in list_assets.py
python list_assets.py
```

## Publish to PyPI

Package name on PyPI: `vm-console-client`  
Import name after install: `rapid7vmconsole`  
Author: Muhammad-Rebaal

### 1. Create a PyPI account

1. Sign up at [https://pypi.org/account/register/](https://pypi.org/account/register/)
2. Enable 2FA (required for uploading)
3. Create an API token: Account settings → API tokens → “Add API token”
   - Scope: “Entire account” for the first upload, or project-scoped after the project exists
   - Copy the token (starts with `pypi-…`) — you only see it once

Optional but recommended: also create an account on [https://test.pypi.org](https://test.pypi.org) and test-upload there first.

### 2. Build the package (from this folder)

```bash
pip install --upgrade build twine
python -m build
```

This creates `dist/vm_console_client-<version>-py3-none-any.whl` and `.tar.gz`.

### 3. (Optional) Upload to TestPyPI first

```bash
python -m twine upload --repository testpypi dist/*
```

When prompted:
- Username: `__token__`
- Password: paste your TestPyPI API token (including the `pypi-` prefix)

Install from TestPyPI to verify:

```bash
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ vm-console-client
python -c "import rapid7vmconsole; print(rapid7vmconsole.__author__, rapid7vmconsole.__version__)"
```

### 4. Upload to real PyPI

```bash
# Rebuild if you changed anything, or remove old dist/ first:
# Remove-Item -Recurse -Force dist   # PowerShell
# rm -rf dist                        # bash
python -m build
python -m twine upload dist/*
```

Username: `__token__`  
Password: your **PyPI** API token

### 5. Install and use

```bash
pip install vm-console-client
```

```python
import rapid7vmconsole

print(rapid7vmconsole.__author__)   # Muhammad-Rebaal
print(rapid7vmconsole.__version__)
```

Bump `VERSION` in `setup.py` (and `__version__` in `rapid7vmconsole/__init__.py`) before each new release — PyPI does not allow re-uploading the same version.

## Auto-generating code
The library can be regenerated from an InsightVM/Nexpose Swagger file using Swagger Codegen.
An example command:

```
java -jar swagger-codegen-cli-2.3.0.jar generate \
         -i api-files/console-swagger-6.5.5.json \
         -l python \
         -o ./ \
         -c setup_workspace/config.json
```

## Versioning and Releases
Generated libraries follow X.Y.Z console versioning.
