Skip to main content

getKST

A Python package that returns datetime values ​​for the Asia/Seoul region.

PyPI version Python versions License: MIT

Installation

Prerequisites

  • Python (>=3.9)

Install via pip

pip install getKST

Install via uv

uv add getKST

Usage

Note: Default format of getKST is %Y-%m-%d %H:%M:%S as a string.

getKST() always converts to Asia/Seoul time internally before formatting, so the result is identical no matter what timezone the host machine or server is set to (UTC, EST, JST, etc.).

  • Basic Usage

    from getKST import getKST
    
    now = getKST()
    print(now)
    
  • Using other formats

    from getKST import getKST
    
    now = getKST("%Y/%m/%d")  # Year/Month/Date
    now = getKST("%H-%M-%S")  # Hour-Minute-Second
    
  • Converting an existing datetime

    from datetime import datetime, timezone
    from getKST import getKST
    
    utc_now = datetime.now(tz=timezone.utc)
    print(getKST(dt=utc_now))
    
  • Convert string type to datetime type

     from getKST import getKST
     
     KST = getKST().toDatetime()
     
     print(KST) # Will be printed as a datetime type
    

All Python datetime formats are supported.

Change Log

v1.1.1

  • Added usage example of toDatetime() method in README.md

v1.1.0

  • Added KSTString class that extends str, allowing the result of getKST() to be used as both a formatted string and a datetime object
  • Added KSTString.toDatetime() method to retrieve the underlying KST datetime object
  • Changed return type of getKST() from str to KSTString

v1.0.2

  • Added tzdata as a requirement on Windows
  • Added Change Log section at README.md

v1.0.1

v1.0.0

  • Published a package

License

MIT

Metadata

Release files for getKST 1.1.1

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

Source distribution (sdist)

Source distribution for getKST 1.1.1
File Size Uploaded Provenance Actions
getkst-1.1.1.tar.gz 2.8 kB Without provenance Details for getkst-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for getKST 1.1.1
File Interpreter ABI Platform Actions
getkst-1.1.1-py3-none-any.whl Python 3 none any Details for getkst-1.1.1-py3-none-any.whl

Total release size: 6.9 kB

Release files / getkst-1.1.1.tar.gz

Download URL getkst-1.1.1.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7dca971845d0c9a477008f02026a8cd527b1cd0973336e49c483e1bdb5724841
BLAKE2b-256 checksum
How to use checksums
871ed80a106015e3a0401ebcade2f9766d8dafa32306130cf0affcf5d7eaaced
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / getkst-1.1.1-py3-none-any.whl

Download URL getkst-1.1.1-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6bb898add1afc3f58ea59f9d164c5e9c79b99e33fe5806266bde19ad8e1b196
BLAKE2b-256 checksum
How to use checksums
a1efb001266c4780d0b010f81d3bd80117303c75b89576bd116093049c851618
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for getKST 1.1.1

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