2
0
Fork 0
wuttjamaican/docs/index.rst
Lance Edgar 5c3c42d6b3 First commit, basic config (with db) and app handler
this has 100% test coverage and i intend to keep it that way.  api
docs have a good start but still need narrative.  several more things
must be added before i can seriously consider incorporating into
rattail but this seemed a good save point
2023-10-28 17:50:13 -05:00

71 lines
1.5 KiB
ReStructuredText

WuttJamaican
============
aka. Whatcha Makin
This package provides a "base layer" of sorts, for apps built with it.
It mostly is a distillation of certain patterns developed within the
Rattail Project, which are deemed generally useful. (At least,
according to the author.) It roughly corresponds to the "base layer"
as described in the Rattail Manual (see :doc:`rattail-manual:base/index`).
Good documentation and 100% test coverage are priorities for this project.
Much remains to be done, and it may be slow going since I'll be trying
to incorporate this package into the main Rattail package along the
way. So we'll see where this goes...
At this point the main focus is the configuration interface.
Basic Usage
-----------
Install with:
.. code-block:: sh
pip install wuttjamaican
Create a config file, e.g. ``my.conf``:
.. code-block:: ini
[foo]
bar = A
baz = 2
feature = true
In your app, load the config and reference its values as needed::
import wuttjamaican as wj
config = wj.make_config('/path/to/my.conf')
config.get('foo.bar') # returns 'A'
config.get('foo.baz') # returns '2'
config.get_int('foo.baz') # returns 2
config.get('foo.feature') # returns 'true'
config.get_bool('foo.feature') # returns True
Contents
--------
.. toctree::
:maxdepth: 3
api/index
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`