Skip to main content

br-regras-fiscais

A lib to calculate taxes on Brasil for NFe, and also get total NFe value from a payment.

It takes in account if Imposto de Renda is less than R$ 10,00, and same for CRF (PIS, COFINS,CSLL)

Installation

br-regras-fiscais can be installed via pypi.

pip install br-regras-fiscais

Usage

original_nota_value

Using the paid valued from a Transaction it returns the original total value of a NF

>>> from br_regras_fiscais.taxes_calc import original_nota_value
>>> original_nota_value(1000)
Decimal('1065.53')

tax_dict

Returns a Data Class with the taxes values:

@dataclass
class TaxesValues:
    cofins: Decimal
    csll: Decimal
    ir: Decimal
    pis: Decimal

    @property
    def sum_crf(self) -> Decimal:
        return self.pis + self.csll + self.cofins
>>> from br_regras_fiscais.taxes_calc import tax_dict
>>> tax_dict(1000)
TaxesValues(cofins=Decimal('30.00'), csll=Decimal('10.00'), ir=Decimal('15.00'), pis=Decimal('6.50'))

Metadata

Release files for br-regras-fiscais 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for br-regras-fiscais 0.2.0
File Size Uploaded
br_regras_fiscais-0.2.0.tar.gz 2.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for br-regras-fiscais 0.2.0
File Interpreter ABI Platform
br_regras_fiscais-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.7 kB

Release files / br_regras_fiscais-0.2.0.tar.gz

Download URL br_regras_fiscais-0.2.0.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f537fb2b2f6ae16b730601e19f801a7cac61a963b78aa0bc0603e24dbdc22423
BLAKE2b-256 checksum
How to use checksums
937b1aa023b075a80e8a8b83020b8ab8652a612f06d930ab6f39748354a1c041
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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 Jan 24, 2025.

Transparency log

Release files / br_regras_fiscais-0.2.0-py3-none-any.whl

Download URL br_regras_fiscais-0.2.0-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
acb082ad277be128425e141debb9bd9ee7830a473f78dd5928e56a7338e529fa
BLAKE2b-256 checksum
How to use checksums
3fc5645077dafdcc3c414bef329fda75141b9b2a824d97938acd425d3d813446
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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 Jan 24, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page