# OAuth Connect API Examples - Python and Chalice

**URL:** <https://developer.squareup.com/forums/t/oauth-connect-api-examples-python-and-chalice/11692>\
**Category:** Questions\
**Tags:** payments-api\
**Created:** [December 31, 2023, 1:31am UTC](https://developer.squareup.com/forums/t/oauth-connect-api-examples-python-and-chalice/11692 "2023-12-31T01:31:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheLeedz](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/theleedz/32/2680_2.png) [@TheLeedz](https://developer.squareup.com/forums/u/TheLeedz)\
**Post date:** [December 31, 2023, 1:31am UTC](https://developer.squareup.com/forums/t/oauth-connect-api-examples-python-and-chalice/11692/1 "2023-12-31T01:31:27Z")

</div>

Has anyone succeeded in getting the OAuth connect-api examples for python and/or python-chalice-aws running on AWS? The process is MUCH more complex than the sparse developer notes indicates – I think its a Python - Chalice - Docker - CDK → Lambda stack with a lot of configuration in between. Honestly, I am lost and would be happy to code the entire flow myself in Python if I could just link the Square libs to my Lambda code. Can anyone help?

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [December 31, 2023, 1:31am UTC](https://developer.squareup.com/forums/t/oauth-connect-api-examples-python-and-chalice/11692/2 "2023-12-31T01:31:46Z")

</div>

👋 I’m Square Dev AI, here to help answer your question!  
Based on the information you’ve provided, the following documentation will help answer your question:

> **[Square Python SDK Quickstart](https://developer.squareup.com/docs/sdks/python/quick-start)**
>
> Learn how to quickly set up and test the Square Python SDK.

> **[Python SDK](https://developer.squareup.com/docs/sdks/python)**
>
> Use the Square Python library to build with Square APIs in a language-idiomatic way that reduces complexity without sacrificing API functionality.

> **Additional Documentation**
>
> [Using the Square Python SDK](https://developer.squareup.com/docs/sdks/python/using-python-sdk)  
> [OAuth Walkthrough: Test Authorization with Web Server](https://developer.squareup.com/docs/oauth-api/build-with-oauth)  
> [Configure the Order-Ahead Sample Application](https://developer.squareup.com/docs/orders-api/quick-start/step-2)

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.  
Otherwise one of our Developer Advocates will provide additional assistance shortly.

---

<div class="post-metadata">

**Author:** ![TheLeedz](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/theleedz/32/2680_2.png) [@TheLeedz](https://developer.squareup.com/forums/u/TheLeedz)\
**Post date:** [December 31, 2023, 6:06am UTC](https://developer.squareup.com/forums/t/oauth-connect-api-examples-python-and-chalice/11692/3 "2023-12-31T06:06:12Z")

</div>

I am developing a web app on AWS and I was hoping that intergrating Square into my Lambdas would be easy but I am struggling. I am a longtime Square user as a vendor – I want to use Square in this new software venture – I am willing to pay for help and would be happy to integrate a 3rd party solution. Getting the sample code to work was torture.

square-python-sdk#quickstart  
and  
square-python-sdk#tests

DO NOT run out of the box – you must manually edit the Python 3.8 libs or they both throw errors.

\Python38\Lib\site-packages\square\http\requests\_client.py  
\Python38\Lib\site-packages\apimatic\_requests\_client\_adapter\requests\_client.py

> > To fix, remove allowed\_methods=retry\_methods from http\_client initializations

But even when I finally got them to work - I realized I don’t need them. I need the kind of solution found in  
connect-examples/oauth/python-aws-chalice

To sign up a seller I need to implement:

/api/authorize

/api/authorize-callback

/api/revokeOAuthToken/{merchant\_id}

/api/checkAccessTokenStatus/{merchant\_id}

and for the buyer I need:

checkout-api/create-payment-link

Chalice and Flask and Square itself all have to be imported into my lambdas. I cannot even get a successful Docker deployment to AWS. I am in configuration hell. Docker is inscrutable. It’s a big disappointment in 2023 that this is so arcane.

Are there any resources for developers like me? Are there any software packages that provide the glue? Can you help me?
