Skip to main content

PyUSPSValidator

📮 PyUSPSValidator: Simplifying USPS WebTools, one address at a time! 🐍✉️ Verify and validate with ease, thanks to this Python-powered wrapper. Say goodbye to address woes! 🚀📍

Features

  • Verification of addresses

  • Zip code lookup

  • City and state lookup

  • Built-in testing with predefined test data

Installation

Currently, manual installation by copying the source code is supported.

Dependencies:

Make sure to install the required module:

pip install requests

Usage

Initialization

To use the WebToolsRequest class, initialize it with your user ID.

from pyuspsvalidator import WebToolsRequest

api = WebToolsRequest("YOUR_USER_ID")

Verify an Address

This method allows you to validate the given address.

data = [{
    'address2':'910 West Ave',
    'city':'Miami Beach',
    'state':'FL'
}]

response = api.verify(data)
address = response['0']

print(str(address))

Zip Code Lookup

This method retrieves a zip code for a given address.

data = [{
    'address2':'910 West Ave',
    'city':'Miami Beach',
    'state':'FL'
}]

response = api.zipcode_lookup(data)
address = response['0']

print(address.zipcode)

City and State Lookup

Get city and state information based on the provided zip code.

data = [{
    'zip5':'33139'
}]

response = api.citystate_lookup(data)
address = response['0']

print(address.citystate)

Testing

You can use the provided test methods to validate the setup.

api.make_all_test_requests()

Response Handling

Every method returns a Response object, which can be indexed using integer keys to retrieve address information. Each address is represented as a WebToolsAddress object which can be easily printed or accessed using properties.

Contribution

If you’d like to contribute, please fork the repository and make changes as you’d like. Pull requests are warmly welcome.

Issues

If you discover any issues, bugs, or have feedback, please file an issue on the GitHub page or send a pull request.

License

This project is licensed under the MIT License.

Disclaimer

This is an unofficial Python wrapper. Always refer to the official WebTools API documentation for accurate information.

Metadata

Release files for pyuspsvalidator 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyuspsvalidator 0.0.4
File Size Uploaded Provenance Actions
pyuspsvalidator-0.0.4.tar.gz 4.6 kB Without provenance Details for pyuspsvalidator-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyuspsvalidator 0.0.4
File Interpreter ABI Platform Actions
pyuspsvalidator-0.0.4-py3-none-any.whl Python 3 none any Details for pyuspsvalidator-0.0.4-py3-none-any.whl

Total release size: 9.4 kB

Release files / pyuspsvalidator-0.0.4.tar.gz

Download URL pyuspsvalidator-0.0.4.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
41497393e78f5dc170fa179ee0f7fa2f4708ab53b0cb7a042e8271a2107979b6
BLAKE2b-256 checksum
How to use checksums
a9816874b782afd0e145db0015b1933377caf069c6aa4573a3492ca7e650f022
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / pyuspsvalidator-0.0.4-py3-none-any.whl

Download URL pyuspsvalidator-0.0.4-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef8047dc09864e2413430116ecea48f0c1296250f57b203ffd3d6a1325fc318b
BLAKE2b-256 checksum
How to use checksums
083e084266a91d1b9b299c54c21d224bc70e98434c872d9493d66453fb3bd153
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for pyuspsvalidator 0.0.4

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page