pyzcode
Overview
pyzcode is a Python package designed to handle and manipulate zip codes in the United States. This package provides a comprehensive set of tools to validate, parse, and format zip codes, making it easier for developers to work with postal codes in their applications.
Features
- Parsing: Extract relevant information from zip codes, such as state and city.
- Lookup: Retrieve detailed information about a zip code, including geographic and demographic data.
Installation
You can install pyzcode using pip:
pip install pyzcode
Usage
Once installed, you can start using pyzcode to handle zip codes in your Python projects. The package is designed to be intuitive and easy to integrate into existing codebases.
ZipCode class:
from pyzcode import ZipCode
# Create a ZipCode object
zipcode = ZipCode('90210')
# Get the city and state
city = zipcode.city
state = zipcode.state
print(f'The city is {city} and the state is {state}')
ZipCodeQuery class:
from pyzcode import ZipCodeQuery
# Create a ZipCodeQuery object
query = ZipCodeQuery()
# Lookup a zip code
zipcode = query.get_zipcode('90210')
print(zipcode)
Get Zipcodes by city, state, and type
There are many combinations of get_zipcodes functions where the user can search by city, state, and zip code type.
from pyzcode import ZipCodeQuery
# Create a ZipCodeQuery object
query = ZipCodeQuery()
# Get zip codes by city and state
zipcodes = query.get_zipcodes_by_city_state('Beverly Hills', 'CA')
print(zipcodes)
# Get zip codes by city, state, and type
zipcodes = query.get_zipcodes_by_city_state_type('Beverly Hills', 'CA', 'Standard')
print(zipcodes)
License
pyzcode is licensed under the MIT License. See the LICENSE file for more details.
Contributing
We welcome contributions to pyzcode. If you have suggestions for improvements or have found a bug, please open an issue or submit a pull request on our GitHub repository.
Contact
For any questions or inquiries, please contact the maintainers at [email@example.com].
Metadata
Release files for pyzcode 0.7.0
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 | Actions |
|---|---|---|---|---|
| pyzcode-0.7.0.tar.gz | 910.4 kB | Without provenance | Details for pyzcode-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyzcode-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for pyzcode-0.7.0-py3-none-any.whl |
Total release size: 1.8 MB
Release files / pyzcode-0.7.0.tar.gz
| Download URL | pyzcode-0.7.0.tar.gz |
|---|---|
| Size | 910.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62578799aaa730f6b63faaba2be3e737b2f97a82a1978d14f02b9e971161fd05
|
|
BLAKE2b-256 checksum How to use checksums |
8f9fedf8adea5711e666d1f72c520253b2ae8b62c80a0b4e3ddd77d422b95c3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Release files / pyzcode-0.7.0-py3-none-any.whl
| Download URL | pyzcode-0.7.0-py3-none-any.whl |
|---|---|
| Size | 921.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a73aefd0d616a90c876910b4515ac33fe06774810c60abdd85cf5b90887de631
|
|
BLAKE2b-256 checksum How to use checksums |
e1f37fce2f7c710d31b50479cc63d0a55cfbf73a0c6041564a310c1da826bde0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Security for pyzcode 0.7.0
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.