{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/10"}],"enrichment":{"capability":"Snaptime transforms timestamps using a simple DSL inspired by Splunk's relative time modifiers, allowing you to snap to time boundaries and apply time deltas in a single chained expression.","skillfed_tags":["datetime-utilities","abandoned"],"use_cases":["Compute delivery times or scheduled events by snapping to time boundaries and adding offsets in a single expression.","Truncate timestamps to specific time units (day, hour, week, month) for aggregation or reporting queries.","Handle timezone-aware datetimes with DST transitions using snap_tz when naive snapping would produce incorrect results.","Build time-based filters for log analysis or time-series data where relative time expressions are more readable than imperative datetime arithmetic."],"what_it_does":"Snaptime is a small utility for transforming timestamps using a domain-specific language (DSL) that chains snap and delta operations. It lets you truncate a datetime to a time boundary (e.g., start of day with @d) and add time offsets (e.g., +3h) in a single expression, inspired by Splunk's relative time syntax. The package includes a basic snap() function for naive datetimes and a snap_tz() variant for timezone-aware datetimes that handles daylight saving time transitions.\n\nThe DSL supports multiple notations for each time unit (seconds, minutes, hours, days, weeks, months, years) and allows arbitrary chaining\u2014for example, snap(t, \"+8h@d+1d+11h\") adds 8 hours, snaps to midnight, then adds one day and 11 hours. It has no runtime dependencies, but the package has been abandoned since 2017-06-15 with no maintenance, no specified Python version support, and an unclear license.","worth_installing":"No. The package is abandoned (last commit 2017-06-15), has no specified Python version support, an unclear license, and high install friction. While the DSL concept is useful, the lack of maintenance means compatibility with modern Python is uncertain and security issues would go unaddressed. Use a maintained alternative or implement the snapping logic directly."},"id":"snaptime","links":{"html":"https://skillfed.io/packages/snaptime","md":"https://skillfed.io/packages/snaptime.md","pypi":"https://pypi.org/project/snaptime/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2017-06-15","license_spdx":null,"license_treatment":"unclear","name":"snaptime","python_support":"unspecified","summary":"Transform timestamps with a simple DSL"},"popularity":{"monthly_downloads":102958,"position":12834,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.2.4"}
