cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.4 API Python

SOLVED

Magento 2.4 API Python

Maybe someone has an example of how to connect to the Magento 2.4 API via Python?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Magento 2.4 API Python

Nevermind.. this is the solutiom I was looking for:

from requests_oauthlib import OAuth1Session

client_key    = ''
client_secret = ''
access_token  = ''
access_secret = ''

base_url      = ''

magento = OAuth1Session(client_key,
                        client_secret = client_secret,
                        resource_owner_key = access_token,
                        resource_owner_secret = access_secret)

View solution in original post

3 REPLIES 3

Re: Magento 2.4 API Python

Nevermind.. this is the solutiom I was looking for:

from requests_oauthlib import OAuth1Session

client_key    = ''
client_secret = ''
access_token  = ''
access_secret = ''

base_url      = ''

magento = OAuth1Session(client_key,
                        client_secret = client_secret,
                        resource_owner_key = access_token,
                        resource_owner_secret = access_secret)

Re: Magento 2.4 API Python

Hello @evaldasbar9c8d 

 

you need to install the Magento library using the below command 

pip install python-magento==0.1.0

 

for more please visit Python Magento library Doc

 

Thanks & Regards

Re: Magento 2.4 API Python

Now a Python developer can also freelance separate from their typical jobs!


The explanation why a Python developer who is employed in a classic 9 to 5 job, is very hesitant to take up freelancing projects, is due to the fact that most Python web development firms don't allow their employees to take up freelance jobs.  Eiliana rendered this problem futile by coming up with the solution to it by allowing freelancers to stay anonymous on their platforms. Thus, making it a win-win situation for both the employer and employee.