Skip to main content

json supported easy debugger for python, in files. can also read.

Project description

filewriter 1.0.3

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, FReader, Dict

# creates a file called debug.log and saves into
Writer() << {'allah': 'birdir'}
>>> {"allah": "birdir"}

# reverse operator support: Only for dict
Dict({'allah': 'birdir'}) >> Writer()
>>> {"allah": "birdir"}

# reads from debug.log
test = Reader() 
print test
>>> {'allah': 'birdir'}

# formatted reader
FReader() >> f"Output {readable}"

# delete callback
import os
Writer(callback: lambda filename: os.remove(filename)) >> {'test': 'callback'} # deletes the file

API

filewriter.Writer

Env Name: READABLE_GLOBAL_VARIABLE_NAME Default: readable

Writer(
    filename="debug",
    debug=True,
    json=True,
    callback=None,
)

filewriter.Reader

Env Name: READABLE_GLOBAL_VARIABLE_NAME Default: readable

Reader(
    filename="debug",
    debug=True,
    json=True,
    callback=None,
)

filewriter.FReader

Env Name: READABLE_GLOBAL_VARIABLE_NAME Default: readable

FReader(
    filename="debug",
    debug=True,
    json=True,
    callback=None,
)

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

filewriter-1.0.3.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

filewriter-1.0.3-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file filewriter-1.0.3.tar.gz.

File metadata

  • Download URL: filewriter-1.0.3.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for filewriter-1.0.3.tar.gz
Algorithm Hash digest
SHA256 ca6b0abc340ce8d1fa59821d00ef8a1a7e0ba54726f8a4ea213de97f7c3dd682
MD5 ee48e3a395d6a7636542130e4c137ad2
BLAKE2b-256 23dd5033d53fceb76aa591ae10434d6b1c1d18a6e4333ffe2eca4d13f74222e2

See more details on using hashes here.

File details

Details for the file filewriter-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: filewriter-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for filewriter-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ad893fcb70ec566d740aa38641e6536be869b75c1a57a59126ba9a63ac2d30a4
MD5 749de0a55f85ccf6d292852310e43223
BLAKE2b-256 471c7e1b112582e7bd242276e7f3c5af114e934398bed8945d19ccd6e785382a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page