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.4.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.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tkcommon-1.0.4.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.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for tkcommon-1.0.4.tar.gz
Algorithm Hash digest
SHA256 6a7fc58337d316b75b15e257ba1273c0e63be365cd577d92f92dcd449067c239
MD5 769f3661ac09ee5d0c04faf818cd3c6c
BLAKE2b-256 156a4d231dca100f6764d06d44763fe27c2fea6cf2ceb1bd75dfac6d5d753a36

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tkcommon-1.0.4-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.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for tkcommon-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2524544006b4f1897450d26c7e0b91a330cf2d1497262ac7b599047f27a164ec
MD5 fd47e6b66ef48222e92d40e4fab88b5c
BLAKE2b-256 68f87b797c66d803d692730a45c9601c69137cfee815f611b888ce851ebf24d3

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