arche.tools.schema module

class arche.tools.schema.BasicSchema(d: Dict[str, Dict[str, Union[str, bool, int, float, NoneType, List]]])

Bases: object

json()
arche.tools.schema.basic_json_schema(data_source: str, items_numbers: List[int] = None)

Prints a json schema based on the provided job_key and item numbers

Parameters
  • data_source – a collection or job key

  • items_numbers – array of item numbers to create schema from

arche.tools.schema.create_json_schema(source_key: str, item_numbers: Optional[List[int]] = None) → dict
arche.tools.schema.infer_schema(samples)
arche.tools.schema.set_item_no(items_count)

Generate random numbers within items_count range

Returns

Random 4 numbers if items_count > 4 otherwise items numbers