Skip to main content

Essentials for our TKS projects.

Project description

tks-essentials

A library with essentials needed in every backend python app. e.g. logging, local db connection, filtering, formatting etc.

Sponsors

Freya Alpha, The Kára System, Spark & Hale Robotic Industries

General

Run and compiled for Python 3.9.13. Expected to run for Python 3+

Development

Testing

run tests with pytest -s -vv to see all the details.

Installation as Consuming Developer

Simply run: pip install tks-essentials

Import in modules without the dash (e.g.): from tksessentials.globallogger import GlobalLogger

Setup as Contributor

Create the virtul environment:

py -m venv .venv

Start the Environment:

./.venv/Scripts/activate

(or allow VS Code to start it). Use deactivateto stop it.

All the required libraries must be listed in requirements.txt and installed by

python -m pip install -r .\requirements.txt

For Dev use

python -m pip install -r .\requirements-dev.txt

To cleanup the environment run:

pip3 freeze > to-uninstall.txt

and then

pip3 uninstall -y -r to-uninstall.txt

or

pip3 install pip-autoremove

Testing

Before running the tests, make sure that the utils.py can find the root directory. Either set the PROJECT_ROOT environement variable to the root directory, or simply create a config or a logs directory within the project root. Then run the pytests.

Build Library

Prerequisite: make sure that you give your Operating System user the right to modify files in the python directory. The directory where pyhton is installed. Use python setup.py bdist_wheel to create the dist, build and .eggs folder.

Reference from a different project

In order to use your own version of the project - to maybe contribute to the library - simply clone the code from github into new directory. Then add the path of that new directory to the requirements.txt file of your project. Then change in tks-essentials whatever you recommend to improve. Don't forget the Open-Closed Principle: extend only (unless it requires a breaking change)

Releasing a new version / CICD Process

This is entirely executed with Github Actions.

Visual Studio Code --> GitHub Actions --> Build within Github Actions --> Uploaded by Github Actions to pypi.org.

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

tks_essentials-0.1.8.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

tks_essentials-0.1.8-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file tks_essentials-0.1.8.tar.gz.

File metadata

  • Download URL: tks_essentials-0.1.8.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for tks_essentials-0.1.8.tar.gz
Algorithm Hash digest
SHA256 24bd9f72562f7ae8e03f5d74cc6c24ca636357c24d71d79daaaa9105ed10d007
MD5 42bf1b78294bc4eaeb357867a700729a
BLAKE2b-256 f849e310d963f63d304a811360a9688e57767134b8e69905acf720b1a83376c3

See more details on using hashes here.

File details

Details for the file tks_essentials-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for tks_essentials-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2e078b3d46af568f83911ccda11ccc8d45873461dadc1856c4c08b0352e36a4d
MD5 8e41629aee97146b5366ae258ffcae9b
BLAKE2b-256 5f6f786a19c2cebc8753084a2b7c7e2a6f0785acd787d3609bc64bc555a9859f

See more details on using hashes here.

Supported by

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