A single function to get a nice date-time format
Project description
neattime
This package includes a simple function to create my preferred date-time format for log files.
The date and time are given in the format yyyy-MM-dd_HH-mm-ss_SSSS
Example:
from neattime import neattime
print(neattime())
output:
'2025-02-26_08-34-13_636609'
How I would actually use it:
from neattime import neattime
filepath = f'save_directory/log_{neattime()}'
# some code that saves my logfile
print(f"File saved to {filepath}")
output:
File saved to save_directory/log_2025-02-26_08-34-13_636609
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
neattime-0.0.3.tar.gz
(1.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neattime-0.0.3.tar.gz.
File metadata
- Download URL: neattime-0.0.3.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef3e87890a0d2eed8e4cdfd14fa88914c27edd7f439b79f591f53c3f0012b1e6
|
|
| MD5 |
a3b0b94aad5c9e9decd4a948d656547b
|
|
| BLAKE2b-256 |
eff50cd35c8e9c40e9254cd6076d45b7b80ea320955aa578780021102dcb196d
|
File details
Details for the file neattime-0.0.3-py3-none-any.whl.
File metadata
- Download URL: neattime-0.0.3-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6459f663c8d427ce34a1cb9affc6abd6a250b4c8738b317b2fb64b92f7e4ce13
|
|
| MD5 |
8a453d82527746dd0e5890de199b0ed7
|
|
| BLAKE2b-256 |
c5cc609217c28c3e4eb805935d542a6d6b247cb6a17e01aba6d663edce3eaa85
|