# SAP Integrations in Python

Connect to SAP S/4HANA, ECC and SuccessFactors from Python, reading and writing business data.

## Get started

Connect to S/4HANA and ECC through Gateway services - service roots, OData V2 and V4 paths, CSRF tokens and the sap-client parameter.

[SAP S/4HANA and ECC](https://zato.io/docs/dev/sap/s4hana/index.html)

service.py

```
# Read business partners from S/4HANA
conn = self.sap['SAP.Sample']
partners = conn.read('A_BusinessPartner',
    filter="CityName eq 'London'", top=20)

partners[0]['BusinessPartnerName']
'Acme Ltd'

len(partners)
20
```

## Connect to SAP systems

[SAP S/4HANA and ECC Gateway service roots, OData V2 and V4 paths, CSRF tokens and the service catalog.](https://zato.io/docs/dev/sap/s4hana/index.html) [SAP SuccessFactors API server addresses, OAuth2 authentication, the employee entity model and server-driven paging.](https://zato.io/docs/dev/sap/success-factors/index.html)

## Query and secure

[Querying SAP entities Server-side filtering, field selection, related entities and paging through large result sets.](https://zato.io/docs/dev/sap/query/index.html) [SAP security Basic Auth with technical users, Bearer tokens, OAuth2 client credentials and X-CSRF-Token handling.](https://zato.io/docs/dev/sap/security/index.html)

## Operate and test

[SAP connections in enmasse YAML definitions of SAP connections, environment variables for secrets and exporting existing connections.](https://zato.io/docs/dev/sap/enmasse/index.html) [Testing SAP integrations Mock SAP connections, configure entity results and test services without a real SAP system.](https://zato.io/docs/dev/sap/api-testing/index.html)
