<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Spencer, <br></div><div><br></div><div>I've done numerous Python based projects around OSM data, but I usually treat the data loading as a separate process outside of my applications.<br></div><div><br></div><div>For bulk loading OSM data into PostGIS I would recommend osmosis if you want a lossless representation with optional direct access to geometry. osmosis can also be used to keep your image of OSM up-to-date. Note that initial loading of the entire OSM planet takes quite some time (more than a day last time I did it).<br></div><div><br></div><div>If you just require access to small chunks of data at any given time (city level or smaller) you can ingest the data on-demand using the Overpass server, for which I maintain a python interface. Overpass also allows you to target very specific subsets of OSM data. Depending on your use case that may be a preferred option.<br></div><div id="sig78141864"><div class="signature">--<br></div><div class="signature">  Martijn van Exel<br></div><div class="signature">  m@rtijn.org<br></div><div class="signature"><br></div></div><div><br></div><div>On Fri, Dec 21, 2018, at 06:16, Spencer Gardner wrote:<br></div><blockquote type="cite" id="fastmail-quoted"><div dir="ltr"><div>I'm researching options for a Python-based tool that uses OSM data. From what I can gather there's no native Python library for OSM imports to a PostGIS database. (Yes, imposm is developed in Python but there's no documentation I can find on how to use it as a Python library--it appears to be intended as a command line tool). This seems odd to me since there's such a large community of OSM users. I feel like I'm missing something. Are there other viable Python libraries I'm not aware of? (Viable = large-ish user base and history of bugfixing.) Is there documentation for using imposm within Python that I've overlooked?<br></div><div><br></div><div>Bonus points for:<br></div><div>- Windows compatibility<br></div><div>- No external (i.e. non-Python) libraries needed<br></div><div><br></div><div>Thanks for any help!<br></div></div><div>_______________________________________________<br></div><div>dev mailing list<br></div><div>dev@openstreetmap.org<br></div><div>https://lists.openstreetmap.org/listinfo/dev<br></div><div><br></div></blockquote><div><br></div></body></html>