semvec/pypi-packages huggingface dataset:
AmosLogger 0.0.3
Amos Logger

# Amos logger
```text
For easier use of Log
```
## 1. Write logs to different directories
Usage
```python

import logging
from AmosLogger.AmosLogger import AmosLogger

if __name__ == '__main__':
    amos_info_logger = AmosLogger(name='TestLog')
    amos_info_logger.set_logger()
    amos_info_logger.info('Test')

    amos_warn_logger = AmosLogger(name='TestLog')
    amos_warn_logger.set_logger(log_level=logging.WARN)
    amos_warn_logger.warning('Test')

    amos_error_logger = AmosLogger(name='TestLog')
    amos_error_logger.set_logger(log_level=logging.ERROR)
    amos_error_logger.error('Test')
```
```shell
/var/log/TestLog # ls
ERROR  INFO  WARNING

/var/log/TestLog/ERROR # ls
TestLog  TestLog.2023-08-25.log

/var/log/TestLog/ERROR # tailf TestLog
[2023-08-28 09:09:10,127][7335][ERROR]-(main.py:16) - Test
[2023-08-28 09:09:15,128][7389][ERROR]-(main.py:16) - Test
[2023-08-28 09:10:04,423][7770][ERROR]-(main.py:16) - Test
[2023-08-28 09:23:07,312][10550][ERROR]-(main.py:16) - Test
```

## 2. Write all logs to the same file
Usage
```python
from AmosLogger.AmosLogger import AmosLogger

if __name__ == '__main__':
    amos_all_in_one_logger = AmosLogger(name='Test_Log')
    amos_log = amos_all_in_one_logger.set_all_in_one_logger()["logger"]
    amos_log.info("Info log")
    amos_log.warning("Warning log")
    amos_log.error("Error log")

```
```shell
/var/log/Test_Log # tailf Test_Log
[2023-08-28 09:23:07,312][10550][INFO]-(main.py:20) - Info log
[2023-08-28 09:23:07,312][10550][WARNING]-(main.py:21) - Warning log
[2023-08-28 09:23:07,312][10550][ERROR]-(main.py:22) - Error log
```

## 3. Flask Usage
```python
from flask import Flask, Blueprint
from AmosLogger.AmosLogger import AmosLogger

amos_all_in_one_logger = AmosLogger(name='Flask_APP_Log')
amos_handler = amos_all_in_one_logger.set_all_in_one_logger()["handler"]
app = Flask(__name__)

app.logger.addHandler(amos_handler)

my_blueprint = Blueprint('my_blueprint', __name__)

@my_blueprint.route('/')
def index():
    # 在蓝图中使用日志记录器
    app.logger.info('Index page accessed')
    return 'Hello, World!'

# 将蓝图注册到应用程序中
app.register_blueprint(my_blueprint)

if __name__ == '__main__':
    app.run()
```
eia-odin-pkg-rioatmadja2018 0.1.1693189405
Python Wheels to interact with the EIA APIs
Requires Python: >=3.8

# EIA #

Python Wheels to interact with the EIA APIs

### Download Crude Oil / Petrolium Related Data ###

* Prices
* Crude reserves and production
* Refining and processing
* Imports/exports
* Movements
* Stocks
* Consumption/sales

### Dependencies ###
* Compatible with Python 3.8 or greater 

### Developer ###

* Rio Atmadja
* ratmadja@my365.bellevue.edu

### LICENSE ###

MIT License

Copyright (c) 2020 ratmadjads

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
cherrypy-cors 1.7.0
CORS handling as a cherrypy tool.
Requires Python: >=3.8

.. image:: https://img.shields.io/pypi/v/cherrypy-cors.svg
   :target: https://pypi.org/project/cherrypy-cors

.. image:: https://img.shields.io/pypi/pyversions/cherrypy-cors.svg

.. image:: https://github.com/cherrypy/cherrypy-cors/workflows/tests/badge.svg
   :target: https://github.com/cherrypy/cherrypy-cors/actions?query=workflow%3A%22tests%22
   :alt: tests

.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
    :target: https://github.com/astral-sh/ruff
    :alt: Ruff

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/psf/black
   :alt: Code style: Black

.. image:: https://readthedocs.org/projects/cherrypy-cors/badge/?version=latest
   :target: https://cherrypy-cors.readthedocs.io/en/latest/?badge=latest

.. image:: https://img.shields.io/badge/skeleton-2023-informational
   :target: https://blog.jaraco.com/skeleton

CORS support for CherryPy

In a nutshell
=============

In your application, either install the tool globally.

.. code-block:: python

    import cherrypy_cors
    cherrypy_cors.install()

Or add it to your application explicitly.

.. code-block:: python

    import cherrypy_cors
    app = cherrypy.tree.mount(...)
    app.toolboxes['cors'] = cherrypy_cors.tools

Then, enable it in your cherrypy config. For example, to enable it for all
static resources.

.. code-block:: python

    config = {
        '/static': {
            'tools.staticdir.on': True,
            'cors.expose.on': True,
        }
    }

See `simple-example
<https://github.com/yougov/cherrypy-cors/blob/master/simple-example.py>`_
for a runnable example.