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.

Source Distribution

sdk-dominator-0.0.6.tar.gz (38.9 kB view details)

Uploaded Source

File details

Details for the file sdk-dominator-0.0.6.tar.gz.

File metadata

  • Download URL: sdk-dominator-0.0.6.tar.gz
  • Upload date:
  • Size: 38.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for sdk-dominator-0.0.6.tar.gz
Algorithm Hash digest
SHA256 8a66470b24ecc4545c21e616abaf6b2723d7f127cefa1d0b654cd98da65d91e9
MD5 16f0df17242af0a1bc29509e725dae21
BLAKE2b-256 eb81549d2f301b8b4d03363a8c485189bb492b3cb87db8d86dd933e1c2be9ebe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page