Python package to manage zip codes
Project description
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].
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyzcode-0.6.0.tar.gz.
File metadata
- Download URL: pyzcode-0.6.0.tar.gz
- Upload date:
- Size: 910.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07873d8f896c17fa7d4fbe1829d276aea40ba4e4e66b85c4bfbe3533ad102f68
|
|
| MD5 |
842e462da9c8ba101294078dd2029a61
|
|
| BLAKE2b-256 |
fd9f7189a93c3e4a823b640199eaab6fa414db1dba600c1d94aa11d5690ae546
|
File details
Details for the file pyzcode-0.6.0-py3-none-any.whl.
File metadata
- Download URL: pyzcode-0.6.0-py3-none-any.whl
- Upload date:
- Size: 921.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c426d33f94f3b5f71b0c6cfeb99f3c77c811fbef677b6198cc154b434b4ca40e
|
|
| MD5 |
ac43f2b9fd481240809070fea9cba35d
|
|
| BLAKE2b-256 |
2cefc43209c5c4d4db29dd8d75660c7bacaa6c84b887d21b4b1d277ddd38aaba
|