mirror of
https://github.com/dtomlinson91/panaetius.git
synced 2025-12-22 04:55:44 +00:00
updating latest version with up to date documentation
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
panaetius
|
||||
=========
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
panaetius
|
||||
@@ -1,7 +1,7 @@
|
||||
.. include:: ../global.rst
|
||||
|
||||
Config :modname:`panaetius.config`
|
||||
-------------------------------------
|
||||
panaetius.config :modname:`panaetius.config`
|
||||
---------------------------------------------
|
||||
|
||||
.. automodule:: panaetius.config
|
||||
:members:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.. include:: ../global.rst
|
||||
|
||||
Config :modname:`panaetius.config_inst`
|
||||
---------------------------------------
|
||||
panaetius.config_inst :modname:`panaetius.config_inst`
|
||||
--------------------------------------------------------
|
||||
|
||||
.. automodule:: panaetius.config_inst
|
||||
:members:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.. include:: ../global.rst
|
||||
|
||||
Config :modname:`panaetius.db`
|
||||
panaetius.db :modname:`panaetius.db`
|
||||
-------------------------------------
|
||||
|
||||
.. automodule:: panaetius.db
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.. include:: ../global.rst
|
||||
|
||||
Config :modname:`panaetius.header`
|
||||
-------------------------------------
|
||||
panaetius.header :modname:`panaetius.header`
|
||||
---------------------------------------------
|
||||
|
||||
.. automodule:: panaetius.header
|
||||
:members:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.. include:: ../global.rst
|
||||
|
||||
Config :modname:`panaetius.library`
|
||||
-------------------------------------
|
||||
panaetius.library :modname:`panaetius.library`
|
||||
------------------------------------------------
|
||||
|
||||
.. automodule:: panaetius.library
|
||||
:members:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.. include:: ../global.rst
|
||||
|
||||
Config :modname:`panaetius.logging`
|
||||
-------------------------------------
|
||||
panaetius.logging :modname:`panaetius.logging`
|
||||
----------------------------------------------
|
||||
|
||||
.. automodule:: panaetius.logging
|
||||
:members:
|
||||
|
||||
@@ -1,21 +1,66 @@
|
||||
.. include:: ../global.rst
|
||||
|
||||
Config :modname:`panaetius`
|
||||
-------------------------------------
|
||||
*********
|
||||
panaetius
|
||||
*********
|
||||
|
||||
.. automodule:: panaetius
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
API
|
||||
===
|
||||
|
||||
Submodules
|
||||
----------
|
||||
The following is availble by importing the module:
|
||||
|
||||
.. toctree::
|
||||
.. code-block:: python
|
||||
|
||||
panaetius.config
|
||||
panaetius.config_inst
|
||||
panaetius.db
|
||||
panaetius.header
|
||||
panaetius.library
|
||||
panaetius.logging
|
||||
import panaetius
|
||||
|
||||
|
||||
panaetius.CONFIG
|
||||
----------------
|
||||
|
||||
:obj:`panaetius.CONFIG` provides an instance of :class:`panaetius.config.Config`
|
||||
|
||||
|
||||
panaetius.set_config()
|
||||
-----------------------
|
||||
|
||||
Conveniently provides :func:`panaetius.library.set_config`
|
||||
|
||||
Use in your module/script with:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
panaetius.set_config(panaetius.CONFIG, 'aws.secret_key', str, mask=True)
|
||||
|
||||
|
||||
panaetius.CONFIG.aws_secret_key
|
||||
-------------------------------
|
||||
|
||||
Conveniently provides access to all attributes that have been declared with :func:`panaetius.library.set_config`:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
my_secret_key = panaetius.CONFIG.aws_secret_key
|
||||
|
||||
|
||||
panaetius.logger
|
||||
-----------------
|
||||
|
||||
:obj:`panaetius.logger` provides a logger instance already formatted with a nice json output.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
panaetius.logger.info('some logging message')
|
||||
|
||||
This gives a logger output of:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"time": "2020-01-13 23:07:17,913",
|
||||
"file_name": "test.py",
|
||||
"module": "test",
|
||||
"function":"<module>",
|
||||
"line_number": "33",
|
||||
"logging_level":"INFO",
|
||||
"message": "some logging message"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user