pyRFC3339
Generate and parse RFC 3339 timestamps
What it is and what it does
pyRFC3339 is a lightweight library for working with RFC 3339-compliant timestamps in Python. It provides two core functions: `generate()` converts a timezone-aware datetime object into an RFC 3339 string, and `parse()` converts an RFC 3339 string back into a datetime object with proper timezone information. The library handles the details of timestamp formatting and parsing so you don't have to manually construct or interpret RFC 3339 strings.
This is useful for any application that needs to exchange timestamps with APIs, databases, or other systems that expect RFC 3339 format—a standard used widely in web services and data interchange. The library has no external dependencies and supports current Python versions from 3.9 onward, making it straightforward to add to any project.
Use it for:
- Serialize datetime objects to RFC 3339 strings for REST API responses or JSON payloads.
- Parse RFC 3339 timestamps from external APIs or configuration files into Python datetime objects.
- Ensure consistent timestamp formatting across services that require RFC 3339 compliance.
- Handle timezone-aware datetime conversions without manual string manipulation.
- Generate audit logs or event timestamps in a standardized, interoperable format.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and generates RFC 3339-compliant timestamps using Python datetime objects, converting between string representations and timezone-aware datetime instances.
Yes. pyRFC3339 is a stable, actively maintained library with zero dependencies, permissive licensing, and no known vulnerabilities. Install it if you need to work with RFC 3339 timestamps; the low friction and narrow, well-defined scope make it a reliable choice for timestamp serialization and parsing.
Install
pyrfc3339 on PyPI
pip
pip install pyrfc3339uv
uv add pyrfc3339poetry
poetry add pyrfc3339Installing pyRFC3339
Before you install
Low install friction with no runtime dependencies. Actively maintained as of 2026-08-09 with recent release history.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions.
Quickstart
pip install pyRFC3339
from pyrfc3339 import generate, parse
from datetime import datetime, timezone
generate(datetime.now(timezone.utc))
parse('2009-01-01T10:01:02Z')
Requires Python 3.9 or later.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 356 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 15,529,723/month — #1,182 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyrfc3339-2.1.0-py3-none-any.whl
Keywords: rfc-3339, timestamp, iso-8601, datetime
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
rfc3339Formats and parses dates according to RFC 3339,…
unclear · top 5,000 on PyPI
tonyg-rfc3339Parses and formats RFC 3339 date-time strings…
unclear · top 15,000 on PyPI
types-pyRFC3339Provides type hints for pyRFC3339, enabling…
permissive · top 15,000 on PyPI
snaptimeSnaptime transforms timestamps using a simple…
unclear · top 15,000 on PyPI
ciso8601Parses ISO 8601 and RFC 3339 date-time strings…
permissive · top 5,000 on PyPI
rfc3161ngImplements RFC3161 cryptographic timestamping,…
permissive · top 15,000 on PyPI
aniso8601Parses ISO 8601 date, time, datetime, duration,…
permissive · top 5,000 on PyPI
strict-rfc3339Converts Unix timestamps to and from RFC3339…
copyleft · top 5,000 on PyPI
PyCampbellCR1000Communicates with Campbell CR1000-type…
copyleft · top 15,000 on PyPI
rfc3161-clientImplements RFC 3161 Time-Stamp Protocol to…
permissive · top 5,000 on PyPI