Metadata-Version: 2.1
Name: django-log-api
Version: 0.1.2
Summary: Allows download django log file via api
Home-page: https://pypi.org/project/django-log-api
License: MIT
Keywords: django,log,djangorestframework
Author: luocy
Author-email: luocy77@gmail.com
Requires-Python: >=3.6
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: django (>=2.2)
Requires-Dist: djangorestframework (>=3.9.2)
Requires-Dist: tailhead (>=1.0.2)
Project-URL: Repository, https://github.com/Luocy7/django-log-api
Description-Content-Type: text/markdown

## django-log-api

Allows download django log file via api

### Requirements

- django >= 2.2 
- djangorestframework >= 3.9.2 
- [tailhead](https://github.com/GreatFruitOmsk/tailhead) 

### Installation

1. Install package

```shell
pip install django-log-api

# or
poetry add django-log-api
```

2. Add to the INSTALLED_APPS

settings.py

```python
INSTALLED_APPS = [
    ...,
    "log_api",
]
```

3. add to urls.py

```python
path(r"logs/", include("log_api.urls")),
```

4. visit 'http://localhost:8000/logs/download/?name=django&tail=100' 

parameters:
- name: log file name
- tail: if null, download entire log file, others the tail lines number
