playsound
=========
*Pure Python, cross platform, single function module with no dependencies for playing sounds.*
Installation
------------
Install via pip:
.. code-block:: bash
$ pip install playsound
Done.
If you insist on the (slightly) harder way of installing, from source,
you know how to do it already and don't need my help.
The latest version of the source code can be found at:
https://github.com/TaylorSMarks/playsound
Quick Start
-----------
Once you've installed, you can really quickly verified that it works with just this:
.. code-block:: python
>>> from playsound import playsound
>>> playsound('/path/to/a/sound/file/you/want/to/play.mp3')
Documentation
-------------
The playsound module contains only one thing - the function (also named) playsound.
It requires one argument - the path to the file with the sound you'd like to play. This may be a local file, or a URL.
There's an optional second argument, block, which is set to True by default. Setting it to False makes the function run asynchronously.
On Windows, uses windll.winmm. WAVE and MP3 have been tested and are known to work. Other file formats may work as well.
On OS X, uses AppKit.NSSound. WAVE and MP3 have been tested and are known to work. In general, anything QuickTime can play, playsound should be able to play, for OS X.
On Linux, uses GStreamer. Known to work on Ubuntu 14.04 and ElementaryOS Loki. I expect any Linux distro with a standard gnome desktop experience should work.
If you'd like other Linux distros (or any other OS) to work, submit a PR adding in support for it, but please make sure it passes the tests (see below).
Testing
-------
Playsound includes a small set of tests - if you're making a PR, please ensure that you have no regressions and all the tests pass on your local system.
Also make sure that Travis-CI, which runs these tests against Windows Server 2016, macOS 10.11 (El Capitan, 2015) and 11.3 (Big Sur, 2020), Ubuntu 14 (Trusty), and Ubuntu 18 (Bionic), for both Python 2.7 and 3.9, fully passes.
You can check the Travis-CI status for Playsound here: https://travis-ci.com/github/TaylorSMarks/playsound/builds
Copyright
---------
This software is Copyright (c) 2021 Taylor Marks <taylor@marksfam.com>.
See the bundled LICENSE file for more information.
Raw data
{
"_id": null,
"home_page": "https://github.com/TaylorSMarks/playsound",
"name": "playsound2",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "sound playsound music wave wav mp3 media song play audio",
"author": "Taylor Marks",
"author_email": "taylor@marksfam.com",
"download_url": "https://files.pythonhosted.org/packages/19/8e/61b1dad249e089229f162e2175086542328dcc7e586fa6326722e47ce61b/playsound2-1.3.0.tar.gz",
"platform": null,
"description": "playsound\n=========\n*Pure Python, cross platform, single function module with no dependencies for playing sounds.*\n\nInstallation\n------------\nInstall via pip:\n\n.. code-block:: bash\n\n $ pip install playsound\n\nDone.\n\nIf you insist on the (slightly) harder way of installing, from source,\nyou know how to do it already and don't need my help.\n\nThe latest version of the source code can be found at:\nhttps://github.com/TaylorSMarks/playsound\n\nQuick Start\n-----------\nOnce you've installed, you can really quickly verified that it works with just this:\n\n.. code-block:: python\n\n >>> from playsound import playsound\n >>> playsound('/path/to/a/sound/file/you/want/to/play.mp3') \n\nDocumentation\n-------------\nThe playsound module contains only one thing - the function (also named) playsound.\n\nIt requires one argument - the path to the file with the sound you'd like to play. This may be a local file, or a URL.\n\nThere's an optional second argument, block, which is set to True by default. Setting it to False makes the function run asynchronously.\n\nOn Windows, uses windll.winmm. WAVE and MP3 have been tested and are known to work. Other file formats may work as well.\n\nOn OS X, uses AppKit.NSSound. WAVE and MP3 have been tested and are known to work. In general, anything QuickTime can play, playsound should be able to play, for OS X.\n\nOn Linux, uses GStreamer. Known to work on Ubuntu 14.04 and ElementaryOS Loki. I expect any Linux distro with a standard gnome desktop experience should work.\n\nIf you'd like other Linux distros (or any other OS) to work, submit a PR adding in support for it, but please make sure it passes the tests (see below).\n\nTesting\n-------\nPlaysound includes a small set of tests - if you're making a PR, please ensure that you have no regressions and all the tests pass on your local system.\nAlso make sure that Travis-CI, which runs these tests against Windows Server 2016, macOS 10.11 (El Capitan, 2015) and 11.3 (Big Sur, 2020), Ubuntu 14 (Trusty), and Ubuntu 18 (Bionic), for both Python 2.7 and 3.9, fully passes.\nYou can check the Travis-CI status for Playsound here: https://travis-ci.com/github/TaylorSMarks/playsound/builds\n\nCopyright\n---------\nThis software is Copyright (c) 2021 Taylor Marks <taylor@marksfam.com>.\n\nSee the bundled LICENSE file for more information.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Pure Python, cross platform, single function module with no dependencies for playing sounds.",
"version": "1.3.0",
"project_urls": {
"Homepage": "https://github.com/TaylorSMarks/playsound"
},
"split_keywords": [
"sound",
"playsound",
"music",
"wave",
"wav",
"mp3",
"media",
"song",
"play",
"audio"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "198e61b1dad249e089229f162e2175086542328dcc7e586fa6326722e47ce61b",
"md5": "761e3ef11f5be09ca2c22318718a8920",
"sha256": "66f7a6318933ee668663791957c841af801bc52dd3e07849390da1d2f18d65a2"
},
"downloads": -1,
"filename": "playsound2-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "761e3ef11f5be09ca2c22318718a8920",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7172,
"upload_time": "2023-07-07T06:51:57",
"upload_time_iso_8601": "2023-07-07T06:51:57.129427Z",
"url": "https://files.pythonhosted.org/packages/19/8e/61b1dad249e089229f162e2175086542328dcc7e586fa6326722e47ce61b/playsound2-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-07 06:51:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "TaylorSMarks",
"github_project": "playsound",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"lcname": "playsound2"
}