Code Monkey home page Code Monkey logo

openwebamp's Introduction

OpenWebAmp

It really whips the Python's Ass.

OpenWebAmp (OWA) is an attempt to build a sharable web music player based on API first principles.

  • API First: By designing OWA's API first, rather than as a traditional website, makes extending it's services simple.
    • RESTful: OWA's API is designed to be RESTful, storing and transfering only data between client and server.
    • Discoverable: Each subresource contained in a response also communicates needed information about location.
    • JSON: Because JSON is easy to work with.
  • Sharable: Build and share playlists among other members and tag artists with genres.

###Features

  • Stream music files easily through the web
  • Build and share playlists of favorite tracks
  • Tag artists with every genre imaginable

###Use Currently, OpenWebAmp is just a service initiated from the command line.

python manager.py add -d /path/to/music/directory

OpenWebAmp will crawl (recursively) the target directory and process any compatible music file it discovers. Processing consists simply of pulling relevant metadata information out of the file and storing it in a RDBMS.

After that, you can view:

  • host/artist/ for artist listing
  • host/album/ for album listing
  • host/track/ for track listing.

Additionally, each of these endpoints supports an /<int:id>/ portion that will allow you to view an individual resource.

###Streaming

Each track supports streaming. host/stream/<str:uuid>/ handles this.

However, currently streaming is handled by Flask sending a file resource instead of passing this off to a HTTP server. This will be removed when development moves beyond initial feature implementation.

###Why? Undoubtedly, this question will be asked numerous times. The only real answer is: Why not? I've built small APIs for practice before but nothing I've been excited about sharing, but this project is something I do want to share.

There are better options for putting music in the cloud, I'll admit that. However, reinventing the wheel leads to understanding. What do I hope to learn?

  • Structuring projects: Especially avoiding things like circular imports and dependencies.
  • Developing a deeper understanding of Python, Flask and SQLAlchemy.
  • Learning proper RESTful API techniques:
    • Building a stateless member system
    • Finding the right balance of information to communicate with each request
    • Being discoverable and self-documenting
  • Writing documentation covering most aspects of the application
  • Deploying to various server stacks
  • Utilizing git in day-to-day programming
  • Testing: when, what, where and how often to test

###Requirements OpenWebAmp was developed using Python 3.4; however, I believe it should be backwards compatible to 3.0 and with some tinkering to 2.7/6.

I am planning to initially deploy OWA to Nginx and use X-Accel headers to serve media.

The awesome_slugify package depends on regex which requires the Python development package to be installed.

Other than that, everything else is listed in the REQUIREMENTS file.

openwebamp's People

Contributors

justanr avatar

Stargazers

Bitfinity avatar roy cyril dosado avatar Ryan Morrissey avatar Chris Tabor avatar James Ho avatar Sergey Sudakovich avatar dokenzy avatar Gustavo Lacoste avatar Bogdan BUNECI avatar Mathew Gacy avatar Sergey Konyukhovskiy avatar Scott Werner avatar Sandeep Shantharam avatar Clément Renaud avatar Dave DiGiovanni avatar

Watchers

James Cloos avatar  avatar Elias avatar theuncoaffair avatar

Forkers

bbuneci

openwebamp's Issues

Stream id will fail on collision.

While this is intended behavior, there needs to be a better way of generating streaming IDs than by hashing a combination of fields.

Proposed: using GUID/UUID.

Models lumped together.

The app.models module is just a giant file instead of having the models partitioned into separate modules and imported into a common namespace.

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.