addressformatting


Nameaddressformatting JSON
Version 1.3.2 PyPI version JSON
download
home_pagehttps://github.com/pudo/addressformatting
SummaryFormatting utility for international postal addresses
upload_time2023-07-14 08:30:20
maintainer
docs_urlNone
authorFriedrich Lindenberg
requires_python
licenseBSD
keywords address formatting international
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://github.com/OpenCageData/address-formatting) 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:

```python
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 keys
- `country`: Country code of the formatting template to use

Recognized keys in `address`:
- `attention`
- `house`
- `road`
- `house_number`
- `postcode`
- `city`
- `town`
- `village`
- `county`
- `state`
- `country`
- `suburb`
- `city_district`
- `state_district`
- `state_code`
- `neighbourhood`

#### `one_line`

Works the same as `format` but returns a single line of text.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pudo/addressformatting",
    "name": "addressformatting",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "address formatting,international",
    "author": "Friedrich Lindenberg",
    "author_email": "friedrich@pudo.org",
    "download_url": "https://files.pythonhosted.org/packages/34/d7/2fc264670bb614f6f5dad2d1a3cb43ca364873edc27032ddd1c3cc38ffda/addressformatting-1.3.2.tar.gz",
    "platform": null,
    "description": "# International Address formatter\n\nThis is a address formatter that can format addresses in multiple formats that are common\nin different countries.\n\nFor formatting the addresses the `worldwide.yml` from [OpenCageData address-formatting repository](https://github.com/OpenCageData/address-formatting) is used to format the address according to customs in the country that is been encoded.\n\n## API documentation\n\nThe complete project contains actually only one class:\n\n### `AddressFormatter`\n\nPublicly accessible method prototypes are:\n\n```python\ndef __init__(self, config=None):\n    pass\n\ndef format(self, address, country=None):\n    pass\n\ndef one_line(self, address, country=None):\n    pass\n```\n\n#### `__init__`\n\nInitialize the address formatter\n- `config`: (optional) override default config file to use for the address formatter, defaults to config file included in this package\n\n#### `format`\n\nFormat an address in the default layout used in the specified country. Return value may contain line breaks.\n- `address`: Dictionary that contains the address parts, see below for recognized keys\n- `country`: Country code of the formatting template to use\n\nRecognized keys in `address`:\n- `attention`\n- `house`\n- `road`\n- `house_number`\n- `postcode`\n- `city`\n- `town`\n- `village`\n- `county`\n- `state`\n- `country`\n- `suburb`\n- `city_district`\n- `state_district`\n- `state_code`\n- `neighbourhood`\n\n#### `one_line`\n\nWorks the same as `format` but returns a single line of text.\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Formatting utility for international postal addresses",
    "version": "1.3.2",
    "project_urls": {
        "Homepage": "https://github.com/pudo/addressformatting"
    },
    "split_keywords": [
        "address formatting",
        "international"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f0da1c8d3d2e93deca99e8f616f269f3f9d4e494f2d9ec7ad32491f378ecc53a",
                "md5": "e2efcd00a3c60720b2e1edffad727524",
                "sha256": "9c37a1d06ada17b981cead84c85f0805831fc991c2b660b2d51fc93de36bdc9e"
            },
            "downloads": -1,
            "filename": "addressformatting-1.3.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e2efcd00a3c60720b2e1edffad727524",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 12126,
            "upload_time": "2023-07-14T08:30:19",
            "upload_time_iso_8601": "2023-07-14T08:30:19.438899Z",
            "url": "https://files.pythonhosted.org/packages/f0/da/1c8d3d2e93deca99e8f616f269f3f9d4e494f2d9ec7ad32491f378ecc53a/addressformatting-1.3.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "34d72fc264670bb614f6f5dad2d1a3cb43ca364873edc27032ddd1c3cc38ffda",
                "md5": "d00d838e7c57dbce2112ea44f6682c80",
                "sha256": "9b89154bf7371d762f96bf2733eaeafed0a51229569e059a5b6c8cd68725e400"
            },
            "downloads": -1,
            "filename": "addressformatting-1.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d00d838e7c57dbce2112ea44f6682c80",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12025,
            "upload_time": "2023-07-14T08:30:20",
            "upload_time_iso_8601": "2023-07-14T08:30:20.486264Z",
            "url": "https://files.pythonhosted.org/packages/34/d7/2fc264670bb614f6f5dad2d1a3cb43ca364873edc27032ddd1c3cc38ffda/addressformatting-1.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-14 08:30:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pudo",
    "github_project": "addressformatting",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "addressformatting"
}
        
Elapsed time: 0.09705s