semvec/pypi-packages huggingface dataset:
AFL-automation 1.2.0
Hardware interfacing code for the Autonomous Formulation Lab
Requires Python: >=3.8

NIST Autonomous Formulation Laboratory - Automation Software

This package contains the core laboratory automation software used in the NIST AFL platform.

Its core is the 'DeviceServer' API, a simple way of exposing functionality in simple Python classes to the outside world via HTTP servers.  It includes robust item queueing support, output rendering, and hooks to allow for 'smart' generation of user interfaces automatically.

Specific deviceserver instances are provided for a variety of hardware used in the AFL platform: syringe pumps, valves, multiposition flow selectors, UV-Vis spectrometers, x-ray and neutron scattering instruments/beamlines.  There are further deviceserver classes that integrate these base devices to perform higher-level functions, e.g. "loading".  These classes aim to specify instructions for running a particular protocol in a hardware-agnostic way.


## Virtual servers for offline testing

Several stub modules are provided so you can launch the AFL stack without any physical hardware. Running one of these modules the first time creates `~/.afl/config.json` containing the Tiled server URL, API key and port bindings. Update this file as needed.

Example commands to start the dummy services:

```bash
# start a dummy OT2 robot
python -m AFL.automation.prepare.Dummy_OT2_Driver

# start a virtual sample loader
python server_scripts/virtual_instrument/DummyLoader.py

# optional virtual detectors
python server_scripts/virtual_instrument/VirtualSANS_data.py
python server_scripts/virtual_instrument/VirtualSpec_Data.py
```

For a full offline demo you can start everything at once:

```bash
python server_scripts/virtual_instrument/AllDummy.py
```

These stub servers expose the same HTTP API as the real hardware allowing you to test an AFL workflow entirely in software.


### Production deployment
By default the APIServer will use the [waitress](https://docs.pylonsproject.org/projects/waitress/en/stable/) WSGI server if it is installed. To fall back to Flask's built-in server pass `--no-waitress` to `AFL.automation.shared.launcher`.

### Running tests
This repository uses `pytest` for unit tests. A GitHub Actions workflow runs the
tests automatically on every push and pull request using
`.github/workflows/test.yaml`. The workflow installs the package along with the
dependencies listed in `pyproject.toml`.

To execute the tests locally, install the package in editable mode and run
`pytest`. If the installation fails because the package version cannot be
determined from Git tags, set `SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0` as in the
CI workflow:

```bash
SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 pip install -e .
pytest
```
capinvest-finviz 1.0.5
Finviz provider extension for CapInvest
Requires Python: <3.14,>=3.9

# CapInvest Finviz Data Provider Extension

This extension integrates the [Finviz](https://finviz.com/) data provider into the CapInvest Platform.

It will install, [finvizfinance](https://github.com/lit26/finvizfinance/), to power the functions.

## Installation

To install the extension:

```bash
pip install capinvest-finviz
```

## Endpoints

- obb.equity.compare.groups
- obb.equity.estimates.price_target
- obb.equity.fundamental.metrics
- obb.equity.profile
- obb.equity.price.performance
- obb.equity.screener

## Screener

The screener is a faithful replication of the public-facing stock screener - https://finviz.com/screener.ashx?

Some options are directly accessible through the function parameters, all others are exposed via `presets` or `filters_dict`.
The filters list below are exposed in the function, with choices visible in the docstring:

- `exchange`
- `index`
- `sector`
- `industry`
- `mktcap`
- `recommendation` (analyst's mean score from 1-5)
- `signal` (same as the "Signal" on the Finviz page)

When the function is run without any parameters, it will default to the "top_gainers" signal.

```python
res = obb.equity.screener(provider="finviz")
```

### Metric

The `metric` parameter defines the type of data fields to return. Choices are:

- `overview`
- `ownership`
- `performance`
- `technical`
- `valuation`

Default is, "overview".

```
res = obb.equity.screener(provider="finviz", metric="performance")
```

### Preset Files

Presets can be created and customized in the "CapInvestUserData" folder. Template and default presets are created on the first run of the function.

Files are loaded on runtime, changes are effective without restarting the Python interpreter.

The `preset` parameter will override all others, except `metric` and `limit`.

Run the function to create the template and default presets in your `CapInvestUserData` folder.

Presets from the legacy CapInvest Terminal will continue to work, simply move your presets into the folder below.

```python
res = obb.equity.screener(provider="finviz", index="nasdaq")
```

Then find the presets here: `$HOME/CapInvestUserData/presets/finviz`

```python
res = obb.equity.screener(provider="finviz", preset="short_squeeze")
```

### Filters Dict

The `filters_dict` parameter acts as an alternative to `preset`, accepting a dictionary or JSON encoded string.

```python
res = obb.equity.screener(provider="finviz", filters_dict={"Index": "NASDAQ 100"})
```

Or as a JSON:

```python
res = obb.equity.screener(provider="finviz", filters_dict='{"Index": "NASDAQ 100"}')
```

When using the Fast API, this is sent in the request body.

### Error Messages

All parameters are validated, incorrect keys and choices will raise an error with information to help correct. For example:

```python
obb.equity.screener(provider="finviz", filters_dict='{"Index": "NASDAQ"}')
```

```console
Invalid filter option 'NASDAQ'. Possible filter options: ['Any', 'S&P 500', 'NASDAQ 100', 'DJIA', 'RUSSELL 2000']
```

Read the CapInvest Platform documentation [here](https://docs.capinvest.co)
capinvest-famafrench 1.0.5
Fama-French provider extension for CapInvest
Requires Python: <3.14,>=3.9

# CapInvest Fama-French Extension

This extension implements the Ken French data library (Source: https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html)
as an CapInvest Platform Provider and Router extension.
capinvest-capdata 1.0.5
CapData provider extension for CapInvest
Requires Python: <3.14,>=3.9

# CapInvest CapData Provider

This extension integrates the CapData data provider
into the CapInvest Platform.

## Installation

To install the extension, run the following command in this folder:

```bash
pip install capinvest-capdata
```

## 例如新添加一个provider（capdata）

1. 在capinvest_capdata下的_init_.py中添加Provider,特别注意fetcher_dict,这个对应对应的路由
2. 在capinvest_platform下的dev_install.py中添加capinvest-capdata = { path = "./providers/capdata", develop = true }
3. 在capinvest_platform下的pyproject.toml添加对应的依赖,修改三处地方
4. 如果只是在现有的路由中添加一个新的路由，只需要在第一步中修改特别注意fetcher_dict，并编写对应的models
5. 在当前目录下执行pip install .  (poetry lock 命令用于生成poetry.lock文件)
6. 在capinvest_platform下运行python dev_install.py
7. 启动capinvest-api 或者在capinvest_platform/core/capinvest_core/api下执行 python rest_api.py
capinvest-quantitative 1.0.7
Quantitative router extension for CapInvest
Requires Python: <3.14,>=3.9

# CapInvest QA Extension

This extension provides Quantitative Analysis (QA) tools for the CapInvest Platform.

Features of the QA extension include various statistical tools and models.

This extension works nicely with a companion `capinvest-charting` extension
capinvest-equity 1.0.5
Equity router extension for CapInvest
Requires Python: <3.14,>=3.9

# CapInvest Equity Extension

This extension provides equity market data tools for the CapInvest Platform.

Features of the Equity extension include:

- Access to various equity market data sources
- Sub-modules such as:
  - `calendar` for equity-specific events
  - `compare` for peer analysis
  - `darkpool` for dark pool shorts data
  - `discovery` for equity discovery
  - `estimates` for analyst estimates
  - `fundamental` for fundamental analysis
  - `options` for options
  - `ownership` for internal and external ownership
  - `price` for historical pricing data
  - `shorts` for shorts data
capinvest-core 1.0.10
CapInvest package with core functionality.
Requires Python: <3.14,>=3.9

# CapInvest Platform - Core

## Overview

The Core extension serves as the foundational component of the CapInvest Platform. It encapsulates essential functionalities and serves as an infrastructural base for other extensions. This extension is vital for maintaining the integrity and standardization of the platform.

## Key Features

- **Standardized Data Model** (`Data` Class): A flexible and dynamic Pydantic model capable of handling various data structures.
- **Standardized Query Params** (`QueryParams` Class): A Pydantic model for handling querying to different providers.
- **Dynamic Field Support**: Enables handling of undefined fields, providing versatility in data processing.
- **Robust Data Validation**: Utilizes Pydantic's validation features to ensure data integrity.
- **API Routing Mechanism** (`Router` Class): Simplifies the process of defining API routes and endpoints - out of the box Python and Web endpoints.

## Getting Started

### Prerequisites

- Python 3.9 or higher.
- Familiarity with FastAPI and Pydantic.

### Installation

Installing through pip:

```bash
pip install capinvest-core
```

> Note that, the capinvest-core is an infrastructural component of the CapInvest Platform. It is not intended to be used as a standalone package.

### Usage

The Core extension is used as the basis for building and integrating new data sources, providers, and extensions into the CapInvest Platform. It provides the necessary classes and structures for standardizing and handling data.

### Contributing

We welcome contributions! If you're looking to contribute, please:

- Follow the existing coding standards and conventions.
- Write clear, documented code.
- Ensure your code does not negatively impact performance.
- Test your contributions thoroughly.

 

### Collaboration

Engage with the development team and the community. Be open to feedback and collaborative discussions.