pycaw


Namepycaw JSON
Version 20230407 PyPI version JSON
download
home_pagehttps://github.com/AndreMiras/pycaw
SummaryPython Core Audio Windows Library
upload_time2023-04-07 21:38:51
maintainer
docs_urlNone
authorAndre Miras
requires_python
license
keywords
VCS
bugtrack_url
requirements comtypes psutil
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pycaw

[![Tests](https://github.com/AndreMiras/pycaw/workflows/Tests/badge.svg)](https://github.com/AndreMiras/pycaw/actions/workflows/tests.yml)
[![Coverage Status](https://coveralls.io/repos/github/AndreMiras/pycaw/badge.svg?branch=develop)](https://coveralls.io/github/AndreMiras/pycaw?branch=develop)
[![PyPI release](https://github.com/AndreMiras/pycaw/workflows/PyPI%20release/badge.svg)](https://github.com/AndreMiras/pycaw/actions/workflows/pypi-release.yml)
[![PyPI version](https://badge.fury.io/py/pycaw.svg)](https://badge.fury.io/py/pycaw)

Python Core Audio Windows Library, working for both Python2 and Python3.

## Install

Latest stable release:
```bat
pip install pycaw
```

Development branch:
```bat
pip install https://github.com/AndreMiras/pycaw/archive/develop.zip
```

System requirements:
```bat
choco install visualcpp-build-tools
```

## Usage

```Python
from ctypes import cast, POINTER
from comtypes import CLSCTX_ALL
from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume
devices = AudioUtilities.GetSpeakers()
interface = devices.Activate(
    IAudioEndpointVolume._iid_, CLSCTX_ALL, None)
volume = cast(interface, POINTER(IAudioEndpointVolume))
volume.GetMute()
volume.GetMasterVolumeLevel()
volume.GetVolumeRange()
volume.SetMasterVolumeLevel(-20.0, None)
```

See more in the [examples](examples/) directory.

## Tests

See in the [tests](tests/) directory.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/AndreMiras/pycaw",
    "name": "pycaw",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Andre Miras",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/4c/cd/7bc2ecbb7527fa5eb4ddb1ab3ba15f9796235d51f17c788d3e7c5520689e/pycaw-20230407.tar.gz",
    "platform": null,
    "description": "# pycaw\r\n\r\n[![Tests](https://github.com/AndreMiras/pycaw/workflows/Tests/badge.svg)](https://github.com/AndreMiras/pycaw/actions/workflows/tests.yml)\r\n[![Coverage Status](https://coveralls.io/repos/github/AndreMiras/pycaw/badge.svg?branch=develop)](https://coveralls.io/github/AndreMiras/pycaw?branch=develop)\r\n[![PyPI release](https://github.com/AndreMiras/pycaw/workflows/PyPI%20release/badge.svg)](https://github.com/AndreMiras/pycaw/actions/workflows/pypi-release.yml)\r\n[![PyPI version](https://badge.fury.io/py/pycaw.svg)](https://badge.fury.io/py/pycaw)\r\n\r\nPython Core Audio Windows Library, working for both Python2 and Python3.\r\n\r\n## Install\r\n\r\nLatest stable release:\r\n```bat\r\npip install pycaw\r\n```\r\n\r\nDevelopment branch:\r\n```bat\r\npip install https://github.com/AndreMiras/pycaw/archive/develop.zip\r\n```\r\n\r\nSystem requirements:\r\n```bat\r\nchoco install visualcpp-build-tools\r\n```\r\n\r\n## Usage\r\n\r\n```Python\r\nfrom ctypes import cast, POINTER\r\nfrom comtypes import CLSCTX_ALL\r\nfrom pycaw.pycaw import AudioUtilities, IAudioEndpointVolume\r\ndevices = AudioUtilities.GetSpeakers()\r\ninterface = devices.Activate(\r\n    IAudioEndpointVolume._iid_, CLSCTX_ALL, None)\r\nvolume = cast(interface, POINTER(IAudioEndpointVolume))\r\nvolume.GetMute()\r\nvolume.GetMasterVolumeLevel()\r\nvolume.GetVolumeRange()\r\nvolume.SetMasterVolumeLevel(-20.0, None)\r\n```\r\n\r\nSee more in the [examples](examples/) directory.\r\n\r\n## Tests\r\n\r\nSee in the [tests](tests/) directory.\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python Core Audio Windows Library",
    "version": "20230407",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "42385621e552ed99a1d4f9d8d49cb48a19a0e3ce09450c52a0e80b82edf205d4",
                "md5": "beeb93297e76cd8357647d88bc84ce27",
                "sha256": "97ccceda83d09d00c811b84a766d6b0bca211c284bd8d40475463e0f9aceeea0"
            },
            "downloads": -1,
            "filename": "pycaw-20230407-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "beeb93297e76cd8357647d88bc84ce27",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 24663,
            "upload_time": "2023-04-07T21:38:49",
            "upload_time_iso_8601": "2023-04-07T21:38:49.782582Z",
            "url": "https://files.pythonhosted.org/packages/42/38/5621e552ed99a1d4f9d8d49cb48a19a0e3ce09450c52a0e80b82edf205d4/pycaw-20230407-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4ccd7bc2ecbb7527fa5eb4ddb1ab3ba15f9796235d51f17c788d3e7c5520689e",
                "md5": "cf24a841d12b95e85095a8457ca6dda1",
                "sha256": "32b18cfd972fecad2bc97e746107e3c1323e41666f7c70541b2fac5046b33eb8"
            },
            "downloads": -1,
            "filename": "pycaw-20230407.tar.gz",
            "has_sig": false,
            "md5_digest": "cf24a841d12b95e85095a8457ca6dda1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 22255,
            "upload_time": "2023-04-07T21:38:51",
            "upload_time_iso_8601": "2023-04-07T21:38:51.527073Z",
            "url": "https://files.pythonhosted.org/packages/4c/cd/7bc2ecbb7527fa5eb4ddb1ab3ba15f9796235d51f17c788d3e7c5520689e/pycaw-20230407.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-07 21:38:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "AndreMiras",
    "github_project": "pycaw",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "comtypes",
            "specs": [
                [
                    "==",
                    "1.1.11"
                ]
            ]
        },
        {
            "name": "psutil",
            "specs": [
                [
                    "==",
                    "5.9.0"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "pycaw"
}
        
Elapsed time: 0.06988s