pyfiscal


Namepyfiscal JSON
Version 2.1.2 PyPI version JSON
download
home_pagehttps://github.com/roottsantiago/pyfiscal
SummaryPyfiscal calculation of tax data.
upload_time2024-03-25 16:49:07
maintainerNone
docs_urlNone
authorTomás Santiago
requires_python>=3.9
licenseMIT
keywords rfc curp nss fiscal tax sat
VCS
bugtrack_url
requirements black coverage pre-commit pytest
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Calculation of tax data in México

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/sutsantiago/pyfiscal/blob/master/LICENSE.txt)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/release/python-380/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

## Installation

Install pyfiscal.
```python
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](https://github.com/roottsantiago/pyfiscal/blob/master/img/CURP.jpg)


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](https://github.com/roottsantiago/pyfiscal/blob/master/img/RFC.jpg)

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](https://github.com/roottsantiago/pyfiscal/blob/master/img/NSS.png)

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
```bash
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
```compose
# Build
docker-compose build
# Run
docker-compose up -d
````

## Unit Tests
```python
python -m unittest tests/data_fiscal_test.py
python -m unittest tests/validator_test.py
```
> Testing with docker
```python
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



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/roottsantiago/pyfiscal",
    "name": "pyfiscal",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "RFC, CURP, NSS, fiscal, tax, SAT",
    "author": "Tom\u00e1s Santiago",
    "author_email": "thom.sgonzalez@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/20/b8/370f057c8df267fb1327cb3d67b76ae7d339f110b154b9db14bc71f1dcd5/pyfiscal-2.1.2.tar.gz",
    "platform": null,
    "description": "# Calculation of tax data in M\u00e9xico\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/sutsantiago/pyfiscal/blob/master/LICENSE.txt)\n[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/release/python-380/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n## Installation\n\nInstall pyfiscal.\n```python\npip install pyfiscal\n```\n\nCURP\n----\nThe Clave \u00danica de Registro de Poblaci\u00f3n (CURP) is a unique 18 character alphanumeric identity code for both Mexican residents and citizens.\n\n![alt picture](https://github.com/roottsantiago/pyfiscal/blob/master/img/CURP.jpg)\n\n\nRFC\n---\nThe 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.\n\n1.- Physical person:\n\n![alt picture](https://github.com/roottsantiago/pyfiscal/blob/master/img/RFC.jpg)\n\nThis homoclave will be designated by the SAT, reviewing the request through already designated official paper.\n\n\nNSS\n---\nThe Social Security Number (NSS) is unique, permanent and nontransferable and is assigned to keep a record of workers and insured.\n\n![alt picture](https://github.com/roottsantiago/pyfiscal/blob/master/img/NSS.png)\n\nValidation:\n* Only 11 digits will be validated.\n* Validation by the Luhn algorithm.\n* Calculate the last digit.\n\n\n## Getting Started with Docker\nIf you want to install the dependencies and work using Docker, you can simply follow this steps. \n\nClone the project repository\n```bash\ngit clone https://github.com/roottsantiago/pyfiscal.git\ncd pyfiscal\n```\n\n### Usage\nThere are several ways to use the project because there are those using `docker-compose.yml` and `Dockerfile`. Here's how to use it:\n\n> This is for the install part with docker-compose\n```compose\n# Build\ndocker-compose build\n# Run\ndocker-compose up -d\n````\n\n## Unit Tests\n```python\npython -m unittest tests/data_fiscal_test.py\npython -m unittest tests/validator_test.py\n```\n> Testing with docker\n```python\ndocker exec pyfiscal python -m unittest tests/data_fiscal_test.py\ndocker exec pyfiscal python -m unittest tests/validator_test.py\n```\n## License\n\nSee LICENSE for more details (The MIT License).\n\n\n## References\n\nhttps://es.wikipedia.org/wiki/Algoritmo_de_Luhn\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pyfiscal calculation of tax data.",
    "version": "2.1.2",
    "project_urls": {
        "Homepage": "https://github.com/roottsantiago/pyfiscal"
    },
    "split_keywords": [
        "rfc",
        " curp",
        " nss",
        " fiscal",
        " tax",
        " sat"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71db1264f7f97f4829edd98b4061ac2a276e2c0b8625fda4be8fc5f320b7ff2a",
                "md5": "4f64c6d68097f0d70c3794139deac135",
                "sha256": "41d6e75563e56b49557235b72db8d205951e55429f6e066843d710a8be286c45"
            },
            "downloads": -1,
            "filename": "pyfiscal-2.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4f64c6d68097f0d70c3794139deac135",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 13746,
            "upload_time": "2024-03-25T16:49:06",
            "upload_time_iso_8601": "2024-03-25T16:49:06.484488Z",
            "url": "https://files.pythonhosted.org/packages/71/db/1264f7f97f4829edd98b4061ac2a276e2c0b8625fda4be8fc5f320b7ff2a/pyfiscal-2.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "20b8370f057c8df267fb1327cb3d67b76ae7d339f110b154b9db14bc71f1dcd5",
                "md5": "977bfb775046989f0864dea0336d2ff1",
                "sha256": "bcff75745294713257b067cbd11017e328212cb72d1bb5eb5d699e0217cc0dac"
            },
            "downloads": -1,
            "filename": "pyfiscal-2.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "977bfb775046989f0864dea0336d2ff1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 13630,
            "upload_time": "2024-03-25T16:49:07",
            "upload_time_iso_8601": "2024-03-25T16:49:07.611459Z",
            "url": "https://files.pythonhosted.org/packages/20/b8/370f057c8df267fb1327cb3d67b76ae7d339f110b154b9db14bc71f1dcd5/pyfiscal-2.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-25 16:49:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "roottsantiago",
    "github_project": "pyfiscal",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "black",
            "specs": [
                [
                    "==",
                    "23.3.0"
                ]
            ]
        },
        {
            "name": "coverage",
            "specs": [
                [
                    "==",
                    "7.0.5"
                ]
            ]
        },
        {
            "name": "pre-commit",
            "specs": [
                [
                    "==",
                    "3.0.1"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "7.2.2"
                ]
            ]
        }
    ],
    "lcname": "pyfiscal"
}
        
Elapsed time: 0.87059s