
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
An awesome README template to jumpstart your projects!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
This library provides tools for AB Testing, very useful when working with marketing data
To develop on this project, you will need to create a poetry environment with the needed dependencies
poetry install
git clone https://github.com/pablominue/pyabtesting.git
or
pip install abtestools
Import main modules
from abtestools import audience, test
import datetime
import pandas as pd
from abtestools.audiences import Audience
from abtestools.campaign import Campaign
from abtestools.test import Metric
data = pd.read_csv("tests/cookie_cats.txt", delimiter=",")
audience = Audience(
users=data["userid"], group_mapping=dict(zip(data["userid"], data["version"]))
)
campaign = Campaign(
audience=audience,
metrics=[
Metric(name="retention_1", type="discrete"),
Metric(name="retention_7", type="discrete"),
],
date_range=[
datetime.datetime.today() - datetime.timedelta(days=x) for x in range(10)
],
)
def extract_data(date, metric_column: str, convert_bool: bool = True) -> dict:
# Logic for each date calculation should be added here
if convert_bool:
data[metric_column] = data[metric_column].astype(int)
return dict(zip(data["userid"], data[metric_column]))
for res in campaign.backfill(
metric=Metric(name="retention_1", type="discrete"),
extract_data=extract_data,
metric_column="retention_1",
):
print(res)
FAQs
AB Test Framework for Python
We found that abtestools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.