-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor GAM to be "import"able #23
Comments
I too would like gam to be an importable package. Another idea instead of a gamlib package with a gam py2exe wrapper would be to just make "gam" the python package, and then use python entry points to declare a "gam" console script to be used much like the current gam executable. |
You can kind of hack it by making a small modification to gam.py and creating a custom setup.py script. At the bottom of gam.py, move all the command line parsing logic under a Then create another setup script. setup-package.py
Alternatively, you could specify the required packages (ie. httplib2, passlib, etc.) as dependencies using
Then just run the setup script.
|
Making GAM a library which the GAM cmd parser would use makes perfect sense to me. I had thought some time ago that if GAM was like this and would raise catchable exceptions then I could even drop my own Google API client. |
That would be great. Ideally you move the conversion of json to "human readable" as well! |
I also would find this incredibly useful. I end up wrapping some more complex gam runs in subprocess, and it would be so much nicer to keep it all in python. |
This would kick some serious ass |
Was considering writing tab-completion for GAM, but holding off in hope that this happens |
Importable module would be great. +1 |
This would be so nice. Please and thank you! |
This would be awesome. When writing automation scripts, I hate having to either a) run the bash command, or b) re-invent the wheel by figuring out the API by hand. +1 from me. |
Distributed through PyPI please! :-) |
Would really like to see this happen. Thanks! |
+1; I am currently using |
Has there been any progress with this? Would love to be able to import this too. |
Is this still a thing? |
Helloo Thanks |
I'd like to use some of the GAM logic in separate scripts. GAM already does a lot of the hard work to set up API objects and the like.
I'd like to refactor the code to start making it reusable in new scripts.
My first step would be to pull out the object initialization into a new file, such as gamlib.py, which would be used by gam.py. Everything that ends up in gamlib.py would be something that is built to be reused - all OO, no globals, etc.
Would you like to discuss this and tell me what requirements you'd have for it to be something you're willing to merge in?
The text was updated successfully, but these errors were encountered: