Skip to main content

Python SDK for Media Plan Open Data Standard

Project description

MediaPlanPy v3.0.2

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.2 - View Changelog

🔗 Related Projects

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
  • Excel Integration - Formula-aware import/export with automatic coefficient calculation
  • CLI Interface - Comprehensive command-line tools for workspace management and operations
  • 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.2
  • 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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mediaplanpy-3.0.2.tar.gz (208.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mediaplanpy-3.0.2-py3-none-any.whl (239.1 kB view details)

Uploaded Python 3

File details

Details for the file mediaplanpy-3.0.2.tar.gz.

File metadata

  • Download URL: mediaplanpy-3.0.2.tar.gz
  • Upload date:
  • Size: 208.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for mediaplanpy-3.0.2.tar.gz
Algorithm Hash digest
SHA256 ac47c3593a0bd5ff029eccac625fa38f758194a129bc46811928addf5f8a4667
MD5 91f2602a737f40aa44e90e9d902b0c21
BLAKE2b-256 571b1041ed1d60b4fe147a19dac023b3294945105d402d6a0d5af9598f9b68bf

See more details on using hashes here.

File details

Details for the file mediaplanpy-3.0.2-py3-none-any.whl.

File metadata

  • Download URL: mediaplanpy-3.0.2-py3-none-any.whl
  • Upload date:
  • Size: 239.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for mediaplanpy-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 858cd5a1e444521fbb7eb7c4fed2cfafdecc00f954b9070db5e360ebb682d7a7
MD5 8dd68346176e8062e52a3e8a304488d5
BLAKE2b-256 0da7d3256dcc5d349a1bf54eea52c5b7bb8d269a7182bd04945e4d7af697c40f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page