Registry / type-stubs / types-pyrfc3339

types-pyrfc3339

JSON →
library2.0.1.20250825pypypiunverified

types-pyrfc3339 provides high-quality static type annotations (typing stubs) for the pyRFC3339 library. pyRFC3339 itself is a Python library that parses and generates RFC 3339-compliant timestamps using Python's `datetime.datetime` objects. This stub package, currently at version 2.0.1.20250825, is automatically generated and released from the community-driven Typeshed repository, typically with daily updates to keep pace with changes in the runtime library.

pip install types-pyrfc3339
INSTALL
IMPORT
SIG · TYPES-PYRFC3339
T
types-pyrfc3339
type-stubspythonv2.0.1.20250825
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.1.20250825 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

generate
from pyrfc3339_stubs import generate
from pyrfc3339_stubs import generate

This quickstart demonstrates basic usage of the `pyrfc3339` library for generating and parsing RFC 3339 timestamps. With `types-pyrfc3339` installed, a static type checker can verify the correctness of the types used in these operations, catching potential errors before runtime.

import datetime from pyrfc3339 import generate, parse # Get current UTC time to generate an RFC 3339 timestamp now_utc = datetime.datetime.now(datetime.timezone.utc) print(f"Current UTC datetime: {now_utc.isoformat()}") # Generate RFC 3339 timestamp string rfc3339_string = generate(now_utc) print(f"Generated RFC 3339 string: {rfc3339_string}") # Parse an RFC 3339 timestamp string back to a datetime object some_rfc3339_string = "2023-10-27T10:30:00.123456Z" parsed_dt = parse(some_rfc3339_string) print(f"Parsed RFC 3339 string: {parsed_dt}") # The presence of types-pyrfc3339 allows type checkers (e.g., Mypy) to validate arguments: # For example, uncommenting the line below would trigger a type error: # generate("not a datetime object")
Debug
Known issues
gotchaInstalling `types-pyrfc3339` does not install the `pyRFC3339` runtime library itself. You must install `pyRFC3339` separately for your code to execute. `types-pyrfc3339` only provides type information.
fix
Ensure both `pip install pyrfc3339` and `pip install types-pyrfc3339` are run. The stub package alone provides no runnable code.
affects: All versions
gotchaVersion mismatches between `types-pyrfc3339` and `pyRFC3339` can lead to inaccurate type checking. Typeshed stubs are frequently updated, sometimes daily, and may reflect newer versions of the runtime library.
fix
For critical projects, consider pinning both `pyRFC3339` and `types-pyrfc3339` to compatible versions. Regularly update both packages and re-run your type checker.
affects: All versions
gotchaDo not attempt to import symbols directly from `types_pyrfc3339`. The stub package's name on PyPI (`types-pyrfc3339`) is for installation purposes only. Runtime imports should always be from the actual library: `from pyrfc3339 import ...`.
fix
Always use `from pyrfc3339 import generate, parse` (or other symbols) for runtime code. The `types-*` prefix is an installation convention, not an import path.
affects: All versions
Upgrade
Version history
2.0.1.20250825latest on PyPI · released Aug 25, 2025
Audit
Dependencies
pyRFC3339requiredThis package provides type hints for the pyRFC3339 runtime library. pyRFC3339 must be installed separately for the code to run, as types-pyrfc3339 does not include any runtime functionality.
Agent activity
32 hits · last 30 days
node
28
OpenAI (training)
1
Resources
types-pyrfc3339 — pip install types-pyrfc3339 · libregistry