All Projects → pnpnpn → street-address

pnpnpn / street-address

Licence: other
Street address parser and formatter

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to street-address

addressr
Free Australian Address Validation, Search and Autocomplete
Stars: ✭ 46 (-46.51%)
Mutual labels:  address, street-address
address-format
A PHP library to parse street addresses to localized formats
Stars: ✭ 76 (-11.63%)
Mutual labels:  formatter, street-address
SonataFormatterBundle
Symfony SonataFormatterBundle
Stars: ✭ 78 (-9.3%)
Mutual labels:  formatter
vue-translated
Internationalization (i18n) and localization (l10n) library for Vue.js v2.
Stars: ✭ 19 (-77.91%)
Mutual labels:  formatter
dockerfile-language-service
Dockerfile language service for providing an API to create feature-rich Dockerfile editors in JavaScript.
Stars: ✭ 15 (-82.56%)
Mutual labels:  formatter
util
封装了一些Java常用的功能
Stars: ✭ 19 (-77.91%)
Mutual labels:  formatter
geocoding
地理编码技术,提供地址标准化和相似度计算。
Stars: ✭ 148 (+72.09%)
Mutual labels:  address
googlejavaformat-action
GitHub Action that formats Java files following Google Style guidelines
Stars: ✭ 66 (-23.26%)
Mutual labels:  formatter
string theory
Flexible modern C++ string library with type-safe formatting
Stars: ✭ 32 (-62.79%)
Mutual labels:  formatter
format-date
📆 A small library (around 400 B when gziped & minified) to format JavaScript `Date` object using same tokens as moment.
Stars: ✭ 25 (-70.93%)
Mutual labels:  formatter
rspec-github
Formatter for RSpec to show errors in GitHub action annotations
Stars: ✭ 33 (-61.63%)
Mutual labels:  formatter
Bois
Salar.Bois is a compact, fast and powerful binary serializer for .NET Framework. With Bois you can serialize your existing objects with almost no change.
Stars: ✭ 53 (-38.37%)
Mutual labels:  formatter
cryptaddress.now
A minimal service to detect which cryptocurrency an address corresponds to.
Stars: ✭ 23 (-73.26%)
Mutual labels:  address
bundle outdated formatter
Formatter for `bundle outdated` command
Stars: ✭ 16 (-81.4%)
Mutual labels:  formatter
eslint-formatter-git-log
ESLint Formatter featuring Git Author, Date, and Hash
Stars: ✭ 36 (-58.14%)
Mutual labels:  formatter
vscode-nginx-formatter
A simple Formatter, which formats NGINX Configuration Files in VSCode
Stars: ✭ 16 (-81.4%)
Mutual labels:  formatter
li18nt
🌎 Lint your i18n translation files. Detect conflicting properties, duplicates and make it more readable and easier to maintain by formatting it!
Stars: ✭ 29 (-66.28%)
Mutual labels:  formatter
cosmospy
Python tools for Cosmos wallet management and offline transaction signing
Stars: ✭ 57 (-33.72%)
Mutual labels:  address
json-formatter
An extensible JSON Viewer, Editor, Formatter, Validator based on Monaco Editor
Stars: ✭ 41 (-52.33%)
Mutual labels:  formatter
VzAddress-Craft
Address fieldtype for the Craft CMS
Stars: ✭ 30 (-65.12%)
Mutual labels:  address

Build Status PyPI version

street-address

Street address parser and formatter

Installation

From source code:

python setup.py install

From pypi:

pip install street-address

Usage

from streetaddress import StreetAddressFormatter, StreetAddressParser

addr_parser = StreetAddressParser()

addr = addr_parser.parse("1600 Pennsylvania Ave")
print addr['house'] #1600
print addr['street_full'] #Pennsylvania Ave
print addr['street_name'] #Pennsylvania
print addr['street_type'] #Ave

addr = addr_parser.parse("One Union Square, Apt 22-C")
print addr['house'] #1
print addr['street_full'] #Union Square
print addr['street_name'] #Union
print addr['street_type'] #Square
print addr['suite_num'] #22-C
print addr['suite_type'] #Apt

addr_formatter = StreetAddressFormatter()
street = 'West 23 Street'
street = addr_formatter.append_TH_to_street(street) #West 23rd Street
street = addr_formatter.abbrev_direction(street) #W 23rd Street
street = addr_formatter.abbrev_street_avenue_etc(street) #W 23rd St

Acknowledgement

Based on test cases from http://pyparsing.wikispaces.com/file/view/streetAddressParser.py

Contribute

I would love for you to fork and send me pull request for this project. Please contribute.

License

The MIT License (MIT)

Copyright (c) 2012-2014 Patrick Ng

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].