Metadata-Version: 2.5
Name: romanian-cnp-validator
Version: 1.0.0
Summary: Validate, parse and generate Romanian personal numeric codes (CNP). Zero dependencies, typed, rules backed by official sources.
Project-URL: Homepage, https://github.com/andyhatestheworld/romanian-cnp-validator
Project-URL: Documentation, https://github.com/andyhatestheworld/romanian-cnp-validator#readme
Project-URL: Issues, https://github.com/andyhatestheworld/romanian-cnp-validator/issues
Author: Andrei-Florin Opriș
License-Expression: MIT
License-File: LICENSE
Keywords: cnp,cod numeric personal,generator,mock data,national id,parser,romania,romanian,validator
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.11
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Description-Content-Type: text/markdown

# romanian-cnp-validator

Validate, parse and generate Romanian personal numeric codes (CNP). Zero dependencies, fully typed, Python 3.11+.

```bash
pip install romanian-cnp-validator
```

```python
from romanian_cnp_validator import is_valid, validate, parse, generate

is_valid("1900101120013")                  # True
validate("9900101120011").error            # CnpError.NIF_NOT_CNP
parse("1900101120013").county.name         # 'Cluj'
generate(sex="female", min_age=18, max_age=30)
```

The full documentation lives in the [main README](https://github.com/andyhatestheworld/romanian-cnp-validator#readme). It covers how a CNP is built, the control-digit algorithm, edge cases (foreign residents, code 70, NIF numbers) and the official sources behind every rule.

MIT License, Copyright (c) 2026 Andrei-Florin Opriș
