mattdodge / yahoofantasy

A Python SDK for the Yahoo! Fantasy Sports API
67 stars 19 forks source link

OAuth2 and Container #62

Open umumpaul opened 1 year ago

umumpaul commented 1 year ago

Have you ever run this package in a container setup? I guess because of python official image, or lightweight linux like alphin, does not come with a browser. Another reason I can think of is the callback (localhost:8000) is not working, albeit I open the port during start. Any tips is welcome.

mattdodge commented 1 year ago

You should not need a browser to run this library, it should work fine in a container. The yahoofantasy login CLI command will output the URL you will need to go to on your actual machine, you just need to make sure you open the port to the container.

umumpaul commented 1 year ago

using flag --network=host when docker run?

umumpaul commented 1 year ago

in cli/login.py there's using webbrowser.open_new_tab and I think it's why it's not working in docker (running python image)

mattdodge commented 1 year ago

That shouldn't be required to use the library, you may need to log in manually or a different way if it's giving you trouble though. Do you have any kind of stack trace/error log/code snippet I could look at? It's difficult to help without something to reference