Skip to content

Cobjectric Documentation

Welcome to the Cobjectric documentation. This guide will help you get started with using Cobjectric in your projects.

Table of Contents

Getting Started

  1. Quick Start - Get up and running in 5 minutes, computing metrics on your data

Model Fundamentals

  1. BaseModel - Learn about the base model class, fields, and basic usage
  2. Field Types - Learn about different field types (Optional, Union, Dict, List)
  3. Nested Models - Learn about nested model structures
  4. Path Access - Learn about accessing fields by path notation

Features

  1. Fill Rate - Measure data completeness by checking which fields are filled vs missing
  2. Fill Rate Accuracy - Compare field states (filled/missing) between two objects
  3. Similarity - Compare field values with fuzzy matching and advanced strategies
  4. Field Specifications - Learn about Spec(), metadata, and field normalizers
  5. Pre-defined Specs - Learn about KeywordSpec, TextSpec, NumericSpec, and other pre-defined Specs
  6. List Comparison Strategies - Learn about strategies for comparing list[BaseModel] fields
  7. Pandas Export - Export results to pandas Series and DataFrames (requires cobjectric[pandas])

Examples & API

  1. Examples - Practical examples demonstrating various features
  2. API Reference - Complete API documentation of all classes and functions

Overview

Cobjectric is a Python library for defining and managing complex object models with typed fields. It provides a clean, intuitive API for defining models and accessing their fields.

Key Features

  • Typed Fields: Define fields with type annotations
  • Type Validation: Fields with invalid types are marked as missing
  • Readonly Access: Model instances are immutable after creation
  • Easy Field Access: Access fields via .fields attribute
  • Nested Models: Support for complex nested structures
  • Fill Rate: Measure data completeness and quality
  • Similarity: Compare models and compute similarity scores
  • Path Access: Access nested fields using path notation
  • Pandas Export: Export results to pandas Series and DataFrames for analysis

Getting Started

To get started, see the Quick Start Guide.