Skip to main content
Build Status Coverage PyPI Version Supported Python Versions License Linting: Ruff

Strelki is a Python library that offers a sensible and human-friendly approach to creating, manipulating, formatting and converting dates, times and timestamps. It implements and updates the datetime type, plugging gaps in functionality and providing an intelligent module API that supports many common creation scenarios. Simply put, it helps you work with dates and times with fewer imports and a lot less code.

Strelki is plural for arrow in Macedonian. Strelki takes its name from the arrow of time and is heavily inspired by moment.js and requests.

Strelki is an experimental fork for testing new ideas. Upstream Arrow should still be your default choice unless you specifically need features that are experimental and only implemented here.

Why use Strelki over built-in modules?

Python’s standard library and some other low-level modules have near-complete date, time and timezone functionality, but don’t work very well from a usability perspective:

  • Too many modules: datetime, time, calendar, dateutil, pytz and more

  • Too many types: date, time, datetime, tzinfo, timedelta, relativedelta, etc.

  • Timezones and timestamp conversions are verbose and unpleasant

  • Timezone naivety is the norm

  • Gaps in functionality: ISO 8601 parsing, timespans, humanization

Features

  • Fully-implemented, drop-in replacement for datetime

  • Support for Python 3.8+

  • Timezone-aware and UTC by default

  • Super-simple creation options for many common input scenarios

  • shift method with support for relative offsets, including weeks

  • Format and parse strings automatically

  • Wide support for the ISO 8601 standard

  • Timezone conversion

  • Support for dateutil, pytz, and ZoneInfo tzinfo objects

  • Generates time spans, ranges, floors and ceilings for time frames ranging from microsecond to year

  • Humanize dates and times with a growing list of contributed locales

  • Extensible for your own Arrow-derived types

  • Full support for PEP 484-style type hints

Quick Start

Installation

To install Strelki, use pip or pipenv:

$ pip install -U strelki

Example Usage

>>> import strelki
>>> strelki.get('2013-05-11T21:23:58.970460+07:00')
<Arrow [2013-05-11T21:23:58.970460+07:00]>

>>> utc = strelki.utcnow()
>>> utc
<Arrow [2013-05-11T21:23:58.970460+00:00]>

>>> utc = utc.shift(hours=-1)
>>> utc
<Arrow [2013-05-11T20:23:58.970460+00:00]>

>>> local = utc.to('US/Pacific')
>>> local
<Arrow [2013-05-11T13:23:58.970460-07:00]>

>>> local.timestamp()
1368303838.970460

>>> local.format()
'2013-05-11 13:23:58 -07:00'

>>> local.format('YYYY-MM-DD HH:mm:ss ZZ')
'2013-05-11 13:23:58 -07:00'

>>> local.humanize()
'an hour ago'

>>> local.humanize(locale='ko-kr')
'한시간 전'

Documentation

For full documentation, please visit strelki.readthedocs.io.

Contributing

Contributions are welcome for both code and localizations (adding and updating locales). Begin by gaining familiarity with the Arrow library and its features. Then, jump into contributing:

  1. Find an issue or feature to tackle on the issue tracker. Issues marked with the “good first issue” label may be a great place to start!

  2. Fork this repository on GitHub and begin making changes in a branch.

  3. Add a few tests to ensure that the bug was fixed or the feature works as expected.

  4. Run the development environment and checks with uv sync --all-extras && uv run pytest && uv run pre-commit run --all-files --show-diff-on-failure && uv run --directory docs make html.

  5. Submit a pull request and await feedback 😃.

  6. Use a conventional commit-style PR title such as fix: ... or feat: ... so release-please can infer the next version.

If you have any questions along the way, feel free to ask them here.

Support Strelki

Open Collective is an online funding platform that provides tools to raise money and share your finances with full transparency. It is the platform of choice for individuals and companies to make one-time or recurring donations directly to the project. If you are interested in making a financial contribution, please visit the Strelki collective.

Metadata

Release files for strelki 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for strelki 0.1.1
File Size Uploaded Provenance Actions
strelki-0.1.1.tar.gz 69.0 kB Without provenance Details for strelki-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for strelki 0.1.1
File Interpreter ABI Platform Actions
strelki-0.1.1-py3-none-any.whl Python 3 none any Details for strelki-0.1.1-py3-none-any.whl

Total release size: 138.6 kB

Release files / strelki-0.1.1.tar.gz

Download URL strelki-0.1.1.tar.gz
Size 69.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5b22b39420bf2d9486c32130d6ca45c0b0aa3984949113bd3d89c2c767714b00
BLAKE2b-256 checksum
How to use checksums
b0df3cc971e6ca2effbb995a98a0b5cdc8e4d04ece34b823d22066b443fbcb8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / strelki-0.1.1-py3-none-any.whl

Download URL strelki-0.1.1-py3-none-any.whl
Size 69.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9337c53934170de09f2d8558f0fd661f1cda0b256ab1ce2b29c11afc47d3391a
BLAKE2b-256 checksum
How to use checksums
41dcb03511cd78739a6222761dc8e2090d19d68ec9ba10e6eaf6c16219859dc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for strelki 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page