Skip to main content

Reads and store user data to validate Sibyl Score

Project description

# SDK Dominator
Based on `Dominator` gun from `Psycho-Pass`, it reads and analyzes user data to determine the risk of user on financial systems.

### Helper methods
If you want, you can send `User` model to `Dominator` and it will call few methods that you can use.

Sample:

```python
from dominator import Dominator
from core.models import User

Dominator().validate_tax_id("...", user=User)
```

If `Tax ID` is invalid, `Dominator` will try call `dominator_lock_account()` method inside the given model. So you just need create a method to execute anything you may need do if account need be locked.

If `Tax ID` is valid, `Dominator` will call for `dominator_is_valid_tax_id` sending the `SERPRO` answer as parameter.

Sample `CPF` answer parameter:

```
{
"tax_id": "077.703.749-10",
"name": "RAPHAEL FILIPE SCHUBERT",
"birthday": pendulum.date(year=1992, month=2, day=10),
"raw": {
"ni": "07770374910",
"nome": "RAPHAEL FILIPE SCHUBERT",
"nascimento": "10021992",
"situacao": {
"codigo": "0", "descricao": "Regular"
}
}
}
```

It will be sended as `serpro` parameter, so you will need an method like:
`def dominator_is_valid_tax_id(self, *args, **kwargs)` than you will be able to access it as `serpro['tax_id']` or any data inside it.

You can provide an `cpf_django_model` on `validate_tax_id` method that will try find and store SERPRO CPF on database.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sdk-dominator, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size sdk-dominator-0.0.6.tar.gz (38.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page