Skip to main content

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

pyzcode-0.3.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

pyzcode-0.3.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file pyzcode-0.3.0.tar.gz.

File metadata

  • Download URL: pyzcode-0.3.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for pyzcode-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7de02c68d3c1b498673a9c4f1b4359af1507da6e98bdeb65250205ca1d0006d4
MD5 38b3f863dc7cc541e378eb1c2d14996d
BLAKE2b-256 35186d9e6bbb1527a424fe4710e512a38a7553f3e09aef650f2ba22ee4925a99

See more details on using hashes here.

File details

Details for the file pyzcode-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pyzcode-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for pyzcode-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6fde1a71161a63411ba04e3dc6146be7a6144ff18a1a63584cc7955088ad0f8
MD5 8b2a69c06cf2bc2ccbae7bc67c420946
BLAKE2b-256 ac54f709f99e5a373fb4b4cd11df707b2f37ff75dd4c014f1c8985f9d50a931f

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