Metadata-Version: 2.4
Name: consdata
Version: 0.1.0
Summary: Access index and portfolio constituent universes stored via fsdata
Keywords: utility
Author: Furechan
Author-email: Furechan <furechan@xsmail.com>
License-Expression: MIT
Classifier: Development Status :: 7 - Inactive
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Dist: fsdata[pandas]==0.0.8
Requires-Dist: click
Requires-Dist: fsdata[polars]==0.0.8 ; extra == 'polars'
Requires-Dist: fsdata[s3]==0.0.8 ; extra == 's3'
Requires-Python: >=3.10
Provides-Extra: polars
Provides-Extra: s3
Description-Content-Type: text/markdown

# Basic utility to manage index or portfolio constituent data

Utility library to fetch lists of symbols/constituents as managed by the user. The constituents are to be stored as parquet dataframes in a local or remote location, via the `fsdata` package. The tickers are extracted from the index column.

## Configuration

Create a `consdata` entry in the `fsdata.ini` config file. The config is resolved by `fsdata`, in order: the `FSDATA_CONFIG` environment variable, then upward search from the current directory (a repo-local config), then the `XDG_CONFIG_HOME` folder (default `~/.config`).

```ini
# fsdata.ini

[consdata]
path = s3://my-bucket/consdata
```


## Usage

To list available universes

```python
import consdata

consdata.items()
```

To get a dataframe of constituents

```python
consdata.load(name)
```

To get a list of tickers

```python
consdata.get_tickers(name)
```

## Related projects and Resources
- [fsdata](https://pypi.org/project/fsdata/) Simple data catalog library for python
- [FinanceDataBase](https://github.com/JerBouma/FinanceDatabase) Database of 300.000+ symbols containing Equities, ETFs, Funds, Indices, Currencies, Cryptocurrencies and Money Markets
- [index-constituents](https://yfiua.github.io/index-constituents/) Get the current and historical constituents of popular stock indices.


