nadia.api module

The nadia public api.

class nadia.api.SchemaBuilder(builder_provider)

Bases: object

Class used for building schemas from given specification dict.

Parameters:builder_provider – an object providing builders via get_builder method. Typically an instance of nadia.builder_provider.BuilderProvider.

Build schema from given specification dict.

Parameters:spec (dict) – a dictionary containing specification of the object for which Schema should be build.
Returns:Schema corresponding to the object defined by spec
Return type:marshmallow.Schema
static create()

Create SchemaBuilder.

Return type:nadia.api.SchemaBuilder


This method is designed to be further extended as a factory method. Later it should be able to accept some parameters governing creation of the SchemaBuilder. Currently it creates nadia.api.SchemaBuilder by passing default instance of nadia.builder_provider.BulderProvider to initializer.