Metadata-Version: 2.5
Name: amazon-orders-de
Version: 1.0.0
Summary: An amazon-orders language package for amazon.de, which parses its pages in English
Project-URL: Source, https://github.com/udondan/amazon-orders-de
Author: Daniel Schroeder
License-Expression: MIT
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: amazon-orders<5,>=4.8.1
Description-Content-Type: text/markdown

# amazon-orders-de

A [language package](https://amazon-orders.readthedocs.io/language-packages.html) for
[amazon-orders](https://github.com/alexdlaird/amazon-orders) that adds support for amazon.de.

Rather than translating `amazon-orders` into German, it asks amazon.de for its pages in English and handles what's
different there:

- British English labels ("Postage & Packing", "Estimated VAT")
- Orders whose service was cancelled
- Recipient addresses rendered as a plain list
- The payment method of an Order paid with a Gift Card and a card
- The Transactions page, which embeds its first page as JSON and loads further pages from an API

## Installation

```sh
pip install amazon-orders-de
```

## Usage

Set `language_package` and `domain` in the `amazon-orders` config (`~/.config/amazonorders/config.yml`):

```yaml
language_package: amazon_orders_de
domain: amazon.de
```

or pass them in Python:

```python
from amazonorders.conf import AmazonOrdersConfig
from amazonorders.orders import AmazonOrders
from amazonorders.session import AmazonSession

config = AmazonOrdersConfig(data={"language_package": "amazon_orders_de", "domain": "amazon.de"})
amazon_session = AmazonSession(config=config)
amazon_session.login()

orders = AmazonOrders(amazon_session).get_order_history(year=2026)
```

Everything else works as described in the [amazon-orders docs](https://amazon-orders.readthedocs.io).

## Development

With [mise](https://mise.jdx.dev/), which installs Python and uv:

```sh
mise run install    # uv sync
mise run lint       # ruff and mypy; `mise run lint-fix` fixes what it can
mise run test
```

Commits follow [Conventional Commits](https://www.conventionalcommits.org/), from which release-please creates the
releases and the changelog.

The unit tests parse real amazon.de pages in `tests/resources`. Before a page is added there, it's anonymized with
`scripts/anonymize-test-resources.py`, which removes personal and product details. The raw pages and the rules file
with the values to replace must never be committed.

The integration tests in `tests/integration` log in to amazon.de with `AMAZON_USERNAME`, `AMAZON_PASSWORD`, and
`AMAZON_OTP_SECRET_KEY`, and run weekly in CI.
