tvkit


Nametvkit JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
Summarytvkit is a Python library that fetches real-time stock data from TradingView, including price, market cap, P/E ratio, ROE, and more for stocks from multiple countries. Easily access and analyze financial metrics for global markets.
upload_time2025-07-30 07:12:59
maintainerNone
docs_urlNone
authorNone
requires_python>=3.13
licenseMIT License Copyright (c) 2025 candythink Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords tradingview stock trading finance api market-data
VCS
bugtrack_url
requirements pydantic websockets httpx polars pandas pyarrow matplotlib seaborn ruff pytest pytest-asyncio
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 📈 tvkit

Modern Python library for TradingView financial data APIs with comprehensive real-time streaming and export capabilities

[![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Async/Await](https://img.shields.io/badge/async-await-green.svg)](https://docs.python.org/3/library/asyncio.html)
[![Type Safety](https://img.shields.io/badge/typed-pydantic-red.svg)](https://pydantic.dev/)
[![Data Processing](https://img.shields.io/badge/powered%20by-polars-orange.svg)](https://pola.rs/)

**tvkit** is a comprehensive Python library for accessing TradingView's financial data APIs. It provides real-time market data streaming, comprehensive stock analysis, and powerful export capabilities with modern async-first architecture.

## ✨ Key Features

- 🚀 **Real-time Data Streaming**: WebSocket-based streaming for live market data
- 📊 **Multi-format Export**: Support for Polars DataFrames, JSON, CSV, and Parquet
- 🔍 **Scanner API**: Advanced stock screening with 100+ financial metrics
- ⚡ **High Performance**: Built with Polars for fast data processing
- 🛡️ **Type Safety**: Full Pydantic validation and type hints
- 🔄 **Async-First**: Modern async/await patterns throughout
- 🌍 **Global Markets**: Support for stocks, crypto, forex, and commodities
- 📈 **Technical Analysis**: Built-in indicators and financial calculations

## 🚀 Quick Start

### Installation

```bash
# Using uv (recommended)
uv add tvkit

# Using pip
pip install tvkit

# For development with pip (alternative to uv)
pip install -r requirements.txt
```

### Real-time Data Streaming

```python
import asyncio
from tvkit.api.chart.ohlcv import OHLCV

async def stream_data():
    async with OHLCV() as client:
        # Stream real-time OHLCV data
        async for bar in client.get_ohlcv("BINANCE:BTCUSDT", interval="1"):
            print(f"BTC: ${bar.close} | Volume: {bar.volume}")

asyncio.run(stream_data())
```

### Data Export & Analysis

```python
import asyncio
from tvkit.api.chart.ohlcv import OHLCV
from tvkit.export import DataExporter, ExportFormat

async def export_analysis():
    # Fetch historical data
    async with OHLCV() as client:
        bars = await client.get_historical_ohlcv(
            "BINANCE:BTCUSDT", 
            interval="60", 
            bars_count=100
        )
    
    # Export to multiple formats
    exporter = DataExporter()
    
    # Export to Polars DataFrame with technical analysis
    df = await exporter.to_polars(bars, add_analysis=True)
    print(f"DataFrame: {len(df)} rows × {len(df.columns)} columns")
    
    # Export to files
    await exporter.to_json(bars, "btc_data.json")
    await exporter.to_csv(bars, "btc_data.csv")

asyncio.run(export_analysis())
```

## 🏗️ Architecture

**tvkit** is built with three main components:

### 1. 📡 Real-Time Chart API (`tvkit.api.chart`)

- **WebSocket Streaming**: Live market data with minimal latency
- **OHLCV Data**: Open, High, Low, Close, Volume with timestamps
- **Quote Data**: Real-time price updates and market information
- **Multiple Symbols**: Stream data from multiple assets simultaneously

```python
from tvkit.api.chart.ohlcv import OHLCV

# Stream multiple symbols
async with OHLCV() as client:
    symbols = ["BINANCE:BTCUSDT", "NASDAQ:AAPL", "FOREX:EURUSD"]
    async for info in client.get_latest_trade_info(symbols):
        print(f"Trade info: {info}")
```

### 2. 🔍 Scanner API (`tvkit.api.scanner`)

- **Advanced Screening**: Filter stocks by 100+ financial metrics
- **Fundamental Data**: P/E ratios, market cap, ROE, dividends, margins
- **Technical Indicators**: RSI, MACD, moving averages, momentum
- **Global Markets**: Stocks from multiple countries and exchanges

```python
from tvkit.api.scanner.model import create_scanner_request, ColumnSets

# Create advanced screening request
request = create_scanner_request(
    columns=ColumnSets.FUNDAMENTALS,
    sort_by="market_cap_basic",
    sort_order="desc",
    range_end=100
)
```

### 3. 💾 Data Export System (`tvkit.export`)

- **Multiple Formats**: Polars DataFrames, JSON, CSV, Parquet
- **Financial Analysis**: Automatic calculation of technical indicators
- **Flexible Configuration**: Customizable export options and metadata
- **High Performance**: Optimized for large datasets

```python
from tvkit.export import DataExporter, ExportConfig, ExportFormat

# Advanced export configuration
config = ExportConfig(
    format=ExportFormat.CSV,
    timestamp_format="iso",
    include_metadata=True,
    options={"delimiter": ";", "include_headers": True}
)

exporter = DataExporter()
result = await exporter.export_ohlcv_data(bars, ExportFormat.CSV, config=config)
```

## 📊 Supported Data Types

### Financial Metrics (Scanner API)

| Category | Examples |
|----------|----------|
| **Price Data** | Current price, change, volume, market cap |
| **Valuation** | P/E ratio, P/B ratio, EV/Revenue, PEG ratio |
| **Profitability** | ROE, ROA, profit margins, EBITDA |
| **Financial Health** | Debt/equity, current ratio, free cash flow |
| **Dividends** | Yield, payout ratio, growth rate |
| **Performance** | YTD, 1Y, 5Y returns, volatility metrics |
| **Technical** | RSI, MACD, moving averages, momentum |

### Market Data (Chart API)

- **OHLCV Bars**: Complete candlestick data with volume
- **Quote Data**: Real-time price feeds and market status
- **Trade Information**: Latest trades, price changes, volumes
- **Multiple Timeframes**: 1m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w, 1M

## 🔧 Advanced Usage

### Custom Financial Analysis

```python
import polars as pl
from tvkit.export import DataExporter

# Get data and convert to Polars DataFrame
exporter = DataExporter()
df = await exporter.to_polars(ohlcv_bars, add_analysis=True)

# Advanced analysis with Polars
analysis_df = df.with_columns([
    # Bollinger Bands
    (pl.col("sma_20") + 2 * pl.col("close").rolling_std(20)).alias("bb_upper"),
    (pl.col("sma_20") - 2 * pl.col("close").rolling_std(20)).alias("bb_lower"),
    
    # Volume analysis
    (pl.col("volume") / pl.col("volume").rolling_mean(10)).alias("volume_ratio"),
    
    # Price momentum
    (pl.col("close") - pl.col("close").shift(5)).alias("momentum_5"),
])

# Export enhanced analysis
analysis_df.write_parquet("enhanced_analysis.parquet")
```

### Error Handling & Retry Logic

```python
import asyncio
from tvkit.api.chart.ohlcv import OHLCV

async def robust_streaming():
    max_retries = 3
    retry_count = 0
    
    while retry_count < max_retries:
        try:
            async with OHLCV() as client:
                async for bar in client.get_ohlcv("BINANCE:BTCUSDT"):
                    print(f"Price: ${bar.close}")
                    
        except Exception as e:
            retry_count += 1
            wait_time = 2 ** retry_count  # Exponential backoff
            print(f"Error: {e}. Retrying in {wait_time}s...")
            await asyncio.sleep(wait_time)
        else:
            break
```

### Multiple Symbol Monitoring

```python
async def monitor_portfolio():
    symbols = [
        "BINANCE:BTCUSDT",    # Cryptocurrency
        "NASDAQ:AAPL",        # US Stock
        "FOREX:EURUSD",       # Forex
        "OANDA:XAUUSD"        # Commodities (Gold)
    ]
    
    async with OHLCV() as client:
        async for trade_info in client.get_latest_trade_info(symbols):
            # Process multi-asset trade information
            print(f"Portfolio update: {trade_info}")
```

## 📦 Dependencies

**tvkit** uses modern, high-performance libraries:

- **[Polars](https://pola.rs/)** (≥1.0.0): Fast DataFrame operations
- **[Pydantic](https://pydantic.dev/)** (≥2.11.7): Data validation and settings
- **[websockets](https://websockets.readthedocs.io/)** (≥13.0): Async WebSocket client
- **[httpx](https://www.python-httpx.org/)** (≥0.28.0): Async HTTP client
- **Python 3.13+**: Modern async/await support

## 🏃‍♂️ Development

### Setup Development Environment

```bash
# Clone repository
git clone https://github.com/lumduan/tvkit.git
cd tvkit

# Install with uv (recommended)
uv sync

# Alternative: Install with pip
pip install -r requirements.txt
pip install mypy>=1.17.0  # For type checking

# Run tests
uv run python -m pytest tests/ -v
# Or with pip: python -m pytest tests/ -v

# Type checking
uv run mypy tvkit/
# Or with pip: mypy tvkit/

# Code formatting
uv run ruff format .
uv run ruff check .
# Or with pip: ruff format . && ruff check .
```

### Running Examples

```bash
# Real-time streaming example
uv run python examples/realtime_streaming_example.py
# Or with pip: python examples/realtime_streaming_example.py

# Export functionality demo
uv run python examples/export_demo.py
# Or with pip: python examples/export_demo.py

# Polars financial analysis
uv run python examples/polars_financial_analysis.py
# Or with pip: python examples/polars_financial_analysis.py
```

## 📖 Documentation

- **[Real-time Streaming Guide](docs/realtime_streaming.md)**: WebSocket streaming documentation
- **[Polars Integration](docs/POLARS_INTEGRATION.md)**: Data processing and analysis
- **[API Reference](https://github.com/lumduan/tvkit#readme)**: Complete API documentation

## 🤝 Contributing

We welcome contributions! Please see our contributing guidelines:

1. **Fork** the repository
2. **Create** a feature branch
3. **Add** tests for new functionality
4. **Ensure** all quality checks pass:

   ```bash
   # With uv
   uv run ruff check . && uv run ruff format . && uv run mypy tvkit/
   uv run python -m pytest tests/ -v
   
   # Or with pip
   ruff check . && ruff format . && mypy tvkit/
   python -m pytest tests/ -v
   ```

5. **Submit** a pull request

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🔗 Links

- **Homepage**: [https://github.com/lumduan/tvkit](https://github.com/lumduan/tvkit)
- **Documentation**: [https://github.com/lumduan/tvkit#readme](https://github.com/lumduan/tvkit#readme)
- **Bug Reports**: [https://github.com/lumduan/tvkit/issues](https://github.com/lumduan/tvkit/issues)
- **PyPI Package**: [https://pypi.org/project/tvkit/](https://pypi.org/project/tvkit/)

## ⭐ Support

If you find **tvkit** useful, please consider giving it a star on GitHub! Your support helps us continue developing and improving the library.

---

Built with ❤️ for the financial data community

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tvkit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.13",
    "maintainer_email": null,
    "keywords": "tradingview, stock, trading, finance, api, market-data",
    "author": null,
    "author_email": "lumduan <b@candythink.com>",
    "download_url": "https://files.pythonhosted.org/packages/ec/93/944ecc7b5524a2e0f4a18c5b6ed5c249d09246daf783a35e94ae9e5403ae/tvkit-0.1.1.tar.gz",
    "platform": null,
    "description": "# \ud83d\udcc8 tvkit\n\nModern Python library for TradingView financial data APIs with comprehensive real-time streaming and export capabilities\n\n[![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Async/Await](https://img.shields.io/badge/async-await-green.svg)](https://docs.python.org/3/library/asyncio.html)\n[![Type Safety](https://img.shields.io/badge/typed-pydantic-red.svg)](https://pydantic.dev/)\n[![Data Processing](https://img.shields.io/badge/powered%20by-polars-orange.svg)](https://pola.rs/)\n\n**tvkit** is a comprehensive Python library for accessing TradingView's financial data APIs. It provides real-time market data streaming, comprehensive stock analysis, and powerful export capabilities with modern async-first architecture.\n\n## \u2728 Key Features\n\n- \ud83d\ude80 **Real-time Data Streaming**: WebSocket-based streaming for live market data\n- \ud83d\udcca **Multi-format Export**: Support for Polars DataFrames, JSON, CSV, and Parquet\n- \ud83d\udd0d **Scanner API**: Advanced stock screening with 100+ financial metrics\n- \u26a1 **High Performance**: Built with Polars for fast data processing\n- \ud83d\udee1\ufe0f **Type Safety**: Full Pydantic validation and type hints\n- \ud83d\udd04 **Async-First**: Modern async/await patterns throughout\n- \ud83c\udf0d **Global Markets**: Support for stocks, crypto, forex, and commodities\n- \ud83d\udcc8 **Technical Analysis**: Built-in indicators and financial calculations\n\n## \ud83d\ude80 Quick Start\n\n### Installation\n\n```bash\n# Using uv (recommended)\nuv add tvkit\n\n# Using pip\npip install tvkit\n\n# For development with pip (alternative to uv)\npip install -r requirements.txt\n```\n\n### Real-time Data Streaming\n\n```python\nimport asyncio\nfrom tvkit.api.chart.ohlcv import OHLCV\n\nasync def stream_data():\n    async with OHLCV() as client:\n        # Stream real-time OHLCV data\n        async for bar in client.get_ohlcv(\"BINANCE:BTCUSDT\", interval=\"1\"):\n            print(f\"BTC: ${bar.close} | Volume: {bar.volume}\")\n\nasyncio.run(stream_data())\n```\n\n### Data Export & Analysis\n\n```python\nimport asyncio\nfrom tvkit.api.chart.ohlcv import OHLCV\nfrom tvkit.export import DataExporter, ExportFormat\n\nasync def export_analysis():\n    # Fetch historical data\n    async with OHLCV() as client:\n        bars = await client.get_historical_ohlcv(\n            \"BINANCE:BTCUSDT\", \n            interval=\"60\", \n            bars_count=100\n        )\n    \n    # Export to multiple formats\n    exporter = DataExporter()\n    \n    # Export to Polars DataFrame with technical analysis\n    df = await exporter.to_polars(bars, add_analysis=True)\n    print(f\"DataFrame: {len(df)} rows \u00d7 {len(df.columns)} columns\")\n    \n    # Export to files\n    await exporter.to_json(bars, \"btc_data.json\")\n    await exporter.to_csv(bars, \"btc_data.csv\")\n\nasyncio.run(export_analysis())\n```\n\n## \ud83c\udfd7\ufe0f Architecture\n\n**tvkit** is built with three main components:\n\n### 1. \ud83d\udce1 Real-Time Chart API (`tvkit.api.chart`)\n\n- **WebSocket Streaming**: Live market data with minimal latency\n- **OHLCV Data**: Open, High, Low, Close, Volume with timestamps\n- **Quote Data**: Real-time price updates and market information\n- **Multiple Symbols**: Stream data from multiple assets simultaneously\n\n```python\nfrom tvkit.api.chart.ohlcv import OHLCV\n\n# Stream multiple symbols\nasync with OHLCV() as client:\n    symbols = [\"BINANCE:BTCUSDT\", \"NASDAQ:AAPL\", \"FOREX:EURUSD\"]\n    async for info in client.get_latest_trade_info(symbols):\n        print(f\"Trade info: {info}\")\n```\n\n### 2. \ud83d\udd0d Scanner API (`tvkit.api.scanner`)\n\n- **Advanced Screening**: Filter stocks by 100+ financial metrics\n- **Fundamental Data**: P/E ratios, market cap, ROE, dividends, margins\n- **Technical Indicators**: RSI, MACD, moving averages, momentum\n- **Global Markets**: Stocks from multiple countries and exchanges\n\n```python\nfrom tvkit.api.scanner.model import create_scanner_request, ColumnSets\n\n# Create advanced screening request\nrequest = create_scanner_request(\n    columns=ColumnSets.FUNDAMENTALS,\n    sort_by=\"market_cap_basic\",\n    sort_order=\"desc\",\n    range_end=100\n)\n```\n\n### 3. \ud83d\udcbe Data Export System (`tvkit.export`)\n\n- **Multiple Formats**: Polars DataFrames, JSON, CSV, Parquet\n- **Financial Analysis**: Automatic calculation of technical indicators\n- **Flexible Configuration**: Customizable export options and metadata\n- **High Performance**: Optimized for large datasets\n\n```python\nfrom tvkit.export import DataExporter, ExportConfig, ExportFormat\n\n# Advanced export configuration\nconfig = ExportConfig(\n    format=ExportFormat.CSV,\n    timestamp_format=\"iso\",\n    include_metadata=True,\n    options={\"delimiter\": \";\", \"include_headers\": True}\n)\n\nexporter = DataExporter()\nresult = await exporter.export_ohlcv_data(bars, ExportFormat.CSV, config=config)\n```\n\n## \ud83d\udcca Supported Data Types\n\n### Financial Metrics (Scanner API)\n\n| Category | Examples |\n|----------|----------|\n| **Price Data** | Current price, change, volume, market cap |\n| **Valuation** | P/E ratio, P/B ratio, EV/Revenue, PEG ratio |\n| **Profitability** | ROE, ROA, profit margins, EBITDA |\n| **Financial Health** | Debt/equity, current ratio, free cash flow |\n| **Dividends** | Yield, payout ratio, growth rate |\n| **Performance** | YTD, 1Y, 5Y returns, volatility metrics |\n| **Technical** | RSI, MACD, moving averages, momentum |\n\n### Market Data (Chart API)\n\n- **OHLCV Bars**: Complete candlestick data with volume\n- **Quote Data**: Real-time price feeds and market status\n- **Trade Information**: Latest trades, price changes, volumes\n- **Multiple Timeframes**: 1m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w, 1M\n\n## \ud83d\udd27 Advanced Usage\n\n### Custom Financial Analysis\n\n```python\nimport polars as pl\nfrom tvkit.export import DataExporter\n\n# Get data and convert to Polars DataFrame\nexporter = DataExporter()\ndf = await exporter.to_polars(ohlcv_bars, add_analysis=True)\n\n# Advanced analysis with Polars\nanalysis_df = df.with_columns([\n    # Bollinger Bands\n    (pl.col(\"sma_20\") + 2 * pl.col(\"close\").rolling_std(20)).alias(\"bb_upper\"),\n    (pl.col(\"sma_20\") - 2 * pl.col(\"close\").rolling_std(20)).alias(\"bb_lower\"),\n    \n    # Volume analysis\n    (pl.col(\"volume\") / pl.col(\"volume\").rolling_mean(10)).alias(\"volume_ratio\"),\n    \n    # Price momentum\n    (pl.col(\"close\") - pl.col(\"close\").shift(5)).alias(\"momentum_5\"),\n])\n\n# Export enhanced analysis\nanalysis_df.write_parquet(\"enhanced_analysis.parquet\")\n```\n\n### Error Handling & Retry Logic\n\n```python\nimport asyncio\nfrom tvkit.api.chart.ohlcv import OHLCV\n\nasync def robust_streaming():\n    max_retries = 3\n    retry_count = 0\n    \n    while retry_count < max_retries:\n        try:\n            async with OHLCV() as client:\n                async for bar in client.get_ohlcv(\"BINANCE:BTCUSDT\"):\n                    print(f\"Price: ${bar.close}\")\n                    \n        except Exception as e:\n            retry_count += 1\n            wait_time = 2 ** retry_count  # Exponential backoff\n            print(f\"Error: {e}. Retrying in {wait_time}s...\")\n            await asyncio.sleep(wait_time)\n        else:\n            break\n```\n\n### Multiple Symbol Monitoring\n\n```python\nasync def monitor_portfolio():\n    symbols = [\n        \"BINANCE:BTCUSDT\",    # Cryptocurrency\n        \"NASDAQ:AAPL\",        # US Stock\n        \"FOREX:EURUSD\",       # Forex\n        \"OANDA:XAUUSD\"        # Commodities (Gold)\n    ]\n    \n    async with OHLCV() as client:\n        async for trade_info in client.get_latest_trade_info(symbols):\n            # Process multi-asset trade information\n            print(f\"Portfolio update: {trade_info}\")\n```\n\n## \ud83d\udce6 Dependencies\n\n**tvkit** uses modern, high-performance libraries:\n\n- **[Polars](https://pola.rs/)** (\u22651.0.0): Fast DataFrame operations\n- **[Pydantic](https://pydantic.dev/)** (\u22652.11.7): Data validation and settings\n- **[websockets](https://websockets.readthedocs.io/)** (\u226513.0): Async WebSocket client\n- **[httpx](https://www.python-httpx.org/)** (\u22650.28.0): Async HTTP client\n- **Python 3.13+**: Modern async/await support\n\n## \ud83c\udfc3\u200d\u2642\ufe0f Development\n\n### Setup Development Environment\n\n```bash\n# Clone repository\ngit clone https://github.com/lumduan/tvkit.git\ncd tvkit\n\n# Install with uv (recommended)\nuv sync\n\n# Alternative: Install with pip\npip install -r requirements.txt\npip install mypy>=1.17.0  # For type checking\n\n# Run tests\nuv run python -m pytest tests/ -v\n# Or with pip: python -m pytest tests/ -v\n\n# Type checking\nuv run mypy tvkit/\n# Or with pip: mypy tvkit/\n\n# Code formatting\nuv run ruff format .\nuv run ruff check .\n# Or with pip: ruff format . && ruff check .\n```\n\n### Running Examples\n\n```bash\n# Real-time streaming example\nuv run python examples/realtime_streaming_example.py\n# Or with pip: python examples/realtime_streaming_example.py\n\n# Export functionality demo\nuv run python examples/export_demo.py\n# Or with pip: python examples/export_demo.py\n\n# Polars financial analysis\nuv run python examples/polars_financial_analysis.py\n# Or with pip: python examples/polars_financial_analysis.py\n```\n\n## \ud83d\udcd6 Documentation\n\n- **[Real-time Streaming Guide](docs/realtime_streaming.md)**: WebSocket streaming documentation\n- **[Polars Integration](docs/POLARS_INTEGRATION.md)**: Data processing and analysis\n- **[API Reference](https://github.com/lumduan/tvkit#readme)**: Complete API documentation\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Please see our contributing guidelines:\n\n1. **Fork** the repository\n2. **Create** a feature branch\n3. **Add** tests for new functionality\n4. **Ensure** all quality checks pass:\n\n   ```bash\n   # With uv\n   uv run ruff check . && uv run ruff format . && uv run mypy tvkit/\n   uv run python -m pytest tests/ -v\n   \n   # Or with pip\n   ruff check . && ruff format . && mypy tvkit/\n   python -m pytest tests/ -v\n   ```\n\n5. **Submit** a pull request\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\udd17 Links\n\n- **Homepage**: [https://github.com/lumduan/tvkit](https://github.com/lumduan/tvkit)\n- **Documentation**: [https://github.com/lumduan/tvkit#readme](https://github.com/lumduan/tvkit#readme)\n- **Bug Reports**: [https://github.com/lumduan/tvkit/issues](https://github.com/lumduan/tvkit/issues)\n- **PyPI Package**: [https://pypi.org/project/tvkit/](https://pypi.org/project/tvkit/)\n\n## \u2b50 Support\n\nIf you find **tvkit** useful, please consider giving it a star on GitHub! Your support helps us continue developing and improving the library.\n\n---\n\nBuilt with \u2764\ufe0f for the financial data community\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 candythink\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        ",
    "summary": "tvkit is a Python library that fetches real-time stock data from TradingView, including price, market cap, P/E ratio, ROE, and more for stocks from multiple countries. Easily access and analyze financial metrics for global markets.",
    "version": "0.1.1",
    "project_urls": {
        "Bug Reports": "https://github.com/lumduan/tvkit/issues",
        "Documentation": "https://github.com/lumduan/tvkit#readme",
        "Homepage": "https://github.com/lumduan/tvkit",
        "Repository": "https://github.com/lumduan/tvkit"
    },
    "split_keywords": [
        "tradingview",
        " stock",
        " trading",
        " finance",
        " api",
        " market-data"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "82fc647a786f73c319a57afe98069ba20e2afbda1c6dc25be04b7f69cda8e09b",
                "md5": "574361ef36661145c46ad60536cb6d7c",
                "sha256": "80842dcd6e0f40e5d5de6443775a91926d3694c1f4ed2bce0fde497c04c3533b"
            },
            "downloads": -1,
            "filename": "tvkit-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "574361ef36661145c46ad60536cb6d7c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.13",
            "size": 51141,
            "upload_time": "2025-07-30T07:12:57",
            "upload_time_iso_8601": "2025-07-30T07:12:57.116515Z",
            "url": "https://files.pythonhosted.org/packages/82/fc/647a786f73c319a57afe98069ba20e2afbda1c6dc25be04b7f69cda8e09b/tvkit-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ec93944ecc7b5524a2e0f4a18c5b6ed5c249d09246daf783a35e94ae9e5403ae",
                "md5": "72701141758b90d861a9ba72d5bad8aa",
                "sha256": "51b132b270cef5d5484664ba65a4e500536174a34f31bf6e429d6339e4399226"
            },
            "downloads": -1,
            "filename": "tvkit-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "72701141758b90d861a9ba72d5bad8aa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.13",
            "size": 53813,
            "upload_time": "2025-07-30T07:12:59",
            "upload_time_iso_8601": "2025-07-30T07:12:59.266594Z",
            "url": "https://files.pythonhosted.org/packages/ec/93/944ecc7b5524a2e0f4a18c5b6ed5c249d09246daf783a35e94ae9e5403ae/tvkit-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-30 07:12:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lumduan",
    "github_project": "tvkit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "pydantic",
            "specs": [
                [
                    ">=",
                    "2.11.7"
                ]
            ]
        },
        {
            "name": "websockets",
            "specs": [
                [
                    ">=",
                    "13.0"
                ]
            ]
        },
        {
            "name": "httpx",
            "specs": [
                [
                    ">=",
                    "0.28.0"
                ]
            ]
        },
        {
            "name": "polars",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    ">=",
                    "2.3.1"
                ]
            ]
        },
        {
            "name": "pyarrow",
            "specs": [
                [
                    ">=",
                    "21.0.0"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    ">=",
                    "3.10.3"
                ]
            ]
        },
        {
            "name": "seaborn",
            "specs": [
                [
                    ">=",
                    "0.13.2"
                ]
            ]
        },
        {
            "name": "ruff",
            "specs": [
                [
                    ">=",
                    "0.12.4"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "8.0.0"
                ]
            ]
        },
        {
            "name": "pytest-asyncio",
            "specs": [
                [
                    ">=",
                    "0.23.0"
                ]
            ]
        }
    ],
    "lcname": "tvkit"
}
        
Elapsed time: 1.50856s