Skip to main content

Super fast datetime alternative

Project description

ultratime

Super fast datetime alternative powered by Rust + PyO3.

ultratime provides a blazing fast datetime implementation by leveraging Rust's performance and safety through PyO3.
It is designed as a drop-in alternative for Python's built-in datetime module when speed matters.


Features

  • Written in Rust for maximum performance
  • Seamless integration with Python via PyO3
  • Drop-in replacement for common datetime usage
  • Python 3.8+ support

Installation

You can install from PyPI:

pip install ultratime

Usage

from ultratime import UltraDateTime, UltraDelta, now_utc, parse_iso8601, parse_format

now = UltraDateTime.now_utc()
print("Now:", now)

dt = UltraDateTime.from_iso8601("2025-09-19T17:30:00+00:00")
print("Parsed ISO8601:", dt)

dt_jakarta = UltraDateTime.from_format("2025-09-19 17:30", "%Y-%m-%d %H:%M", tz="Asia/Jakarta")
print("Jakarta time -> UTC:", dt_jakarta)

dt_ts = UltraDateTime.from_timestamp(1758297000.123456)
print("From timestamp:", dt_ts)

print("Formatted:", dt_ts.format("%Y-%m-%d %H:%M:%S"))

print("As Jakarta:", dt_ts.astimezone("Asia/Jakarta"))

delta = UltraDelta(days=2, seconds=3600, microseconds=500)
print("Delta:", delta, "total_seconds:", delta.total_seconds())

future = dt + delta
past = dt - delta
diff = future - dt
print("Future:", future)
print("Past:", past)
print("Diff in days:", diff.days())

LICENSE

This project is licensed under the MIT License.


Youtube & Videos overview

Coming soon

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ultratime-0.1.2.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ultratime-0.1.2-cp38-abi3-win_amd64.whl (353.1 kB view details)

Uploaded CPython 3.8+Windows x86-64

File details

Details for the file ultratime-0.1.2.tar.gz.

File metadata

  • Download URL: ultratime-0.1.2.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for ultratime-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3df95245842801b584f2441ac90395d75173ad54a73cf995c0c50afc5847abe9
MD5 47a789db4f4e93f0e44815b79f6c13c8
BLAKE2b-256 109766f3bd1d10e5c9ba64aab797d246175372d19ea86f17e75340c94a1d3b1e

See more details on using hashes here.

File details

Details for the file ultratime-0.1.2-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: ultratime-0.1.2-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 353.1 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for ultratime-0.1.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c5713f4b496fa53fe8b430e125ecf2d2cfafbb802e404eac95280919efe5ecdd
MD5 332564dc090e6ff488a4f0cd9d5aecd5
BLAKE2b-256 b17130c7a3c00214c6e2590311c41d7a87da97681ffda1132a48c7607d8e519a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page