Python utility functions for Tetra Task Scripts
Project description
ts-task-script-utils
Utility functions for Tetra Task Scripts
Installation
pip install ts-task-script-utils
Usage
from task_script_utils.is_number import isnumber
print(isnumber('a'))
Datetime Parser
from task_script_utils.datetime_parser import parse
parse("2004-12-23T12:30 AM +05:30")
parse("2004-12-23T12:30 AM +05:30", <datetime_config>)
parse("2004-12-23T12:30 AM +05:30", <format_list>)
parse("2004-12-23T12:30 AM +05:30", <format_list>, <datetime_config>)
Parse() returns a TSDatetime Object. You can use TSDatetime.tsformat() and TSDatetime.isoformat() to get datetime string. You can also use TSDatetime.datetime to access python datetime object.
You can read more about the datetime parser here.
Test
pipenv install --dev
then
pipenv run python -m pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ts-task-script-utils-1.1.0.tar.gz
(19.9 kB
view hashes)
Built Distribution
Close
Hashes for ts-task-script-utils-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3970edd01c18f17ad0e24b6fc5c68dfa3800cb24dea289773638a76b06cb943d |
|
MD5 | 791a6e91d52656868a6d5aecd26b31ae |
|
BLAKE2b-256 | b4d7a530d5c401f40393fba817b195cedfec0cac6159441544e0f98a6348e4eb |
Close
Hashes for ts_task_script_utils-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d2521dd50ba2490b401e5144271daa108ea2fccffece6bf5c4bde302de04749 |
|
MD5 | dc2ceaae8278e1c7343498035a08e573 |
|
BLAKE2b-256 | c3b7136effa55238c69fa9e9d4969c77eb5381e437e55a86dc2ed53cb837dd00 |