Skip to content

Commit

Permalink
Adding information about TOML configuration options.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pat Daburu committed Feb 12, 2019
1 parent a67ba22 commit f2a265b
Showing 1 changed file with 51 additions and 2 deletions.
53 changes: 51 additions & 2 deletions docs/source/flask.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ When we built this library we figured you just might want to use it in your
`Flask <http://flask.pocoo.org/>`_ applications. With that in mind we've provided a
few conveniences.

.. _elastalk_flask_config_from_objects:

Configuration from Objects
--------------------------

Expand All @@ -32,8 +34,8 @@ Like the Flask configuration object, this configuration object supports a method
:py:func:`from_object <elastalk.config.ElastalkConf.from_object>` that mirrors the
behavior of the Flask method.

Configuration Options
---------------------
Options
^^^^^^^

This section describes the configuration options you can use when configuring your Elasticsearch
settings from an object.
Expand Down Expand Up @@ -76,5 +78,52 @@ settings from an object.



Configuration from TOML
-----------------------

In addition to :ref:`configuring from objects <elastalk_flask_config_from_objects>`, you can also
configure `elastalk` connections using `TOML <https://pypi.org/project/toml/>`_.

TOML aims to be a minimal configuration file format that's easy to read due to obvious
semantics. TOML is designed to map unambiguously to a
`hash table <https://en.wikipedia.org/wiki/Hash_table>`_.

-- the TOML project's `README.md <https://github.com/toml-lang/toml>`_

A Sample TOML Configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: ini
[blobs]
excluded = ["owner_", "group_"]
[indexes.cats]
mappings = "cats/mappings.json"
[indexes.dogs.blobs]
enabled = True
excluded = ["name", "breed"]
Options
^^^^^^^

blobs
=====

This section contains global configuration options that control how, when, and which data is
converted to binary representations (*"BLOBS"*).

:excluded: the names of attributes that are never included in binary representations when a
document is packed using the
:py:func:`ElastalkConnection.pack() <elastalk.connect.ElastalkConnection.pack>`
method

TODO

indexes
=======

TODO


0 comments on commit f2a265b

Please sign in to comment.