Skip to main content

tlid

Installation

pip install tlid

Usage:

import tlid

# Get TLID
tlid_str = tlid.get_tlid()
print(tlid_str)  # Outputs: YYMMDDHHMMSS

# Get TLID with milliseconds
tlid_milli = tlid.get_milliseconds()
print(tlid_milli)  # Outputs: YYMMDDHHMMSSmmm

# Get TLID for different time granularities
print(tlid.get_seconds())  # Outputs: YYMMDDHHMMSS
print(tlid.get_minutes())  # Outputs: YYMMDDHHMM
print(tlid.get_hour())     # Outputs: YYMMDDHH
print(tlid.get_day())      # Outputs: YYMMDD
print(tlid.get_month())    # Outputs: YYMM
print(tlid.get_year())     # Outputs: YY

# Check if a string has a TLID
print(tlid.has_tlid('Hello 210101010101 World'))  # Outputs: True

# Extract TLID from a string
print(tlid.extract_tlid('Hello 210101010101 World'))  # Outputs: 210101010101

# Clean a string from its TLID
print(tlid.clean_tlid('Hello 210101010101 World'))  # Outputs: Hello World

# Convert a TLID string to a datetime object
print(tlid.to_date('210101010101'))  # Outputs: 2021-01-01 01:01:01
# pytlid

`pytlid` is a command-line interface for generating time-based identifiers using the `tlid` Python package.



## Usage

To use `pytlid`, simply run the command followed by the desired time unit. The default time unit is minutes if no argument is provided.

```sh
pytlid [unit]

Here are the available units and their corresponding outputs:

  • h: Current hour in YYMMDDHH format
  • s: Current seconds in YYMMDDHHMMSS format
  • ms: Current milliseconds in YYMMDDHHMMSSmmm format
  • m: Current month in YYMM format
  • M: Current month in YYMM format (same as m)
  • y: Current year in YY format
  • d: Current day in YYMMDD format

Examples

To get the current time in minutes:

pytlid

To get the current time in hours:

pytlid h

To get the current time in seconds:

pytlid s

For help:

pytlid --help

This will display the help message for the pytlid command.


Release files for tlid 0.1.17

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

Source distribution (sdist)

Source distribution for tlid 0.1.17
File Size Uploaded
tlid-0.1.17.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tlid 0.1.17
File Interpreter ABI Platform
tlid-0.1.17-py3-none-any.whl Python 3 none any Details

Total release size: 7.6 kB

Release files / tlid-0.1.17.tar.gz

Download URL tlid-0.1.17.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0fc707eecef99d6eb5872ce9e3afffd684beacba4bd260bb73450e5efb8e6dfd
BLAKE2b-256 checksum
How to use checksums
46d4802c6d7a2b2c8e80c541fc0add65a4490ab279b13dfac924358495ea3bac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.14

Release files / tlid-0.1.17-py3-none-any.whl

Download URL tlid-0.1.17-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc48c4fbe63889f1fcd01f4e7891cbd147c26d038b876390466aa71d8fd03259
BLAKE2b-256 checksum
How to use checksums
ffb50d07b4057d4e62c001a164d8eb274dff98aa4d1d0fd37b6d1087f704e5bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.14

Release history Release notifications | RSS feed

This release

0.1.17 This release

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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