Skip to main content

Pyfiscal calculation of tax data.

Project description

Calculation of tax data in México

License: MIT Python 3.8+ Code style: black

Installation

Install pyfiscal.

pip install pyfiscal

CURP

The Clave Única de Registro de Población (CURP) is a unique 18 character alphanumeric identity code for both Mexican residents and citizens.

alt picture

RFC

The Federal Taxpayer Registry is a code used in Mexico to distinguish each individual or company required to pay taxes. The people or organizations that have their RFC are called contributors.

1.- Physical person:

alt picture

This homoclave will be designated by the SAT, reviewing the request through already designated official paper.

NSS

The Social Security Number (NSS) is unique, permanent and nontransferable and is assigned to keep a record of workers and insured.

alt picture

Validation:

  • Only 11 digits will be validated.
  • Validation by the Luhn algorithm.
  • Calculate the last digit.

Getting Started with Docker

If you want to install the dependencies and work using Docker, you can simply follow this steps.

Clone the project repository

git clone https://github.com/roottsantiago/pyfiscal.git
cd pyfiscal

Usage

There are several ways to use the project because there are those using docker-compose.yml and Dockerfile. Here's how to use it:

This is for the install part with docker-compose

# Build
docker-compose build
# Run
docker-compose up -d

Unit Tests

python -m unittest tests/data_fiscal_test.py
python -m unittest tests/validator_test.py

Testing with docker

docker exec pyfiscal python -m unittest tests/data_fiscal_test.py
docker exec pyfiscal python -m unittest tests/validator_test.py

License

See LICENSE for more details (The MIT License).

References

https://es.wikipedia.org/wiki/Algoritmo_de_Luhn

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

pyfiscal-2.1.2.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

pyfiscal-2.1.2-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file pyfiscal-2.1.2.tar.gz.

File metadata

  • Download URL: pyfiscal-2.1.2.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for pyfiscal-2.1.2.tar.gz
Algorithm Hash digest
SHA256 bcff75745294713257b067cbd11017e328212cb72d1bb5eb5d699e0217cc0dac
MD5 977bfb775046989f0864dea0336d2ff1
BLAKE2b-256 20b8370f057c8df267fb1327cb3d67b76ae7d339f110b154b9db14bc71f1dcd5

See more details on using hashes here.

File details

Details for the file pyfiscal-2.1.2-py3-none-any.whl.

File metadata

  • Download URL: pyfiscal-2.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for pyfiscal-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 41d6e75563e56b49557235b72db8d205951e55429f6e066843d710a8be286c45
MD5 4f64c6d68097f0d70c3794139deac135
BLAKE2b-256 71db1264f7f97f4829edd98b4061ac2a276e2c0b8625fda4be8fc5f320b7ff2a

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