Skip to main content

頻繁に利用する処理を集めたライブラリ

Project description

reelib

頻繁に利用する処理を集めたライブラリ

インストール方法

pip install reelib

ライブラリの内容

timestamp

  • 時刻文字列を扱う
from reelib import timestamp

# 現在時刻のタイムスタンプを取得
ts = timestamp.get_timestamp()
# ex) 20191025164844890916

# タイムスタンプをdatetimeに変換
t = timestamp.conv_time_from_timestamp(ts)
# ex) datetime.datetime(2019, 10, 25, 16, 48, 44, 890916, tzinfo=datetime.timezone(datetime.timedelta(0, 32400)))

contjson

  • JSONを扱う
from reelib import contjson

# ファイルからの読み込み
json_obj = load_from_file('test.json')

# ファイルへの書き込み
save_to_file(json_obj, 'test.json')

# JSONを整形して標準出力
print_json(json_obj)

# str型文字列をJSONに変換
json_obj = json_from_str('{"a":2, "b":3}')

# JSONをstr型文字列に変換
json_text = json_to_str(json_obj)

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

reelib-1.1.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

reelib-1.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file reelib-1.1.0.tar.gz.

File metadata

  • Download URL: reelib-1.1.0.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.9

File hashes

Hashes for reelib-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c8665e3e6311ca24a525ac8f92d61cddab17f7828f4555e43f657e177ba1840b
MD5 8fd2c07a5c0024cb82753c0ae32339df
BLAKE2b-256 7a67a319e8b9d880f808eda3c55a16dfdd7daba4a9f3e058a57ff14d9cfee42f

See more details on using hashes here.

File details

Details for the file reelib-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: reelib-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.9

File hashes

Hashes for reelib-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de44bc47da9cce420b2aa41a8d06e4e06a2b915717866752113c74ee5cbfd66f
MD5 2015fa79598e92105b15f0a2c3086f80
BLAKE2b-256 b401f9a6a7a9be67fde763778e6d529b6ff5431f4389706c43f19dfd0df4c91d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page