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.0.tar.gz
(4.9 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.0.tar.gz.
File metadata
- Download URL: tkcommon-1.0.0.tar.gz
- Upload date:
- Size: 4.9 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 |
701e1a3a4e757019320543a37dee50d8f409297845a84416c3101796e2d1b3ed
|
|
| MD5 |
b2743b9bbecfef46e2260492e319bd64
|
|
| BLAKE2b-256 |
26ef41f575cbc03f87534b2b6e38ccb46194d088cbc55894055bd7be4fe4866e
|
File details
Details for the file tkcommon-1.0.0-py3-none-any.whl.
File metadata
- Download URL: tkcommon-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.7 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 |
6d85d96cfe773cbe5592aa393c5dfdadcebd7fdb8913df02153c499cb4fde15d
|
|
| MD5 |
25a710c4b73edc0c36f5daa9eeac8ece
|
|
| BLAKE2b-256 |
2b11bfa19a38e41f6a074ed78ed24a9e8680778c87a6003888bc520485c65c42
|