Skip to main content

MediaPlanPy v3.0.11

Open source Python SDK providing the foundational tools developers need to build, manage, and analyze media plans based on our open data standard (mediaplanschema).

Latest Release: v3.0.11 - View Changelog

MediaPlanPy is the official Python implementation of the MediaPlan Schema standard. The two repositories work together:

  • mediaplanschema - Defines the open data standard for media plans
  • mediaplanpy - Python SDK that fully conforms to and implements the mediaplanschema standard

MediaPlanPy handles schema validation, versioning, and migration to ensure full compliance with the MediaPlan Schema specification.

Key Features

  • Schema v3.0 Support - Full implementation of the latest schema with enhanced targeting, formulas, and 40 more fields
  • Multi-Format Support - Work with JSON, Excel, and Parquet files seamlessly
  • Formula System - Dynamic metric calculations with multiple formula types and support for dependencies
  • Schema Versioning & Migration - Automatic version detection and v2.0 → v3.0 workspace upgrade utility
  • Flexible Storage - Local filesystem, S3 and PostgreSQL backends
  • Workspace Management - Multi-environment support with isolated configurations and strict version enforcement
  • Lifecycle Management - Archive, restore and delete media plans, or a whole campaign at once (a campaign cascade over its plans, since campaigns are derived from their plans rather than stored separately)
  • Excel Integration - Formula-aware import/export with automatic coefficient calculation
  • CLI Interface - Comprehensive command-line tools for workspace management and operations
  • Schema Access - Serve the bundled JSON Schemas as self-contained documents, with generated examples, so plans can be authored from scratch rather than copied from an existing file
  • Validation Framework - Schema-based validation with detailed error reporting
  • Analytics Ready - Built-in Parquet generation and SQL query capabilities
  • Database Integration - Automatic PostgreSQL synchronization for analytics with enhanced schema migration

Documentation

Schema Compliance & Version Support

MediaPlanPy fully implements the MediaPlan Schema standard:

  • Schema v3.0 - Full support for current production specification with target audiences/locations arrays, metric formulas, and 40 more fields
  • Validation - Comprehensive schema validation with detailed error reporting
  • Extensibility - Support for custom fields, dimensions, and properties at meta, campaign, and lineitem levels

Important Version Notes

SDK v3.0.x (Current):

  • ✅ Only supports workspaces using schema v3.0
  • ✅ Provides CLI-based migration utility to upgrade v2.0 workspaces to v3.0
  • ✅ Automatic backups before migration
  • ⚠️ Cannot load v2.0 workspaces directly - migration required

SDK v2.0.7 (Previous):

  • ✅ Continue using this version to work with existing v2.0 workspaces
  • ⚠️ Does not support v3.0 schema features

Migration Path: Use the CLI command mediaplanpy workspace upgrade to migrate v2.0 workspaces to v3.0. See the Migration Guide for step-by-step instructions.

Requirements

  • Python: 3.8 or higher
  • Core Dependencies:
    • pydantic>=1.10.0 - Data validation
    • pandas>=1.5.0 - Data manipulation
  • Optional Dependencies:
    • openpyxl>=3.0.0 - Excel support
    • psycopg2-binary>=2.9.0 - PostgreSQL integration
    • pyarrow>=10.0.0 - Parquet support
    • duckdb>=0.8.0 - Advanced analytics

🏷️ Version Information

  • SDK Version: 3.0.11
  • Schema Version: 3.0 (v2.0 migration utility included)
  • Python Support: 3.8, 3.9, 3.10, 3.11, 3.12

License

This project is licensed under the MIT License - see the LICENSE file for details.


Contact & Support

For questions, support, or to learn more about commercial offerings:

Metadata

Release files for mediaplanpy 3.0.11

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

Source distribution (sdist)

Source distribution for mediaplanpy 3.0.11
File Size Uploaded Provenance Actions
mediaplanpy-3.0.11.tar.gz 227.9 kB Without provenance Details for mediaplanpy-3.0.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mediaplanpy 3.0.11
File Interpreter ABI Platform Actions
mediaplanpy-3.0.11-py3-none-any.whl Python 3 none any Details for mediaplanpy-3.0.11-py3-none-any.whl

Total release size: 485.8 kB

Release files / mediaplanpy-3.0.11.tar.gz

Download URL mediaplanpy-3.0.11.tar.gz
Size 227.9 kB
Tags Source
SHA-256 checksum
How to use checksums
124ecb2ab8bc82d366113e0036a9bbb1053323dacdb631a1f5607a9127de9c11
BLAKE2b-256 checksum
How to use checksums
7c97fc105e7713ac010b489558d5c691242eae4ae6913185211ac12d117600e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Release files / mediaplanpy-3.0.11-py3-none-any.whl

Download URL mediaplanpy-3.0.11-py3-none-any.whl
Size 257.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
403f787136658c9080fd6711768ac981d4725c10786c4a565de1eb22b6a9d363
BLAKE2b-256 checksum
How to use checksums
e7e1bf4312838289047c44bc0fac0df0a63108d4fa209469c602d4e9e7ef1896
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Security for mediaplanpy 3.0.11

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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