Metadata-Version: 2.4
Name: nexterp-declarations
Version: 0.2.0
Summary: Romanian ANAF declarations: Pydantic input schemas + thin client for the NextERP generation service (proprietary)
Author-email: NextERP Romania <contact@nexterp.ro>
License: Proprietary
Project-URL: Homepage, https://www.nexterp.ro
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial :: Accounting
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: pydantic>=2.5
Provides-Extra: server
Requires-Dist: lxml>=5.0; extra == "server"
Requires-Dist: cryptography>=42; extra == "server"
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: ruff; extra == "dev"

# nexterp-declarations

Proprietary **thin client** for Romanian ANAF declarations. It ships
[Pydantic v2](https://docs.pydantic.dev) input schemas + a small HTTP client;
the actual XML generation and validation run **server-side** on the NextERP
duk service. The mapping logic is never distributed.

Used by the NextERP Romanian localization for Odoo.

> ⚠️ **A valid license is required.** Generation is authorised by a signed
> license token (issued by NextERP Romania, <https://www.nexterp.ro>, and
> verified server-side). Installing this package does not grant the right to
> produce ANAF declarations.

## Usage

```python
import nexterp_declarations as nd
from nexterp_declarations.d300 import D300Input, D300Header
from nexterp_declarations.base import CompanyV2, MovesData

nd.configure_license(token, "https://duk.nexterp.ro")   # token from /check_license
inp = D300Input(header=..., company=..., period=..., data=...)
xml = nd.remote_generate("D300", inp)   # POSTs to duk; returns validated XML bytes
```

Supported: D100/D710, D101, D120, D300, D390, D394, D406, Intrastat — version
is selected server-side from the reporting period.

## Install

```bash
pip install nexterp-declarations
```

Pure-python wheel (`py3-none-any`); only dependency is `pydantic`. Safe to be
public — it ships no generation logic, just schemas + the HTTP client (the
mapping runs server-side, gated by your license).

## License

Proprietary — © NextERP Romania. Generation requires a separate, runtime-
verified license. See <https://www.nexterp.ro>.
