Metadata-Version: 2.4
Name: forthic-py
Version: 0.1.0
Summary: A modern Python runtime for Forthic - a stack-based, concatenative programming language
Project-URL: Homepage, https://forthic.org
Project-URL: Documentation, https://docs.forthic.org/python
Project-URL: Repository, https://github.com/forthic/forthic
Author: Forthic Team
License: BSD-2-Clause
License-File: LICENSE
Keywords: concatenative,forthic,interpreter,runtime,stack-based
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: python-dateutil>=2.8.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: grpcio-tools>=1.60.0; extra == 'dev'
Requires-Dist: grpcio>=1.60.0; extra == 'dev'
Requires-Dist: mypy>=1.5.0; extra == 'dev'
Requires-Dist: openpyxl>=3.1.0; extra == 'dev'
Requires-Dist: pandas>=2.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.4.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Provides-Extra: grpc
Requires-Dist: grpcio-tools>=1.60.0; extra == 'grpc'
Requires-Dist: grpcio>=1.60.0; extra == 'grpc'
Requires-Dist: pyyaml>=6.0; extra == 'grpc'
Provides-Extra: pandas
Requires-Dist: openpyxl>=3.1.0; extra == 'pandas'
Requires-Dist: pandas>=2.0.0; extra == 'pandas'
Description-Content-Type: text/markdown

# Forthic Python Runtime

A Python runtime for Forthic - a stack-based, concatenative programming language.


## Installation (Development)

```bash
cd forthic-py
pip install -e ".[dev]"
```

## Quick Start

```python
import asyncio
from forthic import Interpreter

async def main():
    interp = Interpreter()

    # Push some numbers
    await interp.run("42 3.14 TRUE")

    # Create an array
    await interp.run("[1 2 3]")

    # Define a word
    await interp.run(": DOUBLE 2 * ;")

    # Get the stack
    stack = interp.get_stack()
    print("Stack:", stack.get_items())

asyncio.run(main())
```

## Running Tests

```bash
# Run all tests
pytest

# Run with coverage
pytest --cov=forthic

# Run specific test file
pytest tests/test_tokenizer.py

# Run with verbose output
pytest -v
```

## License

BSD 2-Clause License - See LICENSE file for details
