This release is a pre-release and may not be stable for production use.
Atlus
This Python project translates raw address strings into the OpenStreetMap (OSM) tagging scheme. The package only supports US (and to some extent Canadian) addresses. You can try out the package without installing it at the Atlus website.
[!NOTE] Use of this package does not absolve you from following OSM's import guidelines.
Table of Contents
Features
- Expand common street and name abbreviations.
- Parse address parts correctly and reliably.
- Get rid of address junk that is not needed for OpenStreetMap tagging.
- Parse US and Canadian phone numbers into the standard format.
- Parse raw opening hours strings into the OSM
opening_hoursformat, including the specialPH(public holiday) indicator and thedawn/dusk/sunrise/sunsetsolar time keywords. - Parse raw point-in-time strings (e.g.
collection_times,service_times) into the matching OSM format, dropping any "closed" days rather than erroring (since point-in-time tags have no "closed" concept of their own). - Raise a clear error instead of guessing when opening hours/point-in-time input references calendar/date-based rules (month names, specific dates, named holidays, or OSM's
Th[4]-style nth-weekday notation), which aren't supported.
Usage
This package is meant to work with GeoJSON files containing raw address data, including those produced by the All the Places project or Overture maps.
pip install atlus
>>> import atlus
>>> atlus.abbrs("St. Francis")
"Saint Francis"
>>> atlus.get_address("789 Oak Dr, Smallville California, 98765")[0]
{"addr:housenumber": "789", "addr:street": "Oak Drive", "addr:city": "Smallville", "addr:state": "CA", "addr:postcode": "98765"}
>>> atlus.get_phone("(202) 900-9019")
"+1-202-900-9019"
>>> atlus.get_hours("Monday to Friday 9am-5pm, Saturday 9am-12pm")
"Mo-Fr 09:00-17:00; Sa 09:00-12:00"
>>> atlus.get_times("Mo-Fr 15:00,18:00,19:00,23:00; Sa 15:00; Su 10:30,23:00")
"Mo-Fr 15:00,18:00,19:00,23:00; Sa 15:00; Su 10:30,23:00"
>>> atlus.get_hours("Mo-Fr sunrise-sunset")
"Mo-Fr sunrise-sunset"
Docs
The documentation for our package is available online at our documentation page. We would greatly appreciate your contributions to help improve the auto-generated docs; please submit any updates or corrections via pull requests.
License
This project is licensed under the MIT License. See the LICENSE file for details.
See also
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 atlus-1.1.0b4.tar.gz.
File metadata
- Download URL: atlus-1.1.0b4.tar.gz
- Upload date:
- Size: 74.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffb83af4695f9cff2880f02b7074e745281fea008c910114264db3062218fe7b
|
|
| MD5 |
4884ca2a7c385d8db0d0b79e7dfd46e6
|
|
| BLAKE2b-256 |
2b2bb90980356778588092caf8eab1baf5fe07c69c420c4c8ddab967e79815a4
|
File details
Details for the file atlus-1.1.0b4-py3-none-any.whl.
File metadata
- Download URL: atlus-1.1.0b4-py3-none-any.whl
- Upload date:
- Size: 26.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10e9c4bce6bf8a55468d72ef077be4cf52d8d01959616ee2ca3b5ab49e96f7f6
|
|
| MD5 |
b116d5fa704008d8cf781d7f5cd5049c
|
|
| BLAKE2b-256 |
dd7c2b8db65ba55c0d47a3e996bf84e36371da774fb2a81c255749e3a8a2fce2
|