Metadata-Version: 2.1
Name: py-canberra
Version: 0.0.4
Summary: Wrappers for the libcanberra sound-playing interface
Home-page: https://github.com/theY4Kman/py-canberra
Author: Zach "theY4Kman" Kanzler
Author-email: they4kman@gmail.com
License: MIT
Project-URL: Repository, https://github.com/theY4Kman/py-canberra
Project-URL: Documentation, https://py-canberra.readthedocs.io/
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Multimedia :: Sound/Audio
Requires-Python: ==3.*,>=3.6.0
Description-Content-Type: text/x-rst
Provides-Extra: dev
Requires-Dist: cython (==0.*,>=0.29.19) ; extra == 'dev'

py-canberra
===========

.. image:: https://badge.fury.io/py/py-canberra.svg
   :target: https://badge.fury.io/py/py-canberra
.. image:: https://readthedocs.org/projects/py-canberra/badge/?version=latest
   :target: https://py-canberra.readthedocs.io/en/latest/?badge=latest
   :alt: Documentation Status

py-canberra is a Python interface to the `libcanberra <http://0pointer.de/lennart/projects/libcanberra/>`_ sound-playing library for Linux.

Full documentation is available `here <https://py-canberra.readthedocs.io/en/latest/>`_


Dependencies
------------

The only dependency is libcanberra, which can usually be installed from your package repository as ``libcanberra``.

.. code-block:: bash

    # Ubuntu
    apt install libcanberra0

    # RHEL / CentOS
    yum install libcanberra

    # Arch
    pacman -S libcanberra


Installation
------------

py-canberra includes binary distributions for many platforms through `PyPI <https://pypi.org/project/py-canberra/>`_

.. code-block:: bash

    pip install py-canberra


Quickstart
----------

Oftentimes, if libcanberra is installed, some default system sounds will be installed to ``/usr/share/sounds``, including a bell sound

.. code-block:: python

    import canberra
    canberra.play(event_id='bell')

    import time
    time.sleep(0.5)  # wait for the sound to finish playing

This plays ``/usr/share/sounds/freedesktop/stereo/bell.oga`` on the default output device.


