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.1.tar.gz (4.9 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.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tkcommon-1.0.1.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

Hashes for tkcommon-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5132b280d006f700f56e6c059be180f55c2a97c0da48371c693d8fcab7a59bc1
MD5 96a47c10137d0c1c345a31e84754cedd
BLAKE2b-256 92762399919043839f942660cd3527ea715b2020f484cca8ebabb1971e76a80a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tkcommon-1.0.1-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

Hashes for tkcommon-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ba890c78862009694ae83f1340443247ad939c6826bc4b5cce9533babfce2a83
MD5 b67cdf9569788886f007b407192e7392
BLAKE2b-256 0807580d127237e574c968a1f3163ce69f86e82298b90dad233b75c447624619

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