---
title: prefactor_core.config module
editUrl: true
head: []
template: doc
sidebar:
  hidden: false
  attrs: {}
pagefind: true
draft: false
---

# prefactor_core.config module

Configuration for prefactor-core.

This module contains configuration classes for the prefactor-core SDK.

### *class* prefactor_core.config.PrefactorCoreConfig(\*, http_config: [HttpClientConfig](../../http/reference/prefactor_http.config.md#prefactor_http.config.HttpClientConfig), queue_config: [QueueConfig](#prefactor_core.config.QueueConfig) = <factory>, schema_registry: Any = None)

Bases: `BaseModel`

Complete configuration for PrefactorCoreClient.

#### http_config

Configuration for the HTTP client.

* **Type:**
  [HttpClientConfig](../../http/reference/prefactor_http.md#prefactor_http.HttpClientConfig)

#### queue_config

Configuration for queue processing.

* **Type:**
  [QueueConfig](#prefactor_core.config.QueueConfig)

#### schema_registry

Optional schema registry for aggregating span type definitions.

* **Type:**
  Any

### Example

from prefactor_core.schema_registry import SchemaRegistry
from prefactor_core import PrefactorCoreConfig

registry = SchemaRegistry()
registry.register(“langchain:llm”, {“type”: “object”})

config = PrefactorCoreConfig(
: http_config=HttpClientConfig(…),
  schema_registry=registry

)

#### http_config *: [HttpClientConfig](../../http/reference/prefactor_http.md#prefactor_http.HttpClientConfig)*

#### model_config *= {}*

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

#### queue_config *: [QueueConfig](#prefactor_core.config.QueueConfig)*

#### schema_registry *: Any*

### *class* prefactor_core.config.QueueConfig(, num_workers: Annotated[int, Ge(ge=1), Le(le=20)] = 3, max_retries: Annotated[int, Ge(ge=0)] = 3, retry_delay_base: Annotated[float, Gt(gt=0)] = 1.0)

Bases: `BaseModel`

Configuration for queue processing.

#### num_workers

Number of concurrent worker tasks.

* **Type:**
  int

#### max_retries

Maximum retry attempts per failed operation.

* **Type:**
  int

#### retry_delay_base

Base delay for exponential backoff (seconds).

* **Type:**
  float

#### max_retries *: int*

#### model_config *= {}*

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

#### num_workers *: int*

#### retry_delay_base *: float*