feature-synth


Namefeature-synth JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryPython bindings for the Rust-based feature synthesizer
upload_time2025-07-18 13:40:28
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords data mock generation polars rust
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Feature Synth

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

## Installation

```bash
pip install feature_synth
```

## Usage

```python
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](https://pyo3.rs/) and [maturin](https://github.com/PyO3/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:

   ```bash
   git clone https://github.com/dvreed77/feature-synth.git
   cd feature-synth
   ```

2. **Create a virtual environment** (recommended):

   ```bash
   python -m venv .venv
   source .venv/bin/activate
   ```

3. **Install dependencies & build the native extension**:

   ```bash
   pip install maturin
   maturin develop
   ```

4. **Test in Python**:

   ```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:

```bash
maturin develop
```

In your Python REPL, restart or use:

```python
import importlib
import feature_synth
importlib.reload(feature_synth)
```

---

## ๐Ÿ Packaging & Publishing

To build a wheel:

```bash
maturin build
```

To publish to PyPI:

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

---

## ๐Ÿงช Testing

You can test your Rust code as usual with:

```bash
cargo test
```

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

---

## ๐Ÿ“„ License

MIT


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "feature-synth",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "data, mock, generation, polars, rust",
    "author": null,
    "author_email": "Dave Reed <david.reed.c@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d1/e8/815c3739af64314a467ae3b571e871b6d901764908e57d080c0a6a68f7ce/feature_synth-0.1.0.tar.gz",
    "platform": null,
    "description": "# Feature Synth\n\nPython bindings for the Rust-based feature synthesizer from the Data Pilot project.\n\n## Installation\n\n```bash\npip install feature_synth\n```\n\n## Usage\n\n```python\nfrom feature_synth import PyColumnSchema, PyDataType, PyLogicalType, make_custom_df\n\n# Define schema\nschema = [\n    PyColumnSchema(\n        id=\"0\", \n        name=\"age\", \n        dtype=PyDataType.Int32, \n        logical_type=PyLogicalType.Number\n    ),\n    PyColumnSchema(\n        id=\"1\", \n        name=\"active\", \n        dtype=PyDataType.Boolean, \n        logical_type=PyLogicalType.Boolean\n    ),\n]\n\n# Generate DataFrame\ndf = make_custom_df(schema, rows=100)\nprint(df)\n```\n\n## Features\n\n- **Type-safe data generation** with Rust performance\n- **Polars integration** for efficient data manipulation  \n- **Full type hints** for IDE support\n- **Multiple data types** including numbers, booleans, dates, strings\n- **Logical types** for semantic data generation\n\nThis package uses [PyO3](https://pyo3.rs/) and [maturin](https://github.com/PyO3/maturin) to expose Rust code to Python via a native extension.\n\n---\n\n## \ud83d\ude80 Quick Start (Developers)\n\n### \ud83e\uddf1 Prerequisites\n\n- Python 3.8+\n- Rust toolchain (`cargo`, `rustc`, etc.)\n- `maturin` (install with `pip install maturin`)\n- Optional: use `virtualenv` or `pyenv` for isolation\n\n---\n\n### \ud83d\udd27 Setup for Local Development\n\n1. **Clone the repo** and enter the directory:\n\n   ```bash\n   git clone https://github.com/dvreed77/feature-synth.git\n   cd feature-synth\n   ```\n\n2. **Create a virtual environment** (recommended):\n\n   ```bash\n   python -m venv .venv\n   source .venv/bin/activate\n   ```\n\n3. **Install dependencies & build the native extension**:\n\n   ```bash\n   pip install maturin\n   maturin develop\n   ```\n\n4. **Test in Python**:\n\n   ```python\n   import feature_synth\n   print(feature_synth.add(2, 3))  # should output 5\n   ```\n\n---\n\n## \ud83d\udee0 Project Structure\n\n```\nfeature_synth/\n\u251c\u2500\u2500 Cargo.toml         # Rust crate configuration\n\u251c\u2500\u2500 pyproject.toml     # Python metadata (PEP 621)\n\u251c\u2500\u2500 src/\n\u2502   \u2514\u2500\u2500 lib.rs         # Rust code exposed to Python\n\u2514\u2500\u2500 README.md          # You are here\n```\n\n---\n\n## \ud83d\udd04 Rebuilding after Rust Code Changes\n\nJust re-run:\n\n```bash\nmaturin develop\n```\n\nIn your Python REPL, restart or use:\n\n```python\nimport importlib\nimport feature_synth\nimportlib.reload(feature_synth)\n```\n\n---\n\n## \ud83d\udc0d Packaging & Publishing\n\nTo build a wheel:\n\n```bash\nmaturin build\n```\n\nTo publish to PyPI:\n\n```bash\nmaturin publish --username __token__ --password pypi-<your-token>\n```\n\n---\n\n## \ud83e\uddea Testing\n\nYou can test your Rust code as usual with:\n\n```bash\ncargo test\n```\n\nOr test Python usage by writing Python unit tests in a separate test script.\n\n---\n\n## \ud83d\udcc4 License\n\nMIT\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python bindings for the Rust-based feature synthesizer",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [
        "data",
        " mock",
        " generation",
        " polars",
        " rust"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d1e8815c3739af64314a467ae3b571e871b6d901764908e57d080c0a6a68f7ce",
                "md5": "6a924e2c8e20efb6bcef0a07656d8e2a",
                "sha256": "1b6655bf6999e12259411101a869847c443ce95148c6937060bf6b3aa72cff0c"
            },
            "downloads": -1,
            "filename": "feature_synth-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6a924e2c8e20efb6bcef0a07656d8e2a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 34871,
            "upload_time": "2025-07-18T13:40:28",
            "upload_time_iso_8601": "2025-07-18T13:40:28.047157Z",
            "url": "https://files.pythonhosted.org/packages/d1/e8/815c3739af64314a467ae3b571e871b6d901764908e57d080c0a6a68f7ce/feature_synth-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-18 13:40:28",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "feature-synth"
}
        
Elapsed time: 0.92653s