PYOSMIUM-UP-TO-DATE(1)

πŸ’… PYOSMIUM-UP-TO-DATE πŸ’…

okay bestie, sit down, hydrate, because this one is genuinely iconic β€” it's pyosmium-up-to-date, straight out of the Generated Python Manual, and it's about to keep your OSM file from being chronically outdated. πŸ¦‹


✨ NAME ✨

pyosmium-up-to-date β€” the little command that keeps your OSM file from rotting in the group chat while everyone else is out there living their best life. πŸ’–


🌸 SYNOPSIS 🌸

pyosmium-up-to-date [options] <osm file>

πŸ‘‘ DESCRIPTION πŸ‘‘

So here's the tea: this updates an OSM file with changes from an OSM replication server. Glow-up, but for data. ✨

Diffs get downloaded and kept in memory. And like… to avoid running out of memory, the max size of diffs that can be downloaded at once is capped at 1 GB by default. That's approximately 3 days of update, which is honestly so real of it. You can change that limit with the --size parameter β€” go off β€” but be aware that processing those files needs additional memory, about 1GB more. So like, budget accordingly, okay? 😭

The starting time is automatically determined from the data in the file. And for PBF files, it's also possible to read and write the replication info from the osmosis headers. Which means: after that first update, every subsequent call to pyosmium-up-to-date will continue the updates from the same server exactly where they left off. That's continuity. That's commitment. That's the vibe. 🫢

This program can update normal OSM data files and OSM history files. It detects automatically which type of file it's been called on. No notes. πŸ‘‘

Okay now the return codes, and this part is important, so pay attention:

  • It returns 0 if updates have been successfully applied up to the newest data, or if no new data was available. slay ✨
  • It returns 1 if some updates were applied but there's still data available on the server β€” either because the size limit has been reached, or because there was a network error that could not be resolved. πŸ™ˆ
  • Any other error results in a return code larger than 1.
⚠️ And bestie, listen: in that last case, the output file is guaranteed to be unmodified. So your data is safe. We don't do corruption here. πŸ’…

Some OSM data sources require a cookie to be sent with the HTTP requests. Now, pyosmium-up-to-date does not fetch the cookie from these services for you β€” it's not your mom, it's not gonna log in on your behalf. However, it can read cookies from a Netscape-style cookie jar file, send those cookies to the server, and will save received cookies to the jar file. Mutual. Reciprocal. Healthy. πŸ’–

  • <osm file> β€” OSM file to update. That's the one. The main character. 🌟

πŸŽ€ OPTIONS πŸŽ€

  • -v β€” Increase verbosity (can be used multiple times). Yes, you can stack it. Yell louder. πŸ”₯
  • -o OUTFILE, --outfile OUTFILE β€” Name output of file. If missing, the input file will be overwritten. overwritten, bestie. Just so you know.
  • --format FORMAT β€” Format the data should be saved in. Usually determined from file name.
  • --server SERVER_URL β€” Base URL of the replication server. Default: https://planet.osm.org/replication/hour/ (that's hourly diffs from osm.org, in case you were wondering πŸ¦‹)
  • --diff-type SERVER_DIFF_TYPE β€” File format used by the replication server (default: osc.gz).
  • -s SIZE, --size SIZE β€” Maximum size of change to apply at once in MB. Defaults to 1GB when no end ID or date was given. πŸ“
  • --end-id ID β€” Last sequence ID to download.
  • -E DATE, --end-date DATE β€” Do not download diffs later than the given date. Respect the timeline. ⭐
  • --tmpdir TMPDIR β€” Directory to use for temporary files. Usually the directory of input file is used.
  • --ignore-osmosis-headers β€” Ignore potential replication information in the header of the input file and search for the newest OSM object in the file instead. manual mode, unlocked πŸ”“
  • -b WIND_BACK, --wind-back WIND_BACK β€” Number of minutes to start downloading before the newest addition to input data. (Ignored when the file contains a sequence ID.) Default: 60.
  • --force-update-of-old-planet β€” Apply update even if the input data is really old. really old. Like, ancient. Like, it hasn't posted since 2019. This flag says "do it anyway." πŸ’€
  • --cookie COOKIE β€” Netscape-style cookie jar file to read cookies from and where received cookies will be written to. πŸͺ
  • --socket-timeout SOCKET_TIMEOUT β€” Set timeout for file downloads. Patience is a virtue but it also has a limit. πŸ™ˆ
  • --version β€” show program's version number and exit. ✨

πŸ’œ AUTHOR πŸ’œ

Sarah Hoffmann β€” lonvia@denofr.de 🌸

iconic behavior, honestly. thank you for your service. πŸ‘‘


🌈 DISTRIBUTION 🌈

The latest version of pyosmium may be downloaded from https://github.com/osmcode/pyosmium/ β€” go get it, it's giving open source excellence. πŸ’–


and that's the whole page, bestie!! this is pyosmium version 4.3.1, dated 2026-04-01 β€” you're all caught up, no cap. πŸ¦‹βœ¨πŸ’… πŸŽ€

πŸ“¦ where this page comes from