https://github.com/mparticle/audience-sdk
Audience schema and SDKs for interacting with mParticle's Audience definitions.
https://github.com/mparticle/audience-sdk
Last synced: 7 months ago
JSON representation
Audience schema and SDKs for interacting with mParticle's Audience definitions.
- Host: GitHub
- URL: https://github.com/mparticle/audience-sdk
- Owner: mParticle
- License: apache-2.0
- Created: 2025-04-16T15:46:17.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-10-24T20:57:27.000Z (7 months ago)
- Last Synced: 2025-10-24T22:23:44.149Z (7 months ago)
- Language: TypeScript
- Size: 421 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Audience Schema & SDK
This repository contains tools and specifications for working with audience definitions in a standardized format. It includes TypeScript implementations of the audience schema along with SDKs to help build and validate audience definitions.
## Overview
The audience schema provides a structured way to define target audiences through a combination of user attributes, events, and logical conditions. The TypeScript implementation offers type-safe ways to construct and validate these audience definitions.
## Components
### JSON Schema
The `schema` folder contains models defined in the Json Schema format.
### TypeScript Schema
Located in `sdk/typescript-schema`, this package contains the core TypeScript types and interfaces that define the audience schema format. It provides the foundational types used by the SDK.
### TypeScript SDK
Located in `sdk/typescript`, this is a full-featured SDK that provides builders and utilities for working with audience definitions. It includes:
- Builder classes for constructing audience definitions
- Expression factories for creating complex queries
- Model factories for creating different types of models
- Validation utilities
- Serialization/deserialization helpers
### Python SDK
Command to install package tagged as `v0.1.0` directly from github
```sh
pip install git+ssh://git@github.com/mParticle/audience-sdk.git@v0.1.0#subdirectory=sdk/python
```
uninstall
```sh
pip uninstall mp_audience_sdk
```
update models
1. `pip install -r sdk/python/requirements-dev.txt`
2. `make generate-python-models`
3. increment version in `sdk/python/pyproject.toml`
4. Merge and push
5. Tag new release
```sh
git tag v0.1.0 -m "Python SDK 0.1.0"
git push v0.1.0
```
## Getting Started
### Installation
For the TypeScript SDK: