Metadata-Version: 2.4
Name: cpf_playground
Version: 0.0.1
Summary: A Brazilian CPF manipulator package
Home-page: https://github.com/bernard-rodrigues/cpf_playground/
Author: bernard_clint
Author-email: bclintwood@gmail.com
Requires-Python: >=3.5
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-python
Dynamic: summary

# cpf_playground

## Description

The package cpf_playground is used to:
    - Generate CPFs (randomly or from staring first 9 digits)
    - Formatting, adding or removing "-" and "." characters
    - Validates formatted or raw CPF numbers

## installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install cpf_playground

```bash
pip install cpf_playground
```

## Usage

### Validating a raw CPF number
```python
    from cpf_playground.validation import validate_cpf

    cpf = "12345678909"
    validate_cpf(cpf) # True or false, according to the number
```

### Validating a formatted CPF number
```python
    from cpf_playground.validation import validate_cpf
    
    cpf = "123.456.789-09"
    validate_cpf(cpf) # True or false, according to the number
```

### Creating a new random and valid CPF number
```python
    from cpf_playground.generation import create_cpf

    cpf = create_cpf() # returns a valid CPF number
```

### Creating a valid CPF number from 9 initial digits
```python
    from cpf_playground.generation import create_from_9_digits

    first_9_digits = "123456789"
    cpf = create_from_9_digits(first_9_digits) # returns a valid CPF number
```

### Formatting a raw CPF number into a string with "-" and "." characters
```python
    from cpf_playground.formatting import fromat_cpf_from_raw

    raw_cpf = "12345678909"
    cpf = fromat_cpf_from_raw(raw_cpf) # Returns a formatted CPF, like 123.456.789-09
```

### Formatting a raw CPF number into a string with "-" and "." characters
```python
    from cpf_playground.formatting import fromat_cpf_to_raw

    cpf = "123.456.789-09"
    raw_cpf = fromat_cpf_to_raw(cpf) # Returns a raw CPF, like 12345678909
```

## Author

bernard_clint
