Skip to main content

Feature Synth

Python bindings for the Rust-based feature synthesizer from the Data Pilot project.

Installation

pip install feature_synth

Usage

from feature_synth import PyColumnSchema, PyDataType, PyLogicalType, make_custom_df

# Define schema
schema = [
    PyColumnSchema(
        id="0", 
        name="age", 
        dtype=PyDataType.Int32, 
        logical_type=PyLogicalType.Number
    ),
    PyColumnSchema(
        id="1", 
        name="active", 
        dtype=PyDataType.Boolean, 
        logical_type=PyLogicalType.Boolean
    ),
]

# Generate DataFrame
df = make_custom_df(schema, rows=100)
print(df)

Features

  • Type-safe data generation with Rust performance
  • Polars integration for efficient data manipulation
  • Full type hints for IDE support
  • Multiple data types including numbers, booleans, dates, strings
  • Logical types for semantic data generation

This package uses PyO3 and maturin to expose Rust code to Python via a native extension.


🚀 Quick Start (Developers)

🧱 Prerequisites

  • Python 3.8+
  • Rust toolchain (cargo, rustc, etc.)
  • maturin (install with pip install maturin)
  • Optional: use virtualenv or pyenv for isolation

🔧 Setup for Local Development

  1. Clone the repo and enter the directory:

    git clone https://github.com/dvreed77/feature-synth.git
    cd feature-synth
    
  2. Create a virtual environment (recommended):

    python -m venv .venv
    source .venv/bin/activate
    
  3. Install dependencies & build the native extension:

    pip install maturin
    maturin develop
    
  4. Test in Python:

    import feature_synth
    print(feature_synth.add(2, 3))  # should output 5
    

🛠 Project Structure

feature_synth/
├── Cargo.toml         # Rust crate configuration
├── pyproject.toml     # Python metadata (PEP 621)
├── src/
│   └── lib.rs         # Rust code exposed to Python
└── README.md          # You are here

🔄 Rebuilding after Rust Code Changes

Just re-run:

maturin develop

In your Python REPL, restart or use:

import importlib
import feature_synth
importlib.reload(feature_synth)

🐍 Packaging & Publishing

To build a wheel:

maturin build

To publish to PyPI:

maturin publish --username __token__ --password pypi-<your-token>

🧪 Testing

You can test your Rust code as usual with:

cargo test

Or test Python usage by writing Python unit tests in a separate test script.


📄 License

MIT

Metadata

Release files for feature-synth 0.1.0

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

Source distribution (sdist)

Source distribution for feature-synth 0.1.0
File Size Uploaded
feature_synth-0.1.0.tar.gz 34.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for feature-synth 0.1.0
File
feature_synth-0.1.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
feature_synth-0.1.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
feature_synth-0.1.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
feature_synth-0.1.0-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details
feature_synth-0.1.0-cp38-cp38-macosx_11_0_arm64.whl CPython 3.8 CPython 3.8 macOS 11.0+ ARM64 Details

Total release size: 22.7 MB

Release files / feature_synth-0.1.0.tar.gz

Download URL feature_synth-0.1.0.tar.gz
Size 34.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1b6655bf6999e12259411101a869847c443ce95148c6937060bf6b3aa72cff0c
BLAKE2b-256 checksum
How to use checksums
d1e8815c3739af64314a467ae3b571e871b6d901764908e57d080c0a6a68f7ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.1

Release files / feature_synth-0.1.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL feature_synth-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Size 4.5 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cf816644e8bb4125bc8b513e93b1826b6714e0bd18debed0aaae9ee6803997ec
BLAKE2b-256 checksum
How to use checksums
9ab113e244d430a148ee169ab51d8f7b45c3d9450450affad96ec68e86643256
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.1

Release files / feature_synth-0.1.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL feature_synth-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Size 4.5 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5b3c93b5cc1f46e3a8575b5fa851379f4640e20b4e16a09c7518d5c3eda35a74
BLAKE2b-256 checksum
How to use checksums
38183a95737490fd85c413f8837c09c59d266e239bf0c4b446180fd949eff930
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.1

Release files / feature_synth-0.1.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL feature_synth-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Size 4.5 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cdad1a55a74f79c406f9d7789a0d41fef1b8f80d4404984c4ece82b5757aef9d
BLAKE2b-256 checksum
How to use checksums
04f8cee228c8d2d6f0ec6859394d6825ca932a6dd4f5c01eacde9799d6b7da81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.1

Release files / feature_synth-0.1.0-cp39-cp39-macosx_11_0_arm64.whl

Download URL feature_synth-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
Size 4.5 MB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b1064e9b05e52e719f7ae86033bada494e1f28c90d2d2d7ef367e67913a0006a
BLAKE2b-256 checksum
How to use checksums
da036fc0205cbcb9d15d74de9f375d2eb9f8df7f365719eaf1c60b63844ab2bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.1

Release files / feature_synth-0.1.0-cp38-cp38-macosx_11_0_arm64.whl

Download URL feature_synth-0.1.0-cp38-cp38-macosx_11_0_arm64.whl
Size 4.5 MB
Tags CPython 3.8 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b3baec7b925c5cdc5058938cfbf86722efc1b1c9a1656fbc30179b4eee05d8b2
BLAKE2b-256 checksum
How to use checksums
082604c151418c2cc74aacd2a1efe2030acca22d3644afcbc65b29b93c51c4aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.1

Release history Release notifications | RSS feed

This release

0.1.0 This release

6 release files

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