semvec/pypi-packages huggingface dataset:
fourbyfour 0.1.0
Official Fourbyfour SDK for Python
Requires Python: >=3.9
Keywords: fourbyfour, hooks, notifications, sdk, stream

# Fourbyfour Python SDK

Official Python SDK for the Fourbyfour platform.

## Installation

```bash
pip install fourbyfour
```

## Usage

```python
from fourbyfour import Fourbyfour

client = Fourbyfour(api_key="your-api-key")

# Stream
topic = client.stream.topics.create(name="events", partitions=3)
client.stream.topics.produce("events", key="user-1", value={"action": "click"})

# Notifications
client.notifications.send(
    channel="email",
    recipient="user@example.com",
    subject="Hello",
    body="Welcome to Fourbyfour!"
)

# Webhooks
endpoint = client.hooks.create_endpoint(
    url="https://example.com/webhook",
    events=["order.created"]
)
```

## Documentation

See [docs.fourbyfour.dev](https://docs.fourbyfour.dev) for full documentation.
cdef-pil-070126-1936 0.1.0
Parental income loss analysis pipeline.
Requires Python: >=3.9

# Parental Income Loss

## Stacked Event-Study Outputs
The stacked example writes results to:
- `output/stacked_event_study/stacked_results.csv`
- `output/stacked_event_study/stacked_results.parquet`

Each row contains:
- `sample`, `chapter`, `component` (event_time or horizon_*),
- `reference_year`, `target_year`, `event_time`,
- `att`, `se`, `conf_low`, `conf_high`,
- `n_pairs`, `n_treated`, `n_control`, `convergence`,
- `bucket_periods`, `horizon_start`, `horizon_end`, `horizon_label`, `bucket_weight`.

Bucket weighting defaults to treated-weighted (`n_treated`). Override with:
- `STACKED_BUCKET_WEIGHT=pairs`

## Quickstart: Custom Components
- Implement one or more of: `PopulationAssembler`, `CohortSelector`, `ExposureDetector`, `MatchingEngine`.
- Wire them into the pipeline with `CohortWorkflow::with_components`.
- Use `docs/component_contracts.md` to ensure required columns are present.

Example wiring:
```rust
let workflow = CohortWorkflow::with_components(builder, selector, matcher);
let outputs = workflow.run(sources, &detector, &registries, &plan, None)?;
```

## Stacked Event Study CLI
- Run the standalone stacked event-study on a parquet file:
  `cargo run -- --stacked-input path/to/stacked_inputs.parquet --did-outcome perindkialt13`
- Optional flags: `--stacked-samples`, `--stacked-chapter-col`, `--stacked-icd-col`,
  `--stacked-output-dir`, plus the existing `--stacked-*` config flags.

## Docs
- Component contracts: `docs/component_contracts.md`
- Custom component example: `crates/pil/examples/custom_components.rs`
- Custom selector example: `crates/pil/examples/custom_selector.rs`
- Custom matcher example: `crates/pil/examples/custom_matcher.rs`
- Custom detector example: `crates/pil/examples/custom_detector.rs`