tkcommon is a collection of small Python functions and classes for building scripts and internal tools.
Project description
tkcommon
tkcommon is a collection of small Python functions and classes for building scripts and internal tools.
Installation
The package can be installed through pip:
pip install tkcommon
Usage
from tkcommon import get_logger, post_to_slack
from tkcommon import init_config, get_config
from tkcommon import create_jira_issue, update_jira_issue
logger = get_logger(__name__)
logger.info("Test log")
post_to_slack(message="Test slack message")
init_config(from_env=True, json_file="./config.json")
secret = get_config(
"mongo_connection", "mongodb://user:password@localhost:27017/database"
)
issue_fields = {
"project": {"id": 123},
"summary": "New issue from jira-python",
"description": "Look into this one",
"issuetype": {"name": "Bug"},
}
issue = create_jira_issue(issue_fields)
update_issue_fields = {
"summary": "New issue from jira-python",
"description": "Look into this one",
}
issue = update_jira_issue(jira_id="CDMS-1234", fields=update_issue_fields, notify=True)
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
tkcommon-1.0.2.tar.gz
(5.2 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 tkcommon-1.0.2.tar.gz.
File metadata
- Download URL: tkcommon-1.0.2.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f78f8eb62ea7b208760492706a6b46ce637e20fd7fb2ba2e8f3b996e6c0f213d
|
|
| MD5 |
7980bf2a065e9332ba160a9ac2911e5a
|
|
| BLAKE2b-256 |
4e5cf7b3ed7c5e0fc400c3aa37ed3bfcedf489219e0d2632ff497cb34240adb7
|
File details
Details for the file tkcommon-1.0.2-py3-none-any.whl.
File metadata
- Download URL: tkcommon-1.0.2-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83e25d6756c55a44299d1bb5760b061f1cd89cd155b901c16a671cbc10d92df8
|
|
| MD5 |
ca7ccde6b0c1127747170dfb88cee4bb
|
|
| BLAKE2b-256 |
29a86008242f6c957739b8997b9def0ed2a650da1b7a107a5633e03a8f6fcfbd
|