Skip to main content

M3U serializer/deserializer

Project description

Project description

M3U serializer / deserializer a lightweight to write and read M3U medie files.

Installing

Install and update using pip:

$ pip install -U m3u_serializer

A Simple Example

#!/usr/bin/env python
from m3u_serializer import M3UDeserializer    
from m3u_serializer import M3USerializer

groups = [ 'Channels UK', 'Channels NL' ]

m3uReader = M3UDeserializer( 'input.m3u' )
m3uwriter = M3USerializer( 'output.m3u' )
for item in m3uReader:
    print( item )
    # do some filtering
    if item.Group in groups:
        m3uwriter.write( item )
    
# all done

See form aore examples the tests/tests.py

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

m3u_serializer-0.1.4.tar.gz (9.6 kB view hashes)

Uploaded Source

Built Distribution

m3u_serializer-0.1.4-py3-none-any.whl (8.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page