tasepy


Nametasepy JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryA comprehensive Python SDK for accessing the Tel Aviv Stock Exchange (TASE) DataWise API
upload_time2025-07-26 14:05:41
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords tase stock-exchange finance api sdk tel-aviv
VCS
bugtrack_url
requirements requests pydantic PyYAML typeguard beautifulsoup4
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TasePy - TASE DataWise API Python SDK

A comprehensive Python SDK for accessing the Tel Aviv Stock Exchange (TASE) DataWise API. Provides typed clients, request builders, and response models for funds and indices data.

## Scope and Limitations

This SDK currently implements the **4 free API endpoints** from TASE DataHub:

- **Funds** - Fund listings, classifications, and exposure data
- **Indices Basic** - Index listings and components  
- **Indices Online** - Real-time index rates and intraday data
- **Securities Basic** - Security listings, company data, and trading information

TASE DataHub offers additional premium API products beyond these free endpoints. For the complete catalog of available APIs and pricing, visit the official [TASE DataHub](https://www.tase.co.il/en/content/products_lobby/datahub).

Future versions of TasePy may expand to include additional endpoints based on community needs and contributions.

## Quick Start

### Installation

```bash
pip install tasepy
```

### Requirements

Valid TASE DataWise API key, can be obtained at [datahub](https://www.tase.co.il/en/content/products_lobby/datahub)

### Basic Usage

```python
import tasepy

# Create a client with default settings
client = tasepy.quick_client()

# Get list of all funds
funds = client.funds.get_list()
print(f"Found {len(funds.results)} funds")

# Get basic indices information
indices = client.indices_basic.get_list()
print(f"Found {len(indices.results)} indices")
```

### API Key Setup

The SDK provides multiple flexible ways to configure your API key:

#### Quick Start (Default)
```python
import tasepy
# Uses TASE_API_KEY environment variable by default
client = tasepy.quick_client()
```

#### All Configuration Options

**1. Direct API Key**
```python
from tasepy.settings import SettingsBuilder
settings = SettingsBuilder().with_apikey(key="your-direct-api-key").build()
client = tasepy.quick_client(settings_instance=settings)
```

**2. Custom Environment Variable**
```python
# You can use any environment variable name you prefer
settings = SettingsBuilder().with_apikey(environment="MY_CUSTOM_API_KEY").build()
client = tasepy.quick_client(settings_instance=settings)
```

**3. YAML File**
```python
settings = SettingsBuilder().with_apikey(file_path="path/to/your/key.yaml").build()
client = tasepy.quick_client(settings_instance=settings)
```

**4. Custom Provider Function**
```python
def get_api_key():
    # Your custom logic to retrieve API key
    return "your-api-key"

settings = SettingsBuilder().with_apikey(key_provider=get_api_key).build()
client = tasepy.quick_client(settings_instance=settings)
```

#### Environment Variable Setup

**Default Environment Variable (TASE_API_KEY)**
```bash
export TASE_API_KEY="your-tase-api-key"
```

**Custom Environment Variable**
```bash
export MY_CUSTOM_API_KEY="your-tase-api-key"
```

#### YAML File Format
Create a YAML file with this structure:
```yaml
key: "your-tase-api-key"
```

### Working with Funds

```python
import tasepy

client = tasepy.quick_client()

# Get all funds
funds = client.funds.get_list()

# Get fund classifications
fund_types = client.funds.get_fund_types()
classifications = client.funds.get_mutual_fund_classifications()

# Get fund exposures and profiles
currency_exposure = client.funds.get_currency_exposure()
share_exposure = client.funds.get_share_exposure()

# Get fund operational data
exchanges = client.funds.get_stock_exchanges()
tax_statuses = client.funds.get_tax_statuses()
```

### Working with Indices

```python
import tasepy

client = tasepy.quick_client()

# Get all indices
indices = client.indices_basic.get_list() 

# Get components of a specific index
components = client.indices_basic.get_components(index_id="your-index-id")
```

## Advanced Usage

### Custom Configuration

```python
from tasepy.settings import SettingsBuilder
from tasepy.client import Client
from tasepy.endpoints.factories.yaml_factory import YAMLFactory
from tasepy.requests_.urls import Endpoints

# Build custom settings
settings = SettingsBuilder().with_apikey(environment="CUSTOM_API_KEY").build()

# Create client with custom configuration
client = Client(
    settings,
    YAMLFactory(Endpoints, './endpoints.yaml')
)

# Or use quick_client with custom settings
client = tasepy.quick_client(settings_instance=settings)
```

## API Reference

### Funds Methods

- `get_list()` - Get all available funds
- `get_fund_types()` - Get fund type classifications
- `get_mutual_fund_classifications()` - Get mutual fund classifications
- `get_currency_exposure()` - Get currency exposure profiles
- `get_share_exposure()` - Get share exposure profiles
- `get_stock_exchanges()` - Get stock exchange information
- `get_tax_statuses()` - Get tax status classifications
- `get_listing_statuses()` - Get listing status information
- `get_payment_policies()` - Get payment policy information
- `get_distribution_commissions()` - Get distribution commission data
- `get_tracking_fund_classifications()` - Get tracking fund classifications
- `get_underlying_assets()` - Get underlying asset information

### Indices Basic Methods

- `get_list()` - Get all available indices
- `get_components(index_id)` - Get components of a specific index

### Indices Online Methods

- `get_intraday(index_id=None, start_time=None)` - Get intraday index prices with real-time monitoring data
- `get_last_rate(index_id=None)` - Get latest price updates for online indices with current rates and changes
- `get_trading_rate_types()` - Get index trading rate type classifications

### Securities Basic Methods

- `get_trade_securities_list(year, month, day)` - Get traded securities list for a specific date with extensive trading data
- `get_delisted_securities_list(year, month)` - Get delisted securities list for a specific year and month period
- `get_companies_list()` - Get companies list for securities listed on the Tel Aviv Stock Exchange
- `get_illiquid_maintenance_suspension_list()` - Get maintenance, suspension and illiquid securities lists for next trading day
- `get_trading_code_list()` - Get trading codes list providing reference codes for securities trading operations
- `get_securities_types()` - Get securities types classifications for different security instruments traded on TASE

## License

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

## Contributing

We welcome contributions to TasePy! Here's how you can help:

### Getting Started

1. **Fork the repository** on GitHub
2. **Clone your fork** locally:
   ```bash
   git clone https://github.com/your-username/tasepy.git
   cd tasepy
   ```
3. **Set up development environment**:
   ```bash
   python -m venv venv
   source venv/bin/activate  # On Windows: venv\Scripts\activate
   pip install -r requirements.txt
   pip install -r dev-requirements.txt
   ```

### Running Tests

This package has been validated across Python versions 3.10-3.13 using GitHub Codespaces for consistent, isolated testing environments.

```bash
# Install development dependencies
pip install -r dev-requirements.txt

# Run all tests
pytest

# Run specific test categories
pytest tests/unit/          # Unit tests only
pytest tests/integration/   # Integration tests (requires API key)
```

#### Multi-Version Testing

For contributors interested in cross-version validation, we maintain a [testing repository](https://github.com/eliyahuA/tasepy-testing) configured with GitHub Codespaces environments for Python 3.10-3.13 testing.

### AI Coding Assistance

If you're using AI coding agents (like Claude Code), this repository includes helpful configuration:

- **CLAUDE.md**: Contains project-specific instructions, development commands, architecture overview, and coding guidelines for AI assistants
- **.claude/ folder**: Contains specialized commands and templates for common development tasks

These files help AI assistants understand the project structure, testing procedures, and development workflows, making AI-assisted development more effective.

### Code of Conduct

This project follows a standard Code of Conduct. Please be respectful and constructive in all interactions.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tasepy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "tase, stock-exchange, finance, api, sdk, tel-aviv",
    "author": null,
    "author_email": "Eliyahu Arlev <eliyahu.arlev@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c0/c0/d4d8dd66932118eae73111fabf9e4520b1c32e6337e7e9d90c3eac61bb75/tasepy-0.2.0.tar.gz",
    "platform": null,
    "description": "# TasePy - TASE DataWise API Python SDK\r\n\r\nA comprehensive Python SDK for accessing the Tel Aviv Stock Exchange (TASE) DataWise API. Provides typed clients, request builders, and response models for funds and indices data.\r\n\r\n## Scope and Limitations\r\n\r\nThis SDK currently implements the **4 free API endpoints** from TASE DataHub:\r\n\r\n- **Funds** - Fund listings, classifications, and exposure data\r\n- **Indices Basic** - Index listings and components  \r\n- **Indices Online** - Real-time index rates and intraday data\r\n- **Securities Basic** - Security listings, company data, and trading information\r\n\r\nTASE DataHub offers additional premium API products beyond these free endpoints. For the complete catalog of available APIs and pricing, visit the official [TASE DataHub](https://www.tase.co.il/en/content/products_lobby/datahub).\r\n\r\nFuture versions of TasePy may expand to include additional endpoints based on community needs and contributions.\r\n\r\n## Quick Start\r\n\r\n### Installation\r\n\r\n```bash\r\npip install tasepy\r\n```\r\n\r\n### Requirements\r\n\r\nValid TASE DataWise API key, can be obtained at [datahub](https://www.tase.co.il/en/content/products_lobby/datahub)\r\n\r\n### Basic Usage\r\n\r\n```python\r\nimport tasepy\r\n\r\n# Create a client with default settings\r\nclient = tasepy.quick_client()\r\n\r\n# Get list of all funds\r\nfunds = client.funds.get_list()\r\nprint(f\"Found {len(funds.results)} funds\")\r\n\r\n# Get basic indices information\r\nindices = client.indices_basic.get_list()\r\nprint(f\"Found {len(indices.results)} indices\")\r\n```\r\n\r\n### API Key Setup\r\n\r\nThe SDK provides multiple flexible ways to configure your API key:\r\n\r\n#### Quick Start (Default)\r\n```python\r\nimport tasepy\r\n# Uses TASE_API_KEY environment variable by default\r\nclient = tasepy.quick_client()\r\n```\r\n\r\n#### All Configuration Options\r\n\r\n**1. Direct API Key**\r\n```python\r\nfrom tasepy.settings import SettingsBuilder\r\nsettings = SettingsBuilder().with_apikey(key=\"your-direct-api-key\").build()\r\nclient = tasepy.quick_client(settings_instance=settings)\r\n```\r\n\r\n**2. Custom Environment Variable**\r\n```python\r\n# You can use any environment variable name you prefer\r\nsettings = SettingsBuilder().with_apikey(environment=\"MY_CUSTOM_API_KEY\").build()\r\nclient = tasepy.quick_client(settings_instance=settings)\r\n```\r\n\r\n**3. YAML File**\r\n```python\r\nsettings = SettingsBuilder().with_apikey(file_path=\"path/to/your/key.yaml\").build()\r\nclient = tasepy.quick_client(settings_instance=settings)\r\n```\r\n\r\n**4. Custom Provider Function**\r\n```python\r\ndef get_api_key():\r\n    # Your custom logic to retrieve API key\r\n    return \"your-api-key\"\r\n\r\nsettings = SettingsBuilder().with_apikey(key_provider=get_api_key).build()\r\nclient = tasepy.quick_client(settings_instance=settings)\r\n```\r\n\r\n#### Environment Variable Setup\r\n\r\n**Default Environment Variable (TASE_API_KEY)**\r\n```bash\r\nexport TASE_API_KEY=\"your-tase-api-key\"\r\n```\r\n\r\n**Custom Environment Variable**\r\n```bash\r\nexport MY_CUSTOM_API_KEY=\"your-tase-api-key\"\r\n```\r\n\r\n#### YAML File Format\r\nCreate a YAML file with this structure:\r\n```yaml\r\nkey: \"your-tase-api-key\"\r\n```\r\n\r\n### Working with Funds\r\n\r\n```python\r\nimport tasepy\r\n\r\nclient = tasepy.quick_client()\r\n\r\n# Get all funds\r\nfunds = client.funds.get_list()\r\n\r\n# Get fund classifications\r\nfund_types = client.funds.get_fund_types()\r\nclassifications = client.funds.get_mutual_fund_classifications()\r\n\r\n# Get fund exposures and profiles\r\ncurrency_exposure = client.funds.get_currency_exposure()\r\nshare_exposure = client.funds.get_share_exposure()\r\n\r\n# Get fund operational data\r\nexchanges = client.funds.get_stock_exchanges()\r\ntax_statuses = client.funds.get_tax_statuses()\r\n```\r\n\r\n### Working with Indices\r\n\r\n```python\r\nimport tasepy\r\n\r\nclient = tasepy.quick_client()\r\n\r\n# Get all indices\r\nindices = client.indices_basic.get_list() \r\n\r\n# Get components of a specific index\r\ncomponents = client.indices_basic.get_components(index_id=\"your-index-id\")\r\n```\r\n\r\n## Advanced Usage\r\n\r\n### Custom Configuration\r\n\r\n```python\r\nfrom tasepy.settings import SettingsBuilder\r\nfrom tasepy.client import Client\r\nfrom tasepy.endpoints.factories.yaml_factory import YAMLFactory\r\nfrom tasepy.requests_.urls import Endpoints\r\n\r\n# Build custom settings\r\nsettings = SettingsBuilder().with_apikey(environment=\"CUSTOM_API_KEY\").build()\r\n\r\n# Create client with custom configuration\r\nclient = Client(\r\n    settings,\r\n    YAMLFactory(Endpoints, './endpoints.yaml')\r\n)\r\n\r\n# Or use quick_client with custom settings\r\nclient = tasepy.quick_client(settings_instance=settings)\r\n```\r\n\r\n## API Reference\r\n\r\n### Funds Methods\r\n\r\n- `get_list()` - Get all available funds\r\n- `get_fund_types()` - Get fund type classifications\r\n- `get_mutual_fund_classifications()` - Get mutual fund classifications\r\n- `get_currency_exposure()` - Get currency exposure profiles\r\n- `get_share_exposure()` - Get share exposure profiles\r\n- `get_stock_exchanges()` - Get stock exchange information\r\n- `get_tax_statuses()` - Get tax status classifications\r\n- `get_listing_statuses()` - Get listing status information\r\n- `get_payment_policies()` - Get payment policy information\r\n- `get_distribution_commissions()` - Get distribution commission data\r\n- `get_tracking_fund_classifications()` - Get tracking fund classifications\r\n- `get_underlying_assets()` - Get underlying asset information\r\n\r\n### Indices Basic Methods\r\n\r\n- `get_list()` - Get all available indices\r\n- `get_components(index_id)` - Get components of a specific index\r\n\r\n### Indices Online Methods\r\n\r\n- `get_intraday(index_id=None, start_time=None)` - Get intraday index prices with real-time monitoring data\r\n- `get_last_rate(index_id=None)` - Get latest price updates for online indices with current rates and changes\r\n- `get_trading_rate_types()` - Get index trading rate type classifications\r\n\r\n### Securities Basic Methods\r\n\r\n- `get_trade_securities_list(year, month, day)` - Get traded securities list for a specific date with extensive trading data\r\n- `get_delisted_securities_list(year, month)` - Get delisted securities list for a specific year and month period\r\n- `get_companies_list()` - Get companies list for securities listed on the Tel Aviv Stock Exchange\r\n- `get_illiquid_maintenance_suspension_list()` - Get maintenance, suspension and illiquid securities lists for next trading day\r\n- `get_trading_code_list()` - Get trading codes list providing reference codes for securities trading operations\r\n- `get_securities_types()` - Get securities types classifications for different security instruments traded on TASE\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Contributing\r\n\r\nWe welcome contributions to TasePy! Here's how you can help:\r\n\r\n### Getting Started\r\n\r\n1. **Fork the repository** on GitHub\r\n2. **Clone your fork** locally:\r\n   ```bash\r\n   git clone https://github.com/your-username/tasepy.git\r\n   cd tasepy\r\n   ```\r\n3. **Set up development environment**:\r\n   ```bash\r\n   python -m venv venv\r\n   source venv/bin/activate  # On Windows: venv\\Scripts\\activate\r\n   pip install -r requirements.txt\r\n   pip install -r dev-requirements.txt\r\n   ```\r\n\r\n### Running Tests\r\n\r\nThis package has been validated across Python versions 3.10-3.13 using GitHub Codespaces for consistent, isolated testing environments.\r\n\r\n```bash\r\n# Install development dependencies\r\npip install -r dev-requirements.txt\r\n\r\n# Run all tests\r\npytest\r\n\r\n# Run specific test categories\r\npytest tests/unit/          # Unit tests only\r\npytest tests/integration/   # Integration tests (requires API key)\r\n```\r\n\r\n#### Multi-Version Testing\r\n\r\nFor contributors interested in cross-version validation, we maintain a [testing repository](https://github.com/eliyahuA/tasepy-testing) configured with GitHub Codespaces environments for Python 3.10-3.13 testing.\r\n\r\n### AI Coding Assistance\r\n\r\nIf you're using AI coding agents (like Claude Code), this repository includes helpful configuration:\r\n\r\n- **CLAUDE.md**: Contains project-specific instructions, development commands, architecture overview, and coding guidelines for AI assistants\r\n- **.claude/ folder**: Contains specialized commands and templates for common development tasks\r\n\r\nThese files help AI assistants understand the project structure, testing procedures, and development workflows, making AI-assisted development more effective.\r\n\r\n### Code of Conduct\r\n\r\nThis project follows a standard Code of Conduct. Please be respectful and constructive in all interactions.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A comprehensive Python SDK for accessing the Tel Aviv Stock Exchange (TASE) DataWise API",
    "version": "0.2.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/eliyahuA/tasepy/issues",
        "Homepage": "https://github.com/eliyahuA/tasepy",
        "Repository": "https://github.com/eliyahuA/tasepy.git"
    },
    "split_keywords": [
        "tase",
        " stock-exchange",
        " finance",
        " api",
        " sdk",
        " tel-aviv"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0ec9421e87d7396a5be72e97f1e3a681ab2e79819132e66ed19127f64c637dcc",
                "md5": "10735f5932ec577756f2c03f3de9eb32",
                "sha256": "3507533a382a41e764ef565026768bdbab47de2f32da9d692021ef05b311f772"
            },
            "downloads": -1,
            "filename": "tasepy-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "10735f5932ec577756f2c03f3de9eb32",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 40090,
            "upload_time": "2025-07-26T14:05:40",
            "upload_time_iso_8601": "2025-07-26T14:05:40.399257Z",
            "url": "https://files.pythonhosted.org/packages/0e/c9/421e87d7396a5be72e97f1e3a681ab2e79819132e66ed19127f64c637dcc/tasepy-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c0c0d4d8dd66932118eae73111fabf9e4520b1c32e6337e7e9d90c3eac61bb75",
                "md5": "6c3725513f040da953b409ba253025b1",
                "sha256": "36565e10b0160288a5a4145a91192d3823b6c430e8b5373daba9b1bee2fcfc90"
            },
            "downloads": -1,
            "filename": "tasepy-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6c3725513f040da953b409ba253025b1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 26537,
            "upload_time": "2025-07-26T14:05:41",
            "upload_time_iso_8601": "2025-07-26T14:05:41.640659Z",
            "url": "https://files.pythonhosted.org/packages/c0/c0/d4d8dd66932118eae73111fabf9e4520b1c32e6337e7e9d90c3eac61bb75/tasepy-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-26 14:05:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "eliyahuA",
    "github_project": "tasepy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    "~=",
                    "2.32.3"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "~=",
                    "2.11.4"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "~=",
                    "6.0.2"
                ]
            ]
        },
        {
            "name": "typeguard",
            "specs": [
                [
                    "~=",
                    "4.4.2"
                ]
            ]
        },
        {
            "name": "beautifulsoup4",
            "specs": [
                [
                    "~=",
                    "4.13.4"
                ]
            ]
        }
    ],
    "lcname": "tasepy"
}
        
Elapsed time: 1.30355s