ngrok / ngrok-python

Embed ngrok secure ingress into your Python apps with a single line of code.
https://ngrok.com
Apache License 2.0
115 stars 23 forks source link

Move to new forwarding api's #50

Closed bobzilladev closed 1 year ago

bobzilladev commented 1 year ago

Recommend ignoring whitespace when reading diff: https://github.com/ngrok/ngrok-python/pull/50/files?w=1

bobzilladev commented 1 year ago

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

bobzilladev commented 1 year ago

Forwarding by URL LGTM. I didn't see a listen and serve option anywhere though, did I just miss it?

It's there as listen_and_forward, what it got named in rust land: https://github.com/ngrok/ngrok-python/pull/50/files#diff-0c4ecf9cc614969fb946d2d78c1d3a886bb16ebbe437f80097eca8e194424737R73

CarlAmko commented 1 year ago

Forwarding by URL LGTM. I didn't see a listen and serve option anywhere though, did I just miss it?

It's there as listen_and_forward, what it got named in rust land: https://github.com/ngrok/ngrok-python/pull/50/files#diff-0c4ecf9cc614969fb946d2d78c1d3a886bb16ebbe437f80097eca8e194424737R73

Yeah, I was referring to the idea that you could pass in a locally-defined http.server.HTTPServer instead of a URL for in-app servers.

Though after talking to Josh, it's possible that this isn't necessary for Python. I don't know offhand how prevalent it is to pass around refs to http.server.HTTPServer, for example. I know there's approximately 3 billion web frameworks for Python, so it's entirely plausible that this isn't a use case worth addressing.

bobzilladev commented 1 year ago

Yeah, I was referring to the idea that you could pass in a locally-defined http.server.HTTPServer instead of a URL for in-app servers.

Ah, apologies, that one wasn't on my radar. Have pushed a commit to add it.

CarlAmko commented 1 year ago

Thanks for adding HTTP server support!