json supported easy debugger for python, in files. can also read.
Project description
filewriter 1.0.0
Hello.
I am an easy debugger which prints into files. I can also read. In case you need me ever.
Simplicity within a certain complexity.
Install
pip install filewriter
Documentation
param: filename
Name of the file. The extension .log
will be added.
Default: debug
ENV name: READABLE_GLOBAL_VARIABLE_NAME
param: debug
If set True, prints what's going on. Default: True
param: json
If set True, it will enable json conversion Default: True
param: callback
If set (a function), the function gets executed with the path of created file. Default: None
Example
from filewriter import Writer, Reader
Writer() >> {'allah': 'birdir'}
# creates a file called debug.log and saves into
>>> {"allah": "birdir"}
test = Reader() # reads from debug.log
print test
>>> {'allah': 'birdir'}
# delete callback
import os
Writer(callback: lambda x: os.remove(x)) >> {'test': 'callback'} # deletes the file
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
filewriter-1.0.0.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for filewriter-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26f1d9eeafd786736f63c9ec79fd0d15e1b74f1d49d9c1697e77f0e12cda6bcb |
|
MD5 | c6259990877c702c737ddd09ef6e990b |
|
BLAKE2b-256 | 0edd55cdf1badee9fb0ad49b75f7d2b98af513950c029cfbfff02694b726c6d7 |