GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - hacktoolkit/python-htk-lite: Lightweight convenience utils for Python without any external dependencies.

BranchesTags
Open more actions menu

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
encoders
encoders
 
 
utils
utils
 
 
.gitignore
.gitignore
 
 
.isort.cfg
.isort.cfg
 
 
LICENSE.md
LICENSE.md
 
 
MANIFEST.in
MANIFEST.in
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
VERSION
VERSION
 
 
__init__.py
__init__.py
 
 
settings.py
settings.py
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 

Repository files navigation

HTK Lite for Python

A set of convenience utils for Python requiring no external libs. Some of the best tricks from django-htk, without the bloat and Django dependency.

Features

  1. Debug via Slack using slack_debug and slack_debug_json. The best of println debugging, without the inconvenience of visually fishing for one message out of thousands of log lines.

How To Use This Awesome?

Installation

  1. Install via PIP: pip install htk-lite
  2. (Alternative install via clone) Installe via local clone: clone this repository into a directory named htk (preferred) or htk_lite
    SSH: git clone [email protected]:hacktoolkit/python-htk-lite.git htk
    HTTPS: git clone https://github.com/hacktoolkit/python-htk-lite.git
  3. Create local_settings.py and add your Slack incoming webhook URL to SLACK_WEBHOOK_URL.

Tips on Location of HTK Module

  1. You can place it outside of your app directory tree, and then symlink it inside.
  2. To not be nagged by the presence of the htk directory whenever you do git status, add htk to your .git/info/exclude file (like .gitignore, but only in your local repository, not checked in).

Slack Debug

  1. Example usage in Python Shell
    In [1]: from htk import slack_debug
    
    In [2]: from htk import slack_debug_json
    
    In [3]: slack_debug('This is seriously awesome!')
    Out[3]: <Response [200]>
    
    In [4]: slack_debug('Yeah, no kidding.')
    Out[4]: <Response [200]>
    
    In [5]: slack_debug_json({'A':1,'B':2,'C':3,'X':['foo','bar','baz'],'Z':{'nested_key':'nested_val
       ...: ue'}}),
    Out[5]: (None,)
    
  2. Check your Slack to verify that the message was posted. If not, perhaps your token was wrong, or the Slack integration was disabled. image
    (Alternative link to screenshot above: https://cl.ly/436cfb4383a2)
  3. Profit!

FDebug (FDB)

  1. (Recommended) Create a BASH alias or similar: alias fdb='touch /tmp/fdebug.log; tail -f /tmp/fdebug.log'
    1. In a separate window used for debugging, run fdb to watch the logs roll in.
  2. from htk import fdb
  3. fdb('Not all heroes wear capes')

See Also

  • C# - https://github.com/hacktoolkit/csharp-htk
  • PHP - https://github.com/hacktoolkit/php-htk
  • Python (full) - https://github.com/hacktoolkit/python-htk
  • Python (lite) - https://github.com/hacktoolkit/python-htk-lite
  • Ruby - https://github.com/hacktoolkit/htk-rb

Authors and Maintainers

  • Hacktoolkit
  • Jonathan Tsai

License

MIT. See LICENSE.md

About

Lightweight convenience utils for Python without any external dependencies.

Resources

Readme
MIT license
Activity
Custom properties

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.