Skip to main content

A fork of Bryan Bishop's wmi-client-wrapper extended to include Python3 support

Project description

python-wmi-client-wrapper (forked for Python3 support)

This repo contains a fork from python-wmi-client-wrapper by kanzure; the changes are roughly as follows:

  • Add Python3 support
    • Naive approach, just using future to do the hard work (boilerplate at top of each file for compatibility layer)
  • Add support for domain parameter in WmiClientWrapper constructor
  • Bump version of future to handle CVE-2022-40899

To install this forked version:

pip install wmi-client-wrapper-py3

The rest of this README is verbatim of the original repo.


This is a wrapper around wmi-client for Linux. Apparently the python-wmi module uses Windows APIs to access WMI, which isn't something that is going to work on Linux.

installing

pip install wmi-client-wrapper

usage

import wmi_client_wrapper as wmi

wmic = wmi.WmiClientWrapper(
    username="Administrator",
    password="password",
    host="192.168.1.149",
)

output = wmic.query("SELECT * FROM Win32_Processor")

#get FibrePort Info
wmic = wmi.WmiClientWrapper(
    username="Administrator",
    password="password",
    host="192.168.1.1",
    namespace='//./root/WMI'
)
output = wmic.query('Select * FROM MSFC_FibrePortNPIVAttributes')

testing

nosetests

license

BSD

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

wmi-client-wrapper-py3-2023.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

wmi_client_wrapper_py3-2023.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file wmi-client-wrapper-py3-2023.1.tar.gz.

File metadata

File hashes

Hashes for wmi-client-wrapper-py3-2023.1.tar.gz
Algorithm Hash digest
SHA256 1924c8c98dc538956ab6eae632ce58484235bf5543357079633eb1bac55c5415
MD5 0f589cd54f63493afa5f5d447757de5d
BLAKE2b-256 092ea80dd48086c0260a8bbb4733304523febf41ce8df25b9812b02785f9573f

See more details on using hashes here.

File details

Details for the file wmi_client_wrapper_py3-2023.1-py3-none-any.whl.

File metadata

File hashes

Hashes for wmi_client_wrapper_py3-2023.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4589c0c7c8fe7813e53fc005a6553fde6025dcdadd1c602a0333d1033b14d261
MD5 5fdf462962de8fade03cbe2b64f9251e
BLAKE2b-256 e5255c6ef6a342bf8f82b00ce3d0ac13f686b2905619eae14f27fb8dff1e4244

See more details on using hashes here.

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