--- id: snaptime version: "0.2.4" license: UNKNOWN license_treatment: unclear maintenance: abandoned --- # snaptime — Transform timestamps with a simple DSL License: unclear · Maintenance: abandoned · Downloads: 103.0K/mo ## What it is and 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. The DSL supports multiple notations for each time unit (seconds, minutes, hours, days, weeks, months, years) and allows arbitrary chaining—for 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. Use it for: - 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. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. 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. 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. ## Install pip install snaptime uv add snaptime poetry add snaptime ## Installing snaptime Before you install: High install friction reported. The package is abandoned—last commit was 2017-06-15, with no maintenance activity or Python version specification. Installation may encounter compatibility issues with modern Python environments. License in practice: License is marked UNKNOWN with unclear treatment. No SPDX identifier is available. You should verify the actual license terms in the repository before using this package in a production or commercial context. Quickstart: from datetime import datetime from snaptime import snap result = snap(datetime(2018, 10, 28, 23), "+3h@d") # datetime.datetime(2018, 10, 29, 0, 0) No Python version requirement specified; compatibility with modern Python versions is uncertain given the package's abandonment since 2017-06-15. Verify before relying: - Whether the package works with Python 3.x versions (development history suggests Python 2 focus) - Current state of timezone-aware datetime handling and DST edge cases - Whether snap_tz function is stable or has known issues with modern timezone libraries ## Package facts - License: UNKNOWN (unclear) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 103.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags datetime truncation, relative time modifiers, timestamp snapping, time delta chaining, datetime transformation DSL, snap to time boundaries, timestamp manipulation, datetime-utilities, abandoned [View on SkillFed](https://skillfed.io/packages/snaptime) · [View on PyPI](https://pypi.org/project/snaptime/)