diff --git a/docs-src/webqueue2api Package/Package Structure.md b/docs-src/webqueue2api Package/Package Structure.md new file mode 100644 index 0000000..cd45585 --- /dev/null +++ b/docs-src/webqueue2api Package/Package Structure.md @@ -0,0 +1,25 @@ +## Hierarchy + +The webqueue2api Package consists of four packages in total: + +- `webqueue2api`: The root packages. This contains both the `api` and the `parser` packages as well as global configuration. + - `api`: Contains a [Flask](https://flask.palletsprojects.com/) app that can be used with any WSGI server to host the webqueue2 API and utilities such as authentication code. + - `resources`: Contains [Flask-RESTful](https://flask-restful.readthedocs.io/en/latest/) resources for the webqueue2 API. + - `parser`: Contains parers for a Queue and an Item as well as utilities and custom errors. + +## Configuration +Each package contains package level configuration objects (see: [dataclasses on PyPI](https://pypi.org/project/dataclasses/)) in `config.py` files. All of the configurations are combined into the top level `webqueue2api.config` symbol. + +These configuration objects store default values for each package. Default values can be changed by editing these objects directly or by editing the object values before their use. + +!!! example "Changing the parser's queue directory by editing object values." + ```python + import webqueue2api + + # Load Queue from default directory + ce_queue = Queue("ce") + + # load Queue from modified directory + webqueue2api.config.parser.queue_directory = "/absolute/path" + other_queue = Queue("other") + ``` \ No newline at end of file diff --git a/docs-src/webqueue2api Package/awesome-pages.yaml b/docs-src/webqueue2api Package/awesome-pages.yaml index e502d65..7b85715 100644 --- a/docs-src/webqueue2api Package/awesome-pages.yaml +++ b/docs-src/webqueue2api Package/awesome-pages.yaml @@ -1,4 +1,5 @@ # YAML Configuration for Awesome Pages mkdocs Plugin # See: https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin nav: - - ... \ No newline at end of file + - Getting Started.md + - Package Structure.md \ No newline at end of file