Python Audiolayer
This package contains a Python 3 Extension for playing audio files, reading and writing metadata and converting those files. For decoding and encoding files the libav library is used. Playback is handled by libportaudio.
The project website can be found at GitHub.
Requirements
python3.x (Tested using python3.3)
libavcodec
libavformat
libavutil
libportaudio
Installation
Using pip:
pip install audiolayer
From GitHub:
git clone https://github.com/remcohaszing/python-audiolayer.git cd python-audiolayer python3 setup.py install
Usage
Reading song metadata:
>>> from audiolayer import Song >>> filename = 'Finntroll - Trollhammaren.flac' >>> song = Song(filename) >>> song['artist'] Finntroll >>> song['album'] Trollhammaren >>> song['title'] Trollhammaren >>>
Saving song metadata:
>>> song['album'] = 'Nattfödd' >>> song['album'] 'Nattfödd' >>> song.save() >>>
Saving a copy of the song with the new metadata to a new file: >>> song.save(filename=’Finntroll/Nattfödd - Trollhammaren.flac’) >>>
Converting the song (not implemented):
>>> converted = song.convert('Finntroll - Trollhammaren.ogg',
... format='opus', q=4)
>>> converted.filename
Finntroll - Trollhammaren.ogg
>>>
Playback (current implementation):
>>> song.play() # Wait for the song to finish. >>>
Playback (target implementation):
>>> song.play() 0.00 >>> song.pause() 4.29 >>> song.play_or_pause() 4.29 >>> song.playing_time 12.53 >>>
Testing
The unittests can be run using:
python3 setup.py test
It is also possible to use nose to run the tests:
python3 setup.py nosetests
Coding style
C code must be in compliance with pep7.
Python code must be in compliance with pep8.
All code must be covered by unittests.
To test the Python code for pep8 compliance, go to the project root directory and run:
python3 setup.py flake8
License
This project is licensed under the BSD 3-Clause License.
Metadata
Release files for audiolayer 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| audiolayer-0.1.1.tar.gz | 9.9 kB | Without provenance | Details for audiolayer-0.1.1.tar.gz |
Release files / audiolayer-0.1.1.tar.gz
| Download URL | audiolayer-0.1.1.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93e658e83925426b82c3aed2e4e57aea2fcb0f56ecebc325839b41e727868db5
|
|
BLAKE2b-256 checksum How to use checksums |
17747dab42def0e05b1b12ebb6fef8c07a0d3e43db3a3b04cb0f936a7372c30e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for audiolayer 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.