Skip to content

PurplShip 'Proxy'

The proxy serve as the gateway responsible for forwarding requests to the right logistic providers service endpoint. A proxy is therefore specific to a provider

Instantiating a proxy

from purplship.mappers.fedex import FedexProxy, FedexClient

fedex_proxy = FedexProxy(
    FedexClient(
        user_key="username",
        password="password",
        meter_number="1324913439840",
        account_number="103948734",
    )
)
import purplship

fedex_gateway = purplship.gateway["fedex"].create(
    {
        "user_key": "username",
        "password": "password",
        "meter_number": "1324913439840",
        "account_number": "103948734",
    }
)

Proxy vs Gateway

the carrier_gateway is exactly the same as a carrier_gateway they are interchangeable. the gateway is used in the context of the fluent API whereas the proxy is used in the context of a native purplship implementation.

Find more about the Proxy interface API