Skip to main content

Personal utils package for Python projects

Project description

Personal utils package for Python projects.


Improve Library

If you get an error or need something to improve, write Issues.


Installation

pip install edenpy

Usage

Import

from edenpy import save_json, Logger

(1) File Load and Save

from edenpy import save_json

data = [1, 2, [3, 4], {5: 'a', 6: 'b'}]
path = "./data.json"

save_json(data, path)

data.json

[
	1,
	2,
	[
		3,
		4
	],
	{
		"5": "a",
		"6": "b"
	}
]

(2) Logger

When you run a file using logger like test.py, log is written to log.log. The log records the time, log level, file name, code line, log message.

test.py

from edenpy import Logger

logger = Logger().logger
logger.info("logger info test")
logger.error("logger error test")

log.log

[2020-05-26 09:54:23,182][    INFO][        test.py][   4]	>>	logger info test
[2020-05-26 09:54:23,182][   ERROR][        test.py][   5]	>>	logger error test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

edenpy-0.5.6-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file edenpy-0.5.6-py3-none-any.whl.

File metadata

  • Download URL: edenpy-0.5.6-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for edenpy-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 89b9a0151ebba7b0aa0ec127a2d7bfc7b7fbe2df7a2401f7bf5a895b6b511bd2
MD5 a77049adf79e40addd0db5112d2ba58b
BLAKE2b-256 b8b70843e09700a13fc245ba529b839e4e59c057377b98efda4c025f7ca0b72b

See more details on using hashes here.

Supported by

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