addressValidator
Validate urban and rural addresses in Colombia
Explore the docs»
Report Bug
·
Request Feature
Table of Contents
About The Project
the project was developed through the definition of Mealy machines, regular expressions, regular grammars, Automata, for the validation of all addresses currently valid in Colombia.
the standardization of urban addresses of the ministry of education was used as a guideline.
Documentation
Getting Started
Installation
pip install addressValidator
or
py -m pip install addressValidator
latest stable version addressValidator==1.2.1
Usage
- Example
from addressValidator import address_validator address = "Calle 3BC #10-2 Barrio San Juan Apartamento 201" if address_validator(address): print(address+" direccion valida") else: print(address+" direccion invalida")
For more examples, please refer to the Examples packages
Functions
we can use 4 functions to validate both urban and rural addresses
address_validator
address_validator function receives as a parameter a mandatory string which will be evaluated and will return a boolean if valid or not.
from addressValidator import address_validator
# address_validator(str) -> bool
address = address_validator("Calle 13B #10-3")
print(address)// #True
if the address is not valid it will return False
from addressValidator import address_validator
# address_validator(str) -> bool
address = address_validator("Calle 13sur 13-121B")
print(address)// #False
address_validator_dian
fucntion address_validator_dian returns the address validation according to dian nomenclature
from addressValidator import address_validator_dian
# address_validator_dian(str) -> bool
address = address_validator_dian("Cl 13 B 10 3")
print(address)// #True
if the address is not valid it will return False
from addressValidator import address_validator_dian
# address_validator_dian(str) -> bool
address = address_validator_dian("Cl 13 sur 13 121 B")
print(address)// #False
address_validator_file
address_validator_file function receives a text file, does not return any value, this function creates a text file with the respective validations.
from addressValidator import address_validator_file
# address_validator_file(file) -> None
with open("address.txt") as file_object:
address_validator_file(file_object) # create output.txt
here we can see that we read a file called address.txt that we find in the examples folder this function will return the validations of all the strings as we can see in the output.txt file.All this for urban and rural addresses
address_validator_file_dian
The function address_validator_file_dian receives a text file, creates a text file with the validations of the addresses with dian nomenclature
from addressValidator import address_validator_file_dian
# address_validator_file_dian(file) -> None
with open("addressDian.txt") as file_object:
address_validator_file_dian(file_object) # create output.txt
We read the addressDian file from the root path and send the document to the function and it returns the validations in an output.txt file. Validations with file for dian nomenclature is in the output_dian.txt file
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Metadata
Release files for addressValidator 1.2.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 | Provenance | |
|---|---|---|---|---|
| addressValidator-1.2.2.tar.gz | 7.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| addressValidator-1.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.3 kB
Release files / addressValidator-1.2.2.tar.gz
| Download URL | addressValidator-1.2.2.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc011accf04e32664148fa91718aba3f2b7404fa9d8cd615ce93e683801f32a1
|
|
BLAKE2b-256 checksum How to use checksums |
46167c5fd5999d91d617dce1a7a856a00585d2fe06e918be1a722bed7495accc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / addressValidator-1.2.2-py3-none-any.whl
| Download URL | addressValidator-1.2.2-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f999d767b8da3fd5b2787edb6019cf7f0571a35363699973415e76457caabeb2
|
|
BLAKE2b-256 checksum How to use checksums |
0bd273431cc864079ae55440aa60b80a286bbeb4cffc03f725522bd5867ca302
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Security for addressValidator 1.2.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.