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
- Quick Start - Get up and running in 5 minutes, computing metrics on your data
Model Fundamentals
- BaseModel - Learn about the base model class, fields, and basic usage
- Field Types - Learn about different field types (Optional, Union, Dict, List)
- Nested Models - Learn about nested model structures
- Path Access - Learn about accessing fields by path notation
Features
- Fill Rate - Measure data completeness by checking which fields are filled vs missing
- Fill Rate Accuracy - Compare field states (filled/missing) between two objects
- Similarity - Compare field values with fuzzy matching and advanced strategies
- Field Specifications - Learn about Spec(), metadata, and field normalizers
- Pre-defined Specs - Learn about KeywordSpec, TextSpec, NumericSpec, and other pre-defined Specs
- List Comparison Strategies - Learn about strategies for comparing list[BaseModel] fields
- Pandas Export - Export results to pandas Series and DataFrames (requires
cobjectric[pandas])
Examples & API
- Examples - Practical examples demonstrating various features
- 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
.fieldsattribute - 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.