<div dir="ltr">Thanks Adam!<div><br></div><div>-Mark</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 17, 2016 at 8:56 AM, Adam Forsyth <span dir="ltr"><<a href="mailto:adam@adamforsyth.net" target="_blank">adam@adamforsyth.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Yep, it's safe.<br><br>You even can switch environments / configs etc. by instantiating a configuration object and gateway, and then using that instead of the static methods. I know Ray (another ChiPy member who works at Braintree) has example code for that, and I'll make sure he sends it out on Monday if he doesn't see this thread by then -- even though it sounds like you don't need it.<br><br></div>Adam<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Sun, Jul 17, 2016 at 8:47 AM, Mark Graves <span dir="ltr"><<a href="mailto:mgraves87@gmail.com" target="_blank">mgraves87@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hey everyone,<div><br></div><div>Does anyone know if it is safe to put Braintree python client code into a module from a thread safety perspective for a web app?  Or any other caveats?</div><div><br></div><div>I'm not switching environments or anything mid request, just trying to clean up some code.</div><div><br></div><div>I'm trying to refactor a web app which has some boilerplate code in the models and controllers, and I wanted to move this into a module.</div><div><br></div><div>I wasn't sure if it does some internal session handling etc, which might conflict if imported, but would not if run per request.</div><div><br></div><div>I've looked through the source on <a href="https://github.com/braintree/braintree_python" target="_blank">https://github.com/braintree/braintree_python</a></div><div><br></div><div>which looks like most of the calls I make are static methods, but I was looking for any gotchas.</div><div><br></div><div>Thanks!</div><span><font color="#888888"><div><br></div><div>-Mark</div></font></span></div>
<br></div></div>_______________________________________________<br>
Chicago mailing list<br>
<a href="mailto:Chicago@python.org" target="_blank">Chicago@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/chicago" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/chicago</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Chicago mailing list<br>
<a href="mailto:Chicago@python.org">Chicago@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/chicago" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/chicago</a><br>
<br></blockquote></div><br></div>