simon-weber/Unofficial-Google-Music-API — Issue #4: Make gmapi API usable from any Python folder or package
Author: mystilleef
Created: 2012-03-02 23:47:49+00:00
State: open

Thanks for gmapi, it's awesome and I'm actually building an App around it.

So the issue is that gmapi is not currently usable from an Python folder or Package other than if it is installed in the default site-packages folder. This is a reasonable assumption but for people who are testing the API or just want to bundle the API in their packages or apps, this poses a problem.

The problem is solved by not using global imports in the source files, but using relative imports instead. For example instead of

from gmapi.session import WC_Session, MM_Session

this is preferable

from session import WC_Session, MM_Session

This way, I can use put the gmapi folder in any python package or folder that has __init__.py and use it without problems like I do in my project.

Thanks for gmapi and keep up the great work!