filewriter 2.0.2
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
Examples
from filewriter import Writer, Reader, Reverse
# creates a file called debug.log and saves into
Writer() << {'allah': 'birdir'}
>>> {"allah": "birdir"}
# reverse the operator, if that's easier to read
# https://docs.python.org/3/reference/simple_stmts.html#assignment-statements
Reverse({'allah': 'birdir'}) >> Writer()
>>> {"allah": "birdir"}
# reads from debug.log
test = Reader().data
print(test)
>>> {'allah': 'birdir'}
# delete callback
import os
Writer(callback: lambda filename: os.remove(filename)) >> {'test': 'callback'} # deletes the file
API
filewriter.Writer
Writer(
filename="debug",
debug=True,
json=True,
ext="log",
callback=None,
)
filewriter.Reader
Reader(
filename="debug",
debug=True,
ext="log",
json=True,
)
filewriter.Reader().data
Set from file after the initialization
Twitter: @ebsaral
Metadata
Release files for filewriter 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| filewriter-2.0.2.tar.gz | 3.1 kB | Without provenance | Details for filewriter-2.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| filewriter-2.0.2-py3-none-any.whl | Python 3 | none | any | Details for filewriter-2.0.2-py3-none-any.whl |
Total release size: 7.3 kB
Release files / filewriter-2.0.2.tar.gz
| Download URL | filewriter-2.0.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89073713adfb2b566f60f803e189dc76ce753a56ad541a7124d6ea54bd8f3af2
|
|
BLAKE2b-256 checksum How to use checksums |
ed112e6e154f9874c0fc8c18501b465f19e9f3ecdb1157c1a0418a3b8f31ced3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.6
|
Release files / filewriter-2.0.2-py3-none-any.whl
| Download URL | filewriter-2.0.2-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e697f6167c2e6044b60a8e3c79fba640e5ef3e4ae8956f0e3a88529ae3f61764
|
|
BLAKE2b-256 checksum How to use checksums |
20802f8d949c22db149996b97ece89101399cc48b5543cec78778c7c72bf8e7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.6
|
Security for filewriter 2.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.