Skip to main content

Generate and parse RFC 3339 timestamps

Project description

Description

Build Status Documentation Status

pyRFC3339 parses and generates RFC 3339-compliant timestamps using Python datetime.datetime objects.

>>> from pyrfc3339 import generate, parse
>>> from datetime import datetime, timezone
>>> generate(datetime.now(timezone.utc)) #doctest:+ELLIPSIS
'...T...Z'
>>> parse('2009-01-01T10:01:02Z')
datetime.datetime(2009, 1, 1, 10, 1, 2, tzinfo=datetime.timezone.utc)
>>> parse('2009-01-01T14:01:02-04:00')
datetime.datetime(2009, 1, 1, 14, 1, 2, tzinfo=datetime.timezone(datetime.timedelta(days=-1, seconds=72000), '<UTC-04:00>'))

Installation

To install the latest version from PyPI:

$ pip install pyRFC3339

To install the latest development version:

$ pip install https://github.com/kurtraschke/pyRFC3339/tarball/master#egg=pyRFC3339-dev

To build the documentation with Sphinx:

  1. $ pip install -r docs/requirements.txt

  2. $ sphinx-build -M html docs/source/ docs/build

The documentation is also available online at:

https://pyrfc3339.readthedocs.io/

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

pyrfc3339-2.0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

pyRFC3339-2.0.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file pyrfc3339-2.0.1.tar.gz.

File metadata

  • Download URL: pyrfc3339-2.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pyrfc3339-2.0.1.tar.gz
Algorithm Hash digest
SHA256 e47843379ea35c1296c3b6c67a948a1a490ae0584edfcbdea0eaffb5dd29960b
MD5 38e099b17fff4fbd0b2a18e13365aeeb
BLAKE2b-256 f0d26587e8ec3951cbd97c56333d11e0f8a3a4cb64c0d6ed101882b7b31c431f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrfc3339-2.0.1.tar.gz:

Publisher: pypi-publish.yml on kurtraschke/pyRFC3339

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyRFC3339-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyRFC3339-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pyRFC3339-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30b70a366acac3df7386b558c21af871522560ed7f3f73cf344b8c2cbb8b0c9d
MD5 58a73e8aed297263f3d9df0ebe0bef03
BLAKE2b-256 ddbad778be0f6d8d583307b47ba481c95f88a59d5c6dfd5d136bc56656d1d17f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyRFC3339-2.0.1-py3-none-any.whl:

Publisher: pypi-publish.yml on kurtraschke/pyRFC3339

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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