Skip to content

Commit

Permalink
🚚 Rename to jsonfilelogger
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuDeBuck committed Aug 24, 2021
1 parent cebc45e commit 450ce83
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 📖 A Python json-logger
# 📖 A Python json-filelogger

![Lint code and run tests](https://github.com/ManuDeBuck/python-jsonlogger/workflows/Lint%20code%20and%20run%20tests/badge.svg)
![Lint code and run tests](https://github.com/ManuDeBuck/python-json-filelogger/workflows/Lint%20code%20and%20run%20tests/badge.svg)
[![pypi](https://img.shields.io/pypi/v/jsonlogger?color=%234d84f5&style=flat-square)](https://pypi.org/project/jsonlogger)

A simple way to log data to json-files from within your code.
Expand All @@ -10,15 +10,15 @@ A simple way to log data to json-files from within your code.
You can use the python package manager (`pip`) to install the file-logger:

```bash
pip install jsonlogger
pip install jsonfilelogger
```

## Usage

Create a `LogWriter`:

```python
from jsonlogger.logger import LogWriter
from jsonfilelogger.logger import LogWriter

writer = LogWriter(folder="./", filename="log.json", threshold=10)
```
Expand All @@ -37,7 +37,7 @@ writer.log({"key_int": 1,
Create a `LogReader`:

```python
from jsonlogger.logger import LogReader
from jsonfilelogger.logger import LogReader

reader = LogReader(folder="./", filename="log.json")
```
Expand Down Expand Up @@ -66,7 +66,7 @@ During training one want's to keep an eye on the performance of the progress. To
In another process (e.g. in another Jupyter notebook) it is then possible to read in the data and make amazing visualisations (yay, visualisations!) of how your breakthrough model is performing...

```python
from jsonlogger.logger import LogWriter
from jsonfilelogger.logger import LogWriter

writer = LogWriter.with_datetime(folder="./", threshold=10)

Expand All @@ -83,7 +83,7 @@ writer.flush()
```

```python
from jsonlogger.logger import LogReader
from jsonfilelogger.logger import LogReader
import glob

logs_files = sorted(glob.glob("./[0-9]*.json"))
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
long_description = fh.read()

setuptools.setup(
name="jsonlogger",
name="jsonfilelogger",
version="0.0.1",
author="Manu De Buck",
author_email="[email protected]",
description="A simple json logger for Python",
description="A simple json file logger for Python",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/ManuDeBuck/jsonlogger",
url="https://github.com/ManuDeBuck/python-json-filelogger",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pytest
import glob

from jsonlogger.logger import LogWriter, LogReader
from jsonfilelogger.logger import LogWriter, LogReader


def test_writer_and_reader():
Expand Down

0 comments on commit 450ce83

Please sign in to comment.