WMI


NameWMI JSON
Version 1.5.1 PyPI version JSON
download
home_pagehttp://timgolden.me.uk/python/wmi.html
SummaryWindows Management Instrumentation
upload_time2020-04-28 08:22:58
maintainer
docs_urlNone
authorTim Golden
requires_python
licensehttp://www.opensource.org/licenses/mit-license.php
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            WMI - Windows Management Instrumentation
========================================

What is it?
-----------

Windows Management Instrumentation (WMI) is Microsoft's implementation of
Web-Based Enterprise Management (WBEM), an industry initiative to provide
a Common Information Model (CIM) for pretty much any information about a
computer system.

The Python WMI module is a lightweight wrapper on top of the pywin32
extensions, and hides some of the messy plumbing needed to get Python to
talk to the WMI API. It's pure Python and has been tested against all
versions of Python from 2.5 to 3.4. It should work with any recent
version of pywin32.


Where do I get it?
------------------

* **PyPI**: https://pypi.python.org/pypi/WMI/
* **Github**: https://github.com/tjguk/wmi


How do I install it?
--------------------

::

    pip install wmi


How do I use it?
----------------

Have a look at the `tutorial` or the `cookbook`. As a quick
taster, try this, to find all Automatic services which are not running
and offer the option to restart each one::

    import wmi

    c = wmi.WMI()
    for s in c.Win32_Service(StartMode="Auto", State="Stopped"):
        if raw_input("Restart %s? " % s.Caption).upper() == "Y":
            s.StartService()

What's Changed?
---------------

See the `changes` document

Copyright & License?
--------------------

* Copyright Tim Golden <mail@timgolden.me.uk> 2003 - 2015

* Licensed under the (GPL-compatible) MIT License:
  http://www.opensource.org/licenses/mit-license.php

Prerequisites
-------------

If you're running a recent Python (2.5+) on a recent Windows (2k, 2k3, 2012, XP, Vista, 7, 8.x)
and you have Mark Hammond's win32 extensions installed, you're probably
up-and-running already. Otherwise...


Python
~~~~~~
http://www.python.org/

pywin32 (was win32all)
~~~~~~~~~~~~~~~~~~~~~~
http://sourceforge.net/projects/pywin32/files/

Specifically, builds 154/155 fixed a problem which affected the WMI
moniker construction. You can still work without this fix, but some
more complex monikers will fail. (The current build is 219 so you're
probably ok unless you have some very stringent backwards-compatible
requirement).

makepy
~~~~~~
(NB my own experience over several systems is that this
step isn't necessary. However, if you have problems...)
You may have to compile makepy support for some typelibs. The following
are reported to be significant:

* Microsoft WMI Scripting Library
* WMI ADSI Extension Type Library
* WMICntl Type Library

If you've not done this before, start the PythonWin environment, select
Tools > Com Makepy utility from the menu, select the library by name, and
click [OK].





            

Raw data

            {
    "_id": null,
    "home_page": "http://timgolden.me.uk/python/wmi.html",
    "name": "WMI",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Tim Golden",
    "author_email": "mail@timgolden.me.uk",
    "download_url": "https://files.pythonhosted.org/packages/d4/66/6364deb0a03415f96c66803d8c4379f808f2401da3bdb183348487b10510/WMI-1.5.1.tar.gz",
    "platform": "",
    "description": "WMI - Windows Management Instrumentation\n========================================\n\nWhat is it?\n-----------\n\nWindows Management Instrumentation (WMI) is Microsoft's implementation of\nWeb-Based Enterprise Management (WBEM), an industry initiative to provide\na Common Information Model (CIM) for pretty much any information about a\ncomputer system.\n\nThe Python WMI module is a lightweight wrapper on top of the pywin32\nextensions, and hides some of the messy plumbing needed to get Python to\ntalk to the WMI API. It's pure Python and has been tested against all\nversions of Python from 2.5 to 3.4. It should work with any recent\nversion of pywin32.\n\n\nWhere do I get it?\n------------------\n\n* **PyPI**: https://pypi.python.org/pypi/WMI/\n* **Github**: https://github.com/tjguk/wmi\n\n\nHow do I install it?\n--------------------\n\n::\n\n    pip install wmi\n\n\nHow do I use it?\n----------------\n\nHave a look at the `tutorial` or the `cookbook`. As a quick\ntaster, try this, to find all Automatic services which are not running\nand offer the option to restart each one::\n\n    import wmi\n\n    c = wmi.WMI()\n    for s in c.Win32_Service(StartMode=\"Auto\", State=\"Stopped\"):\n        if raw_input(\"Restart %s? \" % s.Caption).upper() == \"Y\":\n            s.StartService()\n\nWhat's Changed?\n---------------\n\nSee the `changes` document\n\nCopyright & License?\n--------------------\n\n* Copyright Tim Golden <mail@timgolden.me.uk> 2003 - 2015\n\n* Licensed under the (GPL-compatible) MIT License:\n  http://www.opensource.org/licenses/mit-license.php\n\nPrerequisites\n-------------\n\nIf you're running a recent Python (2.5+) on a recent Windows (2k, 2k3, 2012, XP, Vista, 7, 8.x)\nand you have Mark Hammond's win32 extensions installed, you're probably\nup-and-running already. Otherwise...\n\n\nPython\n~~~~~~\nhttp://www.python.org/\n\npywin32 (was win32all)\n~~~~~~~~~~~~~~~~~~~~~~\nhttp://sourceforge.net/projects/pywin32/files/\n\nSpecifically, builds 154/155 fixed a problem which affected the WMI\nmoniker construction. You can still work without this fix, but some\nmore complex monikers will fail. (The current build is 219 so you're\nprobably ok unless you have some very stringent backwards-compatible\nrequirement).\n\nmakepy\n~~~~~~\n(NB my own experience over several systems is that this\nstep isn't necessary. However, if you have problems...)\nYou may have to compile makepy support for some typelibs. The following\nare reported to be significant:\n\n* Microsoft WMI Scripting Library\n* WMI ADSI Extension Type Library\n* WMICntl Type Library\n\nIf you've not done this before, start the PythonWin environment, select\nTools > Com Makepy utility from the menu, select the library by name, and\nclick [OK].\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "http://www.opensource.org/licenses/mit-license.php",
    "summary": "Windows Management Instrumentation",
    "version": "1.5.1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "a584abbab7941b9b847c1b1d346a76a3",
                "sha256": "1d6b085e5c445141c475476000b661f60fff1aaa19f76bf82b7abb92e0ff4942"
            },
            "downloads": -1,
            "filename": "WMI-1.5.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a584abbab7941b9b847c1b1d346a76a3",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 28912,
            "upload_time": "2020-04-28T08:22:56",
            "upload_time_iso_8601": "2020-04-28T08:22:56.055746Z",
            "url": "https://files.pythonhosted.org/packages/ee/b9/a80d1ed4d115dac8e2ac08d16af046a77ab58e3d186e22395bf2add24090/WMI-1.5.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "25dd34f962186508be4fe728eb05b80a",
                "sha256": "b6a6be5711b1b6c8d55bda7a8befd75c48c12b770b9d227d31c1737dbf0d40a6"
            },
            "downloads": -1,
            "filename": "WMI-1.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "25dd34f962186508be4fe728eb05b80a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 26254,
            "upload_time": "2020-04-28T08:22:58",
            "upload_time_iso_8601": "2020-04-28T08:22:58.096738Z",
            "url": "https://files.pythonhosted.org/packages/d4/66/6364deb0a03415f96c66803d8c4379f808f2401da3bdb183348487b10510/WMI-1.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-04-28 08:22:58",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "wmi"
}
        
Elapsed time: 0.03126s