Skip to main content

Chilean rut Python package - Chilean Rut/Run validator and formatter library

Project description

Chilean Rutify

Chilean Rutify is a Python library that provides utilities for Chilean RUT (Rol Único Tributario) validation and manipulation.

Installation

You can install Chilean Rutify via pip:

pip install chileanrutify

Usage

You can directly use the utility methods provided by the library:

from chileanrutify import normalize_rut, format_rut, valid_rut, valid_rut_verifier, valid_rut_values, get_verifier, dash_only_rut, classic_rut

# Example RUT: '36.408.368-8'
rut = '36408368-8'
chileanrutify.normalize_rut(rut)
# >>> "364083688"
chileanrutify.format_rut(rut)  # alias for chileanrutify.classic_rut(rut)
# >>> "36.408.368-8"
chileanrutify.format_rut(rut, 'dash_only')  # alias for chileanrutify.dash_only_rut(rut)
# >>> "36408368-8"
chileanrutify.format_rut(rut, 'normalized')  # alias for chileanrutify.normalize_rut(rut)
# >>> "364083688"
chileanrutify.valid_rut(rut)
# >>> True
chileanrutify.valid_rut_verifier(rut)
# >>> True
chileanrutify.valid_rut_values(rut)
# >>> True
rut = "36408368"
chileanrutify.get_verifier(rut)
# >>> "8"

Development

After cloning the repository, set up your environment and run tests:

pip install -r requirements.txt
pytest

To install the library locally:

pip install .

To test the library in interactive Python prompt user:

python

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/mihailpozarski/chilean-rutify-py. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The library is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Chilean::Rutify project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

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

chileanrutify-0.2.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

chileanrutify-0.2.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file chileanrutify-0.2.0.tar.gz.

File metadata

  • Download URL: chileanrutify-0.2.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.9

File hashes

Hashes for chileanrutify-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0e76ffbeca4625c5886471ba79e255af63d9f67f1f1ff53ed5ab6797169e7372
MD5 76b235f0a71617f3b743b8c3cdbfa7d3
BLAKE2b-256 1c975c151b8a221edf32d687f4fe5bde4227f4849f3d6439d912dbcb2b836011

See more details on using hashes here.

File details

Details for the file chileanrutify-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for chileanrutify-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4520619a93f21d12f5153285d7e8b1335882ffe02428f9507a8ea6260dc68357
MD5 97c1dfa28daf423fb40b6ab2d8626846
BLAKE2b-256 88bc7327853c2ac5c8bc03273612b5b291c7f3bce59dbd7ad858e5d8ec467b64

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