Add your description here
Project description
trackinsight-data-python
Setup the environment variables
Some variables are read from the environment.
Variables found in local .env file are added to the environment (via the dotenv library)
TRACK_API_KEY=YOUR_KEY_HERE # your API key
TRACK_API_DL_WORKERS=10 # number of parallel threads when downloading data
TRACK_API_STORAGE=trackinsight_data # local folder to use when storing data on disk
Usage
import polars as pl
import trackinsight_data_python as API
# You need to add TRACK_API_KEY and TRACK_API_HOST to .env
ccy='usd'
metadata= API.getMetadata()
stamp = metadata["reportsAsOf"][ccy][-1] # get latest stamp for reports
reports = API.getReports(ccy=ccy,stamp=stamp) # reports is a Polars DataFrame, you can use .to_pandas() if needed
nuclear_etfs = reports.filter(pl.col('class_theme').list.join(';') =='Nuclear Energy')
ids = nuclear_etfs["share_id"].to_list();
usd_timeseries = API.getTimeseries(ids=ids,start='2024-01-01',end=None,ccy=ccy)
holdings = API.getHoldings(ids=ids)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trackinsight_data_python-0.1.1.tar.gz.
File metadata
- Download URL: trackinsight_data_python-0.1.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
296d16241c0691443c3c1b848cdd894d39c44de0d4f7741e92b9a863f2379f80
|
|
| MD5 |
60a8a5e9b82138e0f5d99caa80bb86eb
|
|
| BLAKE2b-256 |
7f1e8a44dc0906d32414e8b0fad36ea6241f592f0aa4a561eb6eaca25f1112d0
|
File details
Details for the file trackinsight_data_python-0.1.1-py3-none-any.whl.
File metadata
- Download URL: trackinsight_data_python-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8e3b74eb39c4762f0a5f63647efa087e7c6467a575934f159a259042d812945
|
|
| MD5 |
46cc50a51b52ff12bcea293dd018027a
|
|
| BLAKE2b-256 |
710ed4b92d84a3ac3f98aedde9d5415a0b677be0b08fa179b5a01aa8bf89d606
|