Calculation of tax data in México
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.
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:
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.
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
Metadata
Release files for pyfiscal 2.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyfiscal-2.1.2.tar.gz | 13.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyfiscal-2.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.4 kB
Release files / pyfiscal-2.1.2.tar.gz
| Download URL | pyfiscal-2.1.2.tar.gz |
|---|---|
| Size | 13.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bcff75745294713257b067cbd11017e328212cb72d1bb5eb5d699e0217cc0dac
|
|
BLAKE2b-256 checksum How to use checksums |
20b8370f057c8df267fb1327cb3d67b76ae7d339f110b154b9db14bc71f1dcd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / pyfiscal-2.1.2-py3-none-any.whl
| Download URL | pyfiscal-2.1.2-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41d6e75563e56b49557235b72db8d205951e55429f6e066843d710a8be286c45
|
|
BLAKE2b-256 checksum How to use checksums |
71db1264f7f97f4829edd98b4061ac2a276e2c0b8625fda4be8fc5f320b7ff2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|