Skip to main content

crtime

PyPI PyPI

Get creation time of files for any platform and no external dependencies.

Caveat

Linux requires sudo! There is no way to avoid this, as creation time is not exposed by the kernel.

It uses debugfs to mount the filesystem, as the information is actually contained on most linux platforms.

Speed: because it does one query for a whole directory, it is roughly 1000x faster than any other method (such as the xstat utility that can be found online).

Installation

pip install crtime

Usage

In a shell:

crtime .
# 1552938709\tfile_a.py

In Python

from crtime import get_crtimes_in_dir

for fname, date in get_crtimes_in_dir(".", raise_on_error=True, as_epoch=False):
    print(fname, date)
# file_a.py Mon Mar 18 20:51:18 CET 2019

Release files for crtime 0.0.6

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

Source distribution (sdist)

Source distribution for crtime 0.0.6
File Size Uploaded
crtime-0.0.6.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for crtime 0.0.6
File Interpreter ABI Platform
crtime-0.0.6-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 6.3 kB

Release files / crtime-0.0.6.tar.gz

Download URL crtime-0.0.6.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f7a18fbf729bb6d2ded6ab5fc5888635ce75be99c70c9f6124aa2faa64f79efd
BLAKE2b-256 checksum
How to use checksums
98a8f284eb7b30b88c5edfc01ee49dcd09764c08c5985503aab237615f119821
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0a0

Release files / crtime-0.0.6-py2.py3-none-any.whl

Download URL crtime-0.0.6-py2.py3-none-any.whl
Size 3.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f31f2c80a32c7f06061bc1d671028fffdcfa53240da62ff31ec0525f74d3e628
BLAKE2b-256 checksum
How to use checksums
dc67444b094505bc3333709fa43325123ba048e1c748a1dfcf9d20c7b777246a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0a0

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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