Skip to content

Release v0.1.0: Production-Ready PyPI Package πŸš€

Latest

Choose a tag to compare

@nandkapadia nandkapadia released this 06 Dec 13:35
fe51c28

Release v0.1.0 - Production-Ready PyPI Package πŸš€

This is the first production release of lightweight-charts-pro, a framework-agnostic Python core library for TradingView Lightweight Charts Pro.

πŸ“¦ Installation

pip install lightweight-charts-pro

✨ Features

  • Framework-Agnostic: Works with Streamlit, Flask, Django, FastAPI, Jupyter, and more
  • Comprehensive Data Models: Type-safe classes for all chart types (Line, Area, Candlestick, Bar, Histogram, etc.)
  • Type Safety: Full type hints and validation throughout
  • Robust Testing: 2121 tests with 100% pass rate
  • Clean API: Intuitive, chainable methods for chart configuration

πŸ”₯ Breaking Changes

This release includes breaking changes to improve data integrity and API clarity:

1. Removed Deprecated Time Functions

# ❌ OLD (removed)
from lightweight_charts_pro.utils.data_utils import to_utc_timestamp, from_utc_timestamp
timestamp = to_utc_timestamp("2024-01-01")
iso_string = from_utc_timestamp(1704067200)

# βœ… NEW
from lightweight_charts_pro.utils.data_utils import to_timestamp, from_timestamp
timestamp = to_timestamp("2024-01-01")
iso_string = from_timestamp(1704067200)

2. Removed Deprecated marker_template

# ❌ OLD (removed)
options.marker_template = "Template"

# βœ… NEW
options.entry_marker_template = "Entry Template"
options.exit_marker_template = "Exit Template"

3. NaN Validation Now Raises Errors

NaN values in OHLC/volume data now raise ValueValidationError instead of silently coercing to 0. This prevents data corruption in backtests and PnL calculations.

# Now raises ValueValidationError
data = OhlcData(
    time=1640995200,
    open=float('nan'),  # ❌ Will raise error
    high=100.0,
    low=95.0,
    close=98.0
)

Solution: Clean your data upstream using pandas:

df = df.dropna()  # or df.fillna() or df.ffill()

πŸ“Š Package Statistics

  • Lines of Code: 76 Python modules
  • Test Coverage: 2121 tests passing
  • Python Version: >=3.10
  • Dependencies: pandas>=2.0.0, numpy>=1.24.0
  • Package Size: 203 KB (wheel), 155 KB (sdist)

🎯 What's Next

This package is ready for PyPI publication and production use. Future releases will focus on:

  • Additional chart types and features
  • Performance optimizations
  • Enhanced documentation
  • Community feedback integration

πŸ“š Documentation

πŸ™ Credits

Built with ❀️ using TradingView's Lightweight Charts library.


Full Changelog: 5c7f15f...v0.1.0