prestashop orders client
1.0.0
Prestashop Ordersクライアントは、注文データをシームレスに抽出するように設計されたPrestashop APIのシンプルで徹底的にテストされたクライアントです。当初、新鮮な有給の注文を郵便サービスに送信するなどのタスクの自動化のニーズを満たすために作成されたため、この使いやすいクライアントをコミュニティと共有することにしました。他の人にも役立つことを願っています!
> >> from prestashop_orders_client import PrestaShopOrderClient
> >> client = PrestaShopOrderClient ( shop_link = "myshop.com" , api_key = "my_api_key" )
> >> client . get_order ( 1 )
Order ( id = 1 , total_paid = 500.0 , reference = 'ABCD'
order_state = 'Shipped' , email = '[email protected]' ,
first_name = 'John' , last_name = 'Doe' ,
company_name = None , phone = '+12345678' ,
address = 'Example address' ,
city = 'Example city' , post_code = '123456' ,
country = 'Example country' , state = None )
> >> client . get_all_orders ()
[
Order ( id = 1 , total_paid = 500.0 , reference = 'ABCD'
order_state = 'Shipped' , email = '[email protected]' ,
first_name = 'John' , last_name = 'Doe' ,
company_name = None , phone = '+12345678' ,
address = 'Example address' ,
city = 'Example city' , post_code = '123456' ,
country = 'Example country' , state = None ),
Order ( id = 2 , total_paid = 1000.0 , reference = 'ABCD'
order_state = 'Shipped' , email = '[email protected]' ,
first_name = 'John' , last_name = 'Doe' ,
company_name = None , phone = '+12345678' ,
address = 'Example address' ,
city = 'Example city' , post_code = '123456' ,
country = 'Example country' , state = None ),
....
]
>> > client . orders_amount
8Prestashop APIが必要とするため、サーバーにSSL証明書がインストールされていることを確認し、クライアントはリクエストを実行するために「HTTPS」を使用します。
クライアントはPypiで利用可能で、Python 3.10+が必要です
$ python -m pip install prestashop_orders_client このプロジェクトは、Apache 2.0ライセンスの下でライセンスされています。