Skip to main content

Span

span_data is a Python library for customer data resolution and unification.

Early release. This package is under active development, and the public API and import paths may change between releases. We expect to follow semantic versioning more strictly after a 1.0 stable baseline; until then, treat upgrades as potentially breaking. Pin a specific version in production and review span_data/packaging_info/CHANGELOG.md before upgrading.

Modules

id_grapher

Identity resolution built on Splink and DuckDB. Links records that refer to the same entity across one or more source datasets and produces a unified ID graph keyed on profile_id.

from span_data.id_grapher import IDGrapher, FieldDefinitionMap, Overrides

Key capabilities:

  • Ingest source data from pandas DataFrames, CSV files, and Snowflake tables or views.
  • Clean and normalise source fields (text, email, phone number).
  • Resolve entities into profile clusters with Splink-based probabilistic matching.
  • Export graph results to DataFrames, CSV, Parquet, DuckDB relations, and Snowflake.
  • Apply manual override workflows for merge, split, and assign operations.
  • Opt-in merge-candidate scoring: dual-run (deterministic + probabilistic Scoring Run) that writes a human review queue (merge_candidates.csv) without auto-merging.

See Span Product Documentation and the in-package guide span_data/packaging_info/USAGE.md (ships with the wheel) for usage examples.

c360_compiler

Customer 360 pipeline built on DuckDB. Driven by a SpanConfig (span_data.io.SpanConfig) via C360Compiler.from_span_config.

from span_data.c360_compiler import C360Compiler
from span_data.io import load_span_config

span_config = load_span_config("span_config.yaml")
compiler = C360Compiler.from_span_config(span_config, app_name="MY_DB")

SpanConfig

Unified configuration for ID Graph and C360. Load from YAML, validate, and run locally with the span-data CLI:

span-data validate-config span_config.yaml
span-data run span_config.yaml --data-dir ./data --output-dir ./out
span-data run span_config.yaml --locations span_locations.yml

--data-dir reads CSVs named {derive_source_name(dataset)}.csv (for example ANALYTICS.SOURCES.CRM_CONTACTS → ANALYTICS_SOURCES_CRM_CONTACTS.csv). --locations maps each dataset and each output to a local file or a bq://project.dataset.table. BigQuery needs pip install 'span_data[gcp]'. A sample image is in examples/bigquery.

from span_data.io import load_span_config
from span_data.io.config.adapters import to_splink_config, to_c360_compiler_config

Key capabilities:

  • Merge customer demographics from multiple dimension sources with configurable waterfall precedence.
  • Compute rolling-window metrics (6-month, 12-month, lifetime) from fact tables.
  • Build a consent fact table with two-tier taxonomy (purpose / medium) and conflict resolution.
  • Generate boolean and categorical customer segments.
  • Enrich fact tables with profile_id and deterministic hash keys.
  • Opt-in ID Graph merge-candidate scoring via id_graph.merge_candidates (local span-data run writes merge_candidates.csv / merge_candidates_detail.csv).

See Span Product Documentation and the in-package guide span_data/packaging_info/USAGE.md (ships with the wheel) for configuration reference and usage.

Python Support

This package supports Python >=3.11 (3.11–3.14), shipped as a cp311-abi3 wheel.

Usage

See Span Product Documentation for usage instructions.

License

This project is licensed under the BSD 3-Clause License. See span_data/packaging_info/LICENSE.

Third-party dependency license information is documented in span_data/packaging_info/THIRD_PARTY_NOTICES.md.

Release history is documented in span_data/packaging_info/CHANGELOG.md.

Metadata

Release files for span-data 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for span-data 0.7.0
File Actions
span_data-0.7.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for span_data-0.7.0-cp311-abi3-win_amd64.whl
span_data-0.7.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 Details for span_data-0.7.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
span_data-0.7.0-cp311-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64, Linux glibc 2.5+ x86-64 Details for span_data-0.7.0-cp311-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
span_data-0.7.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for span_data-0.7.0-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 8.3 MB

Release files / span_data-0.7.0-cp311-abi3-win_amd64.whl

Download URL span_data-0.7.0-cp311-abi3-win_amd64.whl
Size 1.9 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
57817cb2624821549f1fcdf50209be57180c78294652080001fcf1d84186d4f2
BLAKE2b-256 checksum
How to use checksums
99aae2ddd0bed69b21dd58088c7eeec6082ca4012b779bbbb5e1604e8f85d00c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / span_data-0.7.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL span_data-0.7.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 2.2 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
0a3882c88b8d91f09e3ab221ddb45c3bad62a5afc7cb4719d56c37d39d30ba76
BLAKE2b-256 checksum
How to use checksums
9ff54dcce783c10635079593483d882a250560867693d03baaf66d4f11cc0820
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / span_data-0.7.0-cp311-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL span_data-0.7.0-cp311-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 2.3 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 abi3
SHA-256 checksum
How to use checksums
5a1bf85343a643404cca5b85dfd696c7e8b0371e62c65c7204c2f4c3d93f631f
BLAKE2b-256 checksum
How to use checksums
1e5ecd67f2e8a0802e0505588389527ff46b88fd29152c3952fa30b9c2a18fd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / span_data-0.7.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL span_data-0.7.0-cp311-abi3-macosx_11_0_arm64.whl
Size 1.9 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
65b66f46d9ccab025f9014207e673edcedcbbb84dc52c0c32e473d0514b18f75
BLAKE2b-256 checksum
How to use checksums
94009992ce90c12cfb4a26cc5617aa6f359e7e4f8d8f47b1a87fe2bf954e2567
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for span-data 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for span_data-0.7.0-cp311-abi3-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page