Library created to generate structured data from tangelo
Project description
This package allows you to generate structured data ## Usage
Import the GenerateDataStructure class from the package: You can create an instance of GenerateDataStructure and pass in the necessary data as follows:
from tangelokit import GenerateDataStructure
result = GenerateDataStructure(
credit_line={
"uid": "1",
"created_at": "2023-08-30",
"balance": 23,
"todayToPay": {
"value": 497819.23,
"total": 582662.65,
"date": "2023-08-30",
"last_quota": 448773.98
}
},
credit_request={
"code": "22",
"approve_amount": 2
},
contact={
"cc": "22"
},
disbursements=[
{
"uid": "23232",
"uuid": "32323432",
"start_date": "2020-02-02",
"created_at": "2020-01-02",
"principal": 23232,
"days_late": 222,
"status": "disbursed",
"quotas": [],
"resumen": {
"last_quota": 2323,
"total": 784,
"value": 4565
}
},
{
"uid": "23232",
"uuid": "32323432",
"start_date": "2020-02-02",
"created_at": "2020-01-02",
"principal": 23232,
"days_late": 222,
"status": "disbursed",
"quotas": [],
"resumen": {
"last_quota": 2323,
"total": 784,
"value": 4565
}
}
],
product={
"uuid": "22",
"period": {
"type": "month",
"holidays": "holidays"
}
}
)
Before getting result, you have to validate erros in data structure making:
result.errors
Validate if there are errors, if there are no errors the response is []
[
{
"credit_line_schema":[
"'created_at' is a required property"
]
},
{
"disbursement_schema":[
"'start_date' is a required property",
"'created_at' is a required property"
]
}
]
GET RESPONSE:
result.response
{
"total": 1568,
"value": 9130,
"moratorium_amount": 4646,
"quotas_in_arrears": 0,
"days_late": 222,
"product_uuid": "22",
"product_name": "",
"disbursements": [
{
"uid": "23232",
"uuid": "32323432",
"start_date": "2020-02-02",
"created_at": "2020-01-02",
"principal": 23232,
"days_late": 222,
"status": "",
"quotas": [],
"resumen": {
"last_quota": 2323,
"total": 784,
"value": 4565
},
"quotas_in_arrears": 0,
"expiration_date": "N/A",
"payment_date": "2023-08-30",
"moratorium_amount": 2323,
"periods": {
"periodicity": "month"
},
"todayToPay": {
"value": 497819.23,
"total": 582662.65,
"date": "2023-08-30",
"last_quota": 448773.98
}
},
{
"uid": "23232",
"uuid": "32323432",
"start_date": "2020-02-02",
"created_at": "2020-01-02",
"principal": 23232,
"days_late": 222,
"status": "",
"quotas": [],
"resumen": {
"last_quota": 2323,
"total": 784,
"value": 4565
},
"quotas_in_arrears": 0,
"expiration_date": "N/A",
"payment_date": "2023-08-30",
"moratorium_amount": 2323,
"periods": {
"periodicity": "month"
},
"todayToPay": {
"value": 497819.23,
"total": 582662.65,
"date": "2023-08-30",
"last_quota": 448773.98
}
}
],
"periods": {
"periodicity": "month"
},
"payment_date": "2023-08-30",
"created_at": "2023-08-30",
"amount_disbursed": 23,
"total_disbursement": 46464.0,
"credit_request": {
"code": "22",
"approve_amount": 2,
"contact": {
"cc": "22"
}
}
}
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tangelokit-0.0.5.tar.gz.
File metadata
- Download URL: tangelokit-0.0.5.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/44.1.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d4f4b41f5d1c1f6d25b7dc0b4a1cab25dbb17916ae3861e7861f8468eb20fa8
|
|
| MD5 |
6426c2915700ccdf966c01d1c3861b37
|
|
| BLAKE2b-256 |
88a2269ec525d27f78177621f949cbb431fb102896c9fadd9824e2e19ba8a35e
|
File details
Details for the file tangelokit-0.0.5-py3-none-any.whl.
File metadata
- Download URL: tangelokit-0.0.5-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/44.1.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f5f1164d224c14e3b334a21951132c1fb029f7918ab585be48732e27c4dae60
|
|
| MD5 |
6c73e3d2146930b5c1927e7ea9927721
|
|
| BLAKE2b-256 |
428b64e05d6d42ca7247a27a1b39b7c1b855745f82d8a22cf49247041de727ab
|