Metadata-Version: 2.4
Name: cedula-do-validator
Version: 0.1.2
Summary: Librería para la validación de cédulas de la República Dominicana
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"


# cedula_do

A package for Dominican republic's cedula validation with the luhn algorithm.

## Installation

Install the package

```bash
  pip install cedula-do-validator
```
    
## Running Tests
To run tests, make sure you have `pytest` installed on your
envrionment and run the following command:

```bash
  pytest
```

## Usage

Here is a quick example of how to validate a Dominican identity card in your project:

```python
from cedula_do_validator import is_valid_cedula

test_cedula = "402-1256338-0"

if is_valid_cedula(test_cedula):
  print("valid cedula")

else:
  print("Invalid cedula")
```

Also can use the cedula value object:

```python
from cedula_do_validator import Cedula

test_cedula = "402-1256338-0"

try:
  user_cedula = Cedula(test_cedula)

except ValueError:
  print("Invalid cedula")

else:
  print(user_cedula)# format: XXXXXXXXXXX
  print(user_cedula.hyphenize)# format: XXX-XXXXXXX-X
```


## Authors

- [DevEriJMT](https://www.github.com/DevEriJMT)

