A little box of Python tools.
Project description
import pencilcase
pencil
Drop-in debugger that allows you to write code while you debug. ✏️
Pencil it in! Write code by debugging your code. Lines of code are automatically inserted into your file. Clean them up later and voilà!
pencilcase.pencil()
timer
Super simple drop-in profiler. ⏱
Context manager that counts how much time is spent across all executions of the contained code block, storing it in seconds to the specified global variable. Prints out the value of that variable each time it is run.
with pencilcase.timer('weaving_baskets'):
weave_baskets()
Alternatively, apply as a decorator to a function to count time spent in that function.
@pencilcase.timer('weaving_baskets')
def weave_baskets():
...
eraser
This is a totally unnecessary feature, but who has a pencil case without an eraser??
pencilcase.eraser()
microfilm
Pretty-print the given dict as JSON. 🎞
blob = ...
pencilcase.microfilm(blob)
butterfly_net
Context manager that catches all exceptions raised within, doing nothing but printing their lovely exception traces and then letting them be free. 🦋
with pencilcase.butterfly_net():
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pencilcase-0.0.2.tar.gz
.
File metadata
- Download URL: pencilcase-0.0.2.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1c0c0e0e746278e567d08c61389ec9f450202e4925816fcb65f489fbbeee1f8 |
|
MD5 | 02fb9a0ccf1a9d5cdae2a027c2e1ca5a |
|
BLAKE2b-256 | 8e7204b363b4b26b09560da189bc23d23019d7fb018b9c6654547137bba5ca4c |
File details
Details for the file pencilcase-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: pencilcase-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fabacde1bf24853ff641544dba0f27249406b4f8576ac50100861207c7c019c |
|
MD5 | 961ddbc66863ddfe0a8b7d2b3d9f5294 |
|
BLAKE2b-256 | b2d6084f645e35c13621703fbd9f9b49e88e6e0ab6c899607db98d39cadb152d |