Easily create OSM-based apps in Python with OSMAlchemy
Posted by Klampfradler on 22 September 2016 in English.At the Python Unconference in Hamburg, we released the new OSMAlchemy library, which allows for the simple creation of arbitrary, OSM-data based applications with a low resource footprint in Python. It wraps around the popular SQLAlchemy database library and allows access to the whole world of OSM data as if it were in a local SQL database, and uses such a local database for caching.
See the GitHub repo for the code and a README, and find the original presentation from the release talk.
You can write to osmalchemy@veripeditus.org if you have questions or comments, or use the GitHub issue tracker.
Discussion
Comment from mvexel on 22 September 2016 at 19:44
Would this be related to the Overpass API python wrapper in any way? Can you point out similarities / differences between the projects?
Comment from Klampfradler on 22 September 2016 at 21:06
Yes, it uses the Python overpass client library. However, the use is completely different. With OSMAlchemy, you do not care about querying the Overpass API, and you do not care about building OverpassQL queries. It is a layer that makes accessing Overpass completely transparent. You simply query your SQLAlchemy database, and everything that cannot be satisfied from the SQL database is queried online, by using an SQL-to-OverpassQL compiler. See the project README for a quick description on how OSMAlchemy operates. At the end, you access the data as though it were available locally inside your SQLAlchemy model, and OSMAlchemy does its best to make this illusion perfect ;).