Installation

Python version

Audoma supports and was tested for the following versions of python:
  • python 3.7

  • python 3.8

  • python 3.9

Dependencies

These distributions will be installed automatically when installing audoma (if you don’t have them installed already):

Install Audoma

Using pip:

$ pip install audoma

Audoma initial configuration

After successful installation, set AudomaAutoSchema as a default schema class for your Django Rest Framework project:

REST_FRAMEWORK = {
    # YOUR SETTINGS
    'DEFAULT_SCHEMA_CLASS': 'audoma.drf.openapi.AudomaAutoSchema',
}

Audoma allows you to add path prefixes that should be included in schema exclusively. All you need to do is declare a variable SCHEMA_PATTERN_PREFIX` in your project’s settings.py file and add preprocessing function preprocess_include_path_format as preprocessing hook in SPECTACULAR_SETTINGS dictionary` as in the example below.

SCHEMA_PATTERN_PREFIX = 'api'

SPECTACULAR_SETTINGS = {
    ...
    'PREPROCESSING_HOOKS': ['audoma.hooks.preprocess_include_path_format'],
    # OTHER SETTINGS
}