Metadata-Version: 2.4
Name: pypnf-gregorian09
Version: 0.1.0
Summary: Point and Figure Chart Library - Python bindings
Home-page: https://github.com/gregorian-09/pnf-chart-system
Author: Gregorian Rayne
Author-email: gregorianrayne09@gmail.com
Project-URL: Documentation, https://github.com/gregorian-09/pnf-chart-system/tree/master/docs
Project-URL: API Reference, https://github.com/gregorian-09/pnf-chart-system/blob/master/docs/bindings/python.md
Project-URL: Changelog, https://github.com/gregorian-09/pnf-chart-system/blob/master/CHANGELOG.md
Project-URL: Issues, https://github.com/gregorian-09/pnf-chart-system/issues
Project-URL: Source, https://github.com/gregorian-09/pnf-chart-system
Keywords: point-and-figure,charting,technical-analysis,trading,indicators
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

# pypnf

`pypnf` is the official Python binding for the PnF (Point and Figure) chart engine.

It provides:
- High-performance native chart construction (via C++ core).
- Technical indicators (SMA, Bollinger Bands, RSI, OBV, signals, patterns, support/resistance, congestion).
- A lightweight real-time localhost dashboard server (`pypnf_dashboard`).

## Installation

```bash
pip install pypnf-gregorian09
```

## Quick Start

```python
from datetime import datetime
import pypnf

cfg = pypnf.ChartConfig()
cfg.method = pypnf.ConstructionMethod.HighLow
cfg.box_size_method = pypnf.BoxSizeMethod.Traditional
cfg.reversal = 3

chart = pypnf.Chart(cfg)
chart.add_data(5000.0, 4950.0, 4985.0, datetime.utcnow())
chart.add_data(5030.0, 4995.0, 5020.0, datetime.utcnow())

ind = pypnf.Indicators()
ind.calculate(chart)

print(chart.to_ascii())
print(ind.summary())
```

## Real-Time Dashboard

```python
from pypnf_dashboard import DashboardServer

server = DashboardServer(chart, ind)
server.start("127.0.0.1", 8761)
server.publish()
print(server.url())  # http://127.0.0.1:8761/
```

## Main API Surface

- Core:
  - `Chart`, `ChartConfig`
  - `Box`, `Column`
- Indicators:
  - `Indicators`, `IndicatorConfig`
  - `MovingAverage`, `BollingerBands`, `RSI`, `OnBalanceVolume`
  - `SignalDetector`, `PatternRecognizer`, `SupportResistance`, `CongestionDetector`
- Data and enums:
  - `OHLC`, `Signal`, `Pattern`, `SupportResistanceLevel`, `PriceObjective`, `CongestionZone`
  - `BoxType`, `ColumnType`, `ConstructionMethod`, `BoxSizeMethod`, `SignalType`, `PatternType`
- Utilities:
  - `version()`, `version_major()`, `version_minor()`, `version_patch()`

Full API reference:
- `docs/bindings/python.md`
- `docs/reference/api-symbol-index.md`

## Data Notes

- Timestamps are Unix or datetime values depending on API overload.
- Prices are floating-point values.
- For high/low construction mode, pass real high/low candle data for best results.

## Troubleshooting

- Linux: ensure native shared libraries can be found at runtime.
- If building from source, install CMake and a C++20-capable toolchain.
- Recreate environment after upgrading package major versions.

## Links

- Source: https://github.com/gregorian-09/pnf-chart-system
- Issue tracker: https://github.com/gregorian-09/pnf-chart-system/issues
- Changelog: https://github.com/gregorian-09/pnf-chart-system/blob/master/CHANGELOG.md
- Documentation: https://github.com/gregorian-09/pnf-chart-system/tree/master/docs
