Metadata-Version: 2.4
Name: erpl-pyrfc
Version: 2026.8.29
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries
Summary: PyRFC-compatible SAP RFC client in pure Rust — no SAP NW RFC SDK, no ICU
Keywords: sap,rfc,abap,pyrfc
Author: DataZoo GmbH
License: BUSL-1.1
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/DataZooDE/erpl-proto
Project-URL: Issues, https://github.com/DataZooDE/erpl-proto/issues

# erpl-pyrfc

A drop-in replacement for SAP's archived [PyRFC](https://github.com/SAP-archive/PyRFC),
built on `erpl-proto` — a pure-Rust implementation of the RFC protocol.

```
pip uninstall pyrfc
pip install erpl-pyrfc
```

Your code does not change:

```python
from pyrfc import Connection

with Connection(ashost="sap.example.com", sysnr="00", client="001",
                user="RFCUSER", passwd="...", lang="EN") as conn:
    print(conn.call("STFC_CONNECTION", REQUTEXT="hello")["ECHOTEXT"])
```

## Why

PyRFC is archived and frozen against one patch level of the **SAP NW RFC SDK** —
a licence-gated download of roughly 30 MB of C libraries and ICU that may not be
redistributed, which is why PyRFC never shipped Linux wheels.

`erpl-pyrfc` has no SDK dependency and no ICU. The wheel is self-contained: it
works in a bare container with nothing else installed and no environment
variables set.

## Version

**Calendar versioning**, `YYYY.M.D`, as the erpl projects use: a release tells
you when it was cut, which for a library tracking someone else's wire protocol
is the useful fact. A second release on one day takes a `.N` suffix.

## Two namespaces, one package

`import pyrfc` is the compatibility surface. `import erpl_pyrfc` is the same
objects under a name that says which implementation is running. Both ship in the
same wheel.

Do not install SAP's `pyrfc` distribution alongside this one — both own the
`pyrfc/` directory, and pip cannot prevent the collision. Importing `pyrfc` will
tell you so, with the command that fixes it.

## What is and is not supported

See [MIGRATION.md](MIGRATION.md) — one page telling you whether your code will
run, including the deliberate non-goals and the handful of places behaviour
differs.

## Licence

**BUSL-1.1**, inherited from `erpl-proto`, and a change from PyRFC's Apache-2.0.
If you are embedding this package in a product you distribute, read
[`LICENSE`](../../LICENSE) and the Additional Use Grant before you ship: the
terms are not the ones PyRFC came with, and that difference is deliberate rather
than an oversight. For a package-specific grant, contact DataZoo.

## Development

```bash
uv venv .venv
VIRTUAL_ENV=$PWD/.venv uvx maturin develop --release

# Offline tests only:
.venv/bin/python -m pytest tests/

# Against a live system (skips cleanly without credentials):
SAP_USER=DEVELOPER SAP_PASSWD=... .venv/bin/python -m pytest tests/
```

Live tests read `SAP_ASHOST`, `SAP_SYSNR`, `SAP_CLIENT`, `SAP_LANG` and skip with
a `SKIP(live):` line when `SAP_USER`/`SAP_PASSWD` are unset, matching the
convention in the Rust crates.

Some data-type and server tests need ABAP fixtures on the system. They are
created by one script, deployed without Eclipse or SAP GUI — see
[`abap/README.md`](abap/README.md). Tests needing them skip cleanly when they are
absent.

