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 withpip install maturin)- Optional: use
virtualenvorpyenvfor isolation
🔧 Setup for Local Development
-
Clone the repo and enter the directory:
git clone https://github.com/dvreed77/feature-synth.git cd feature-synth
-
Create a virtual environment (recommended):
python -m venv .venv source .venv/bin/activate
-
Install dependencies & build the native extension:
pip install maturin maturin develop
-
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| feature_synth-0.1.0.tar.gz | 34.9 kB | Without provenance | Details for feature_synth-0.1.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| feature_synth-0.1.0-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details for feature_synth-0.1.0-cp312-cp312-macosx_11_0_arm64.whl |
| feature_synth-0.1.0-cp311-cp311-macosx_11_0_arm64.whl | CPython 3.11 | CPython 3.11 | macOS 11.0+ ARM64 | Details for feature_synth-0.1.0-cp311-cp311-macosx_11_0_arm64.whl |
| feature_synth-0.1.0-cp310-cp310-macosx_11_0_arm64.whl | CPython 3.10 | CPython 3.10 | macOS 11.0+ ARM64 | Details for feature_synth-0.1.0-cp310-cp310-macosx_11_0_arm64.whl |
| feature_synth-0.1.0-cp39-cp39-macosx_11_0_arm64.whl | CPython 3.9 | CPython 3.9 | macOS 11.0+ ARM64 | Details for feature_synth-0.1.0-cp39-cp39-macosx_11_0_arm64.whl |
| feature_synth-0.1.0-cp38-cp38-macosx_11_0_arm64.whl | CPython 3.8 | CPython 3.8 | macOS 11.0+ ARM64 | Details for feature_synth-0.1.0-cp38-cp38-macosx_11_0_arm64.whl |
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
|
Security for feature-synth 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.