Skip to main content

Tools that are hacky. Obviously.

Project description

hackytools

Hacky Tools, by Hackysack (I'll never get tired of that joke.)

Installation

You can install this package via the command:

pip install hackytools

What do I get?

So far, not much. But I promise that I'm working hard at gathering a bunch of my homemade tools.

For right now, you get a couple of different hacky decorators, a spritesheet/stylesheet generator (mainly for subreddit CSS), and a command line tool (currently, only a single command).

Decorators

@elapsed / @bestof

Two decorators made for quickly timing a function. @elapsed only times the function once, and @bestof defaults to best of 7, but you can specify any number. Here's an example of how to use them.

from hackytools import elapsed, bestof
import time

@elapsed
def fun1():
    time.sleep(.5)
    return

@bestof
def fun2():
    time.sleep(.25)
    return

fun1()
fun2()

# Output
# 'fun1' elapsed: 500.53 ms
# 'fun2' elapsed (best of 7): avg: 250.35 ms | best: 250.28 ms | worst: 250.63 ms

The timing decorator also automatically converts the time returned into a sensible unit, for optimal viewing pleasure.

Command Line Commands

whatsmyip

Use this at the command line to get your public IP address. This is just a convenience command due to me getting tired of having to specifically search "whats my ip ipv4" on Google. If I'm going to do some of the legwork, I may as well make it easy on myself. You can also get your local IP. Simply use it like:

(Example of bash prompt)

$ whatsmyip
$ 123.45.67.89

$ whatsmyip local
$ 192.168.0.69

(Example of cmd prompt)

C:\Users\user\Desktop>whatsmyip
$ 123.45.67.89

C:\Users\user\Desktop>whatsmyip local
$ 192.168.0.69

Spritesheet/stylesheet Generation Tool

spriteit

(Detailed how-to coming soon. Sorry.)

Misc.

You also get a variety of functions to aid you in your hacky coding adventure. (Detailed documentation coming soon. Sorry!)

More

I have more planned. I have a changelog planned, so I don't clutter the README. I have docs planned, to also avoid cluttering the README. Some of these may already be in effect. I don't know, I'm not God. Jeez. (The changelog is in effect, though.)

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

hackytools-0.2.1.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

hackytools-0.2.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file hackytools-0.2.1.tar.gz.

File metadata

  • Download URL: hackytools-0.2.1.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1

File hashes

Hashes for hackytools-0.2.1.tar.gz
Algorithm Hash digest
SHA256 75f2db543282f40e5f16411854600cc53b86506dc578615c4f3eb29f6ca2826e
MD5 ad2d528dc2c91d3101b9da2e08d7fd28
BLAKE2b-256 8d8353a98bbff5a6bb180ae1f2cbde14d153aef12d1bc5d2b15c424f7da30a55

See more details on using hashes here.

File details

Details for the file hackytools-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: hackytools-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1

File hashes

Hashes for hackytools-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 09ea87387012255b927e2c8b7c780e303c7dd42851c729a02f12487b3a2324da
MD5 848f86371994274b0d30e6870edd4e9e
BLAKE2b-256 15d5cae27f590521637391ea1016bee14a862906136396d327729078ae92ac2d

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