Skip to main content

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.3.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tkcommon-1.0.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file tkcommon-1.0.3.tar.gz.

File metadata

  • Download URL: tkcommon-1.0.3.tar.gz
  • Upload date:
  • Size: 5.4 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

Hashes for tkcommon-1.0.3.tar.gz
Algorithm Hash digest
SHA256 f50e04d0bd63dec1a67cbbe8482d432c29cded61cdb748338a6e4ae8132d7d2d
MD5 ff30692a9e1596b5b3782eeb7e8f93f1
BLAKE2b-256 d86934790bac47dbe3afbe130ec91e14ad20b4c84e9b686021de4551d6e8fd8e

See more details on using hashes here.

File details

Details for the file tkcommon-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: tkcommon-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.1 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

Hashes for tkcommon-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 646ab9cb0c10263c8998aa0e9fb08e06d8144a589d9d5094c07a2525af4690df
MD5 5334aa39b7362c51568f5a6bdf1e684f
BLAKE2b-256 e11c119dd3bfefc05b878b7e086657996ee675a2c2b8518ed6c015185178fd3b

See more details on using hashes here.

Supported by

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