Skip to main content

flake8_datetime_utcnow_plugin

Rationale

Plugin for flake8 to warn the developer of the usage of datetime.utcnow().

The problem with datetme.utcnow() is that indeed returns the current timestamp in the UTC timzone but the object is a naive datetime, that is doesn't have the tzinfo argument set.

Instead [datetime.now()](https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow] should be used passing the UTC timezone:

from datetime import datetime, timezone

datetime.now(timezone.utc)

Installation

To install the plugin and flake8:

pip install flake8_datetime_utcnow_plugin

Metadata

Release files for flake8-datetime-utcnow-plugin 0.1.2

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

Source distribution (sdist)

Source distribution for flake8-datetime-utcnow-plugin 0.1.2
File Size Uploaded Provenance Actions
flake8-datetime-utcnow-plugin-0.1.2.tar.gz 3.2 kB Without provenance Details for flake8-datetime-utcnow-plugin-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flake8-datetime-utcnow-plugin 0.1.2
File Interpreter ABI Platform Actions
flake8_datetime_utcnow_plugin-0.1.2-py3-none-any.whl Python 3 none any Details for flake8_datetime_utcnow_plugin-0.1.2-py3-none-any.whl

Total release size: 7.4 kB

Release files / flake8-datetime-utcnow-plugin-0.1.2.tar.gz

Download URL flake8-datetime-utcnow-plugin-0.1.2.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
724733581a7b4e08a089a738ee69f4ef0fa7450a6ba0e2d01e3367fcfa6b8a82
BLAKE2b-256 checksum
How to use checksums
b44116067fb6fde61aad561aecc31479514913c9691c9dd7d3f5d0ad9ce39799
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / flake8_datetime_utcnow_plugin-0.1.2-py3-none-any.whl

Download URL flake8_datetime_utcnow_plugin-0.1.2-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91b60598643ec2d616949d60913a273b1e963b9eeaf46579bee442a2539640be
BLAKE2b-256 checksum
How to use checksums
15e715070876d9d48870e1957f6cdc81771497ae1ef13f78a223eb43cff206a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Security for flake8-datetime-utcnow-plugin 0.1.2

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.

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