credere-sdk
Python SDK for the Credere credit simulation API.
Installation
pip install credere-sdk
Usage
Sync client
from credere import CredereClient
client = CredereClient(api_key="your-api-key", store_id=1)
# Leads
from credere import LeadCreateRequest
lead = client.leads.create(LeadCreateRequest(cpf_cnpj="12345678900", name="João Silva"))
lead = client.leads.get("12345678900")
leads = client.leads.list()
lead = client.leads.update("12345678900", LeadCreateRequest(name="João Atualizado"))
client.leads.delete("12345678900")
fields = client.leads.required_fields("12345678900")
# Simulations
from credere import SimulationCreateRequest, SimulationConditionRequest, SimulationVehicleRequest
sim = client.simulations.create(SimulationCreateRequest(
assets_value=5000000,
conditions=[SimulationConditionRequest(down_payment=1000000, financed_amount=4000000, installments=48)],
retrieve_lead={"cpf_cnpj": "12345678900"},
seller_cpf="98765432100",
vehicle=SimulationVehicleRequest(
asset_value=5000000,
licensing_uf="SP",
manufacture_year=2024,
model_year=2024,
vehicle_molicar_code="MOL123",
zero_km=True,
),
))
sim = client.simulations.get("simulation-uuid")
sims = client.simulations.list()
# Proposals
from credere import ProposalCreateRequest
proposal = client.proposals.create(ProposalCreateRequest(simulation_id="sim-uuid"))
proposal = client.proposals.get("proposal-uuid")
proposals = client.proposals.list()
activity = client.proposals.activity_log("proposal-uuid")
# Customers
from credere import CustomerCreateRequest
customer = client.customers.create(CustomerCreateRequest(cpf_cnpj="12345678900", name="João Silva"))
customer = client.customers.get(1)
customers = client.customers.list()
customer = client.customers.find(cpf_cnpj="12345678900")
# Stores
from credere import StoreCreateRequest
store = client.stores.create(StoreCreateRequest(name="Loja Centro", display_name="Centro", cnpj="12345678000100"))
stores = client.stores.list()
store = client.stores.activate(1)
store = client.stores.deactivate(1)
# Vehicle Models
models = client.vehicle_models.list()
model = client.vehicle_models.search(q="Civic")
prices = client.vehicle_models.prices()
# Stock
from credere import StockVehicleCreateRequest
vehicle = client.stock.create(StockVehicleCreateRequest(vehicle_model_id=1, store_id=1))
vehicles = client.stock.list()
vehicle = client.stock.update(1, StockVehicleCreateRequest(price_cents=5000000))
vehicle = client.stock.remove(1)
# Users
user = client.users.current()
users = client.users.proposals_filter_list()
# Utilities
domains = client.utilities.domains()
lead_domains = client.utilities.lead_domains()
banks = client.utilities.banks()
vehicle = client.utilities.vehicle_by_plate("ABC1D23")
vehicle = client.utilities.vehicle_by_chassis("9BWZZZ377VT004251")
# Bank Credentials
integrated_banks = client.bank_credentials.list(store_id=1)
client.bank_credentials.persist(store_id=1)
# Proposal Attempts
from credere import ProposalAttemptCreateRequest
attempt = client.proposal_attempts.create("proposal-uuid", ProposalAttemptCreateRequest())
attempts = client.proposal_attempts.list("proposal-uuid")
attempt = client.proposal_attempts.get("proposal-uuid", "attempt-uuid")
attempt = client.proposal_attempts.perform_action("proposal-uuid", "attempt-uuid", "approve")
# Plus Returns
from credere import PlusReturnRuleCreateRequest
rule = client.plus_returns.create(PlusReturnRuleCreateRequest())
rules = client.plus_returns.list()
rule = client.plus_returns.get(1)
rule = client.plus_returns.activate(1)
rule = client.plus_returns.deactivate(1)
client.plus_returns.delete(1)
client.close()
Async client
from credere import AsyncCredereClient
async with AsyncCredereClient(api_key="your-api-key", store_id=1) as client:
leads = await client.leads.list()
sims = await client.simulations.list()
proposals = await client.proposals.list()
customers = await client.customers.list()
stores = await client.stores.list()
models = await client.vehicle_models.list()
vehicles = await client.stock.list()
user = await client.users.current()
domains = await client.utilities.domains()
banks = await client.bank_credentials.list(store_id=1)
attempts = await client.proposal_attempts.list("proposal-uuid")
rules = await client.plus_returns.list()
Features
- Leads — create, update, delete, list, get, and required_fields
- Simulations — create, list, and get
- Proposals — create, list, get, update, delete, ownership, and activity log
- Customers — create, update, list, get, and find
- Stores — create, list, activate, and deactivate
- Users — current user and proposals filter list
- Vehicle Models — list, search, and prices
- Stock — create, list, update, and remove
- Utilities — domains, lead domains, banks, vehicle by plate/chassis
- Bank Credentials — persist and list integrated banks
- Proposal Attempts — create, list, get, update, and perform action
- Plus Returns — create, list, get, update, delete, activate, and deactivate
- Sync and async clients (built on httpx)
- Pydantic models for request/response validation
- Error mapping (401, 404, timeouts, connection errors)
- Per-request
store_idoverride
License
Apache 2.0
Metadata
Release files for credere-sdk 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| credere_sdk-0.3.0.tar.gz | 91.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| credere_sdk-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 120.2 kB
Release files / credere_sdk-0.3.0.tar.gz
| Download URL | credere_sdk-0.3.0.tar.gz |
|---|---|
| Size | 91.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6bc8739ad2cf9d81d3e5ecf4f04fda6fd48868b38aa9a5505ac8f9e71771a56
|
|
BLAKE2b-256 checksum How to use checksums |
dbf27af79844dc71823601ccc3ed6f69cf40b8deebe953e9abbce4263cec4e4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 22, 2026.
Transparency logRelease files / credere_sdk-0.3.0-py3-none-any.whl
| Download URL | credere_sdk-0.3.0-py3-none-any.whl |
|---|---|
| Size | 28.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a5796b04577454b83ee7db79dd07107c3022acd367e981a808e302f64818c42
|
|
BLAKE2b-256 checksum How to use checksums |
8e4a25d241ea28fe8ecfa25ccc27b7d7c708fc440efd06f5990680f87d7b6a4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 22, 2026.
Transparency log