Giter Site home page Giter Site logo

py-skytune's Introduction

py-skytune

Python API, CLI and UI for skytune radios

Quick start

API

from py_skytune.radio import Radio
radio = Radio(ip_address="192.168.1.9")

# Get favorites
favs = radio.favorites
print(f"\nFavorites{'-'*50}")
for fav in favs:
    print(fav.uid, fav.name, fav.location, fav.genre, fav.url)

# Play a favorite
playing = radio.play_favorite(1)
print(playing)

# Sort the favorites
sorted_favorites = radio.sort_favorites(reverse=False)
for fav in sorted_favorites:
    print(fav.uid, fav.name, fav.location, fav.genre, fav.url)

CLI

$ export SKYTUNE_IP_ADDRESS="192.168.1.9"
$ skytune favorites

1 1.FM - Absolute Country Hits Radio Switzerland Various http://strm112.1.fm/acountry_mobile_mp3
2 1.FM Always Christmas Switzerland Holiday & Seasonal https://strm112.1.fm/christmas_mobile_mp3
3 BBC World Service United Kingdom Various http://stream.live.vc.bbcmedia.co.uk/bbc_world_service
4 Classical KING FM United States Various https://classicalking.streamguys1.com/king-fm-aac-128k

$ skytune play 1

UI

$ skytune

screenshot

Documentation

See the docs directory or the source.

Rebuild docs

pydoc-markdown -m py_skytune.radio -I src > docs/radio.md
pydoc-markdown -m py_skytune.favorites -I src > docs/favorites.md
pydoc-markdown -m py_skytune.genre -I src > docs/genre.md    
pydoc-markdown -m py_skytune.locations -I src > docs/locations.md

py-skytune's People

Contributors

cidrblock avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.