International Address formatter
This is a address formatter that can format addresses in multiple formats that are common in different countries.
For formatting the addresses the worldwide.yml from OpenCageData address-formatting repository is used to format the address according to customs in the country that is been encoded.
API documentation
The complete project contains actually only one class:
AddressFormatter
Publicly accessible method prototypes are:
def __init__(self, config=None):
pass
def format(self, address, country=None):
pass
def one_line(self, address, country=None):
pass
__init__
Initialize the address formatter
config: (optional) override default config file to use for the address formatter, defaults to config file included in this package
format
Format an address in the default layout used in the specified country. Return value may contain line breaks.
address: Dictionary that contains the address parts, see below for recognized keyscountry: Country code of the formatting template to use
Recognized keys in address:
attentionhouseroadhouse_numberpostcodecitytownvillagecountystatecountrysuburbcity_districtstate_districtstate_codeneighbourhood
one_line
Works the same as format but returns a single line of text.
Metadata
Release files for addressformatting 1.3.2
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 |
|---|---|---|---|---|
| addressformatting-1.3.2.tar.gz | 12.0 kB | Without provenance | Details for addressformatting-1.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| addressformatting-1.3.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for addressformatting-1.3.2-py2.py3-none-any.whl |
Total release size: 24.2 kB
Release files / addressformatting-1.3.2.tar.gz
| Download URL | addressformatting-1.3.2.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b89154bf7371d762f96bf2733eaeafed0a51229569e059a5b6c8cd68725e400
|
|
BLAKE2b-256 checksum How to use checksums |
34d72fc264670bb614f6f5dad2d1a3cb43ca364873edc27032ddd1c3cc38ffda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / addressformatting-1.3.2-py2.py3-none-any.whl
| Download URL | addressformatting-1.3.2-py2.py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
9c37a1d06ada17b981cead84c85f0805831fc991c2b660b2d51fc93de36bdc9e
|
|
BLAKE2b-256 checksum How to use checksums |
f0da1c8d3d2e93deca99e8f616f269f3f9d4e494f2d9ec7ad32491f378ecc53a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Security for addressformatting 1.3.2
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.