diff --git a/README.rst b/README.rst index b03e0d7..f61f890 100644 --- a/README.rst +++ b/README.rst @@ -57,4 +57,5 @@ From source Clone the repo and install using ``setup.py``: .. code-block:: bash + python setup.py diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst index 972dd83..b9f0054 100644 --- a/docs/source/configuration.rst +++ b/docs/source/configuration.rst @@ -1,4 +1,23 @@ Configuration ============= -.. todo:: fill in configuration options +panaetius is fairly easy to configure. There are just a couple of options to be aware of. + +header.py +---------- + +You should set a ``__header__.py`` next to your script or module. + +This ``__header__.py`` should contain a ``__header__`` variable that sets the name of your project/script. + +E.g a ``__header__.py`` for the module ``plex_posters`` would look like: + +.. code-block:: python + + __header__ = 'plex_posters' + +If you are writing a script, simply place this ``__header__.py`` along side your script. Panaetius will pick this up when the script is ran. + +If you are writing a module, you can either place the ``__header__.py`` alongside the script that uses your module. If this is not possible, panaetius will set the default ``__header__`` variable to the name of the virtualenv that the script is activated from. + +If neither of the above aren't possible (say your script is running in a lambda on AWS), then ``__header__`` will be set to the default of ``panaetius``. diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst index 72d6427..a679c37 100644 --- a/docs/source/introduction.rst +++ b/docs/source/introduction.rst @@ -1,4 +1,30 @@ panaetius ========== -tbc +.. image:: https://img.shields.io/readthedocs/panaetius?style=for-the-badge :target: https://panaetius.readthedocs.io/en/latest/?badge=latest + :alt: Documentation Status + +.. image:: https://img.shields.io/github/v/tag/dtomlinson91/panaetius?style=for-the-badge :alt: GitHub tag (latest by date) + +.. image:: https://img.shields.io/github/commit-activity/m/dtomlinson91/panaetius?style=for-the-badge :alt: GitHub commit activity + +.. image:: https://img.shields.io/github/issues/dtomlinson91/panaetius?style=for-the-badge :alt: GitHub issues + +.. image:: https://img.shields.io/github/license/dtomlinson91/panaetius?style=for-the-badge :alt: GitHubtbc + +Python module to gracefully handle a .config file/environment variables for scripts, with built in masking for sensitive options. Provides a Splunk friendly formatted logger instance. + +Usage +------ + +See `panaetius api page` on how to use and import the module. + +.. _panaetius api page: https://panaetius.readthedocs.io/en/latest/modules/panaetius.html + + +Configuration +--------------- + +See `configuration page` on how to configure ``panaetius``. + +.. _configuration page: https://panaetius.readthedocs.io/en/latest/configuration.html diff --git a/pyproject.toml b/pyproject.toml index e85d398..ee252b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "panaetius" version = "1.0.2" -description = "Python module to gracefully handle a .config file/environment variables for scripts, with built in masking for sensitive options. Provides a Splunk friendly logger instance." +description = "Python module to gracefully handle a .config file/environment variables for scripts, with built in masking for sensitive options. Provides a Splunk friendly formatted logger instance." license = "MIT" authors = ["dtomlinson "] readme = "/Users/dtomlinson/git-repos/projects/panaetius/README.rst"