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.)
Metadata
Release files for hackytools 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hackytools-0.2.1.tar.gz | 9.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hackytools-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.5 kB
Release files / hackytools-0.2.1.tar.gz
| Download URL | hackytools-0.2.1.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75f2db543282f40e5f16411854600cc53b86506dc578615c4f3eb29f6ca2826e
|
|
BLAKE2b-256 checksum How to use checksums |
8d8353a98bbff5a6bb180ae1f2cbde14d153aef12d1bc5d2b15c424f7da30a55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / hackytools-0.2.1-py3-none-any.whl
| Download URL | hackytools-0.2.1-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
09ea87387012255b927e2c8b7c780e303c7dd42851c729a02f12487b3a2324da
|
|
BLAKE2b-256 checksum How to use checksums |
15d5cae27f590521637391ea1016bee14a862906136396d327729078ae92ac2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|