Skip to main content

validation of all addresses in colombia

Project description


Logo

addressValidator

Contributors Forks starts Awesome Slack

Validate urban and rural addresses in Colombia
Explore the docs»

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Documentation
  3. Roadmap
  4. Contributing
  5. License

About The Project

Documentation

Getting Started

Installation

pip install addressValidator

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

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

addressValidator-1.2.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

addressValidator-1.2.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file addressValidator-1.2.1.tar.gz.

File metadata

  • Download URL: addressValidator-1.2.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for addressValidator-1.2.1.tar.gz
Algorithm Hash digest
SHA256 14a6764312ac02c46772f6c062dcc1b38db3cb1b310a3d3c61e95b753a23e461
MD5 1ca90f6fe7cb349f4ac5e82ce0878b5b
BLAKE2b-256 adb27bed16cb3569bd692eb7765ea1e953868630059ff720bf2d7b3abaa15229

See more details on using hashes here.

File details

Details for the file addressValidator-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for addressValidator-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 23123511eb581b8c256cde5a9be61b9ff3994c5b3c4a1c44eee18633c8f6afe7
MD5 522549d2e31f4745cd0cdc6744f33302
BLAKE2b-256 20af6ca699c367365052fabc08603da8f41f785ef278ec4dee280f852da2e092

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page