semvec/pypi-packages huggingface dataset:
licomp-reclicense 0.5.1
Simple command line tool to check compatibility between two licenses, given context  
Requires Python: >=3.6

# Licomp Reclicense

Licomp Reclicense provides compatibility data:

* between a Reclicense outbound license and inbound Open Source licenses
* when distributing a binary, linking to (e.g. linking to a library) Open Source components
* the Open Source components are unmodified

Licomp Reclicense uses [RecLicense](https://github.com/osslab-pku/RecLicense) from [Open Source Software Data Analytics Lab@PKU-SEI](https://github.com/osslab-pku).

## Introduction 

Licomp Osadl implements the [Licomp](https://github.com/hesa/licomp) api for communication with the Licomp resources. For a better understanding of Licomp we suggest you read:

* [Licomp basic concepts](https://github.com/hesa/licomp/#licomp-concepts)
* [Licomp reply format](https://github.com/hesa/licomp/blob/main/docs/reply-format.md)

The various licomp resources below can be accessed as a group by:
* [licomp-toolkit](https://github.com/hesa/licomp-toolkit) - (`pip install licomp-toolkit`)

Licomp is used be the following compatibility resources:
* [licomp-hermione](https://github.com/hesa/licomp-hermione) - (`pip install licomp-hermione`)
* [licomp-osadl](https://github.com/hesa/licomp-osadl) - (`pip install licomp-osadl`)
* [licomp-proprietary](https://github.com/hesa/licomp-proprietary) - (`pip install licomp-proprietary`)
* [licomp-dwheeler](https://github.com/hesa/licomp-dwheeler) - (`pip install licomp-dwheeler`)

# Using Licomp Reclicense

Since Licomp Reclicense implements [Licomp](https://github.com/hesa/licomp) we refer to the Licomp guides (both cli and python api).

## Command line interface

See [Licomp Comand Line Interface](https://github.com/hesa/licomp/blob/main/docs/cli-guide.md)

_Note: the commmad line program for Licomp Reclicense is called `licomp-reclicense`._

## Python module

See [Licomp Python API](https://github.com/hesa/licomp/blob/main/docs/python-api.md)

# Installing Licomp Reclicense

## From pypi.org

Licomp Reclicense is available via [pypi.org](https://pypi.org/) at: [https://pypi.org/project/licomp-reclicense/](https://pypi.org/project/licomp-reclicense/).


To install, simply do the following:

```
$ pip install licomp-reclicense
```

## From github

Installing from github assumes you already have `pip` installed.

```
$ git clone https://github.com/hesa/licomp-reclicense
$ pip install -r requirements.txt
$ pip install -r requirements-dev.txt
$ pip install .
```
applicationmapper 0.3.1
Implements the `ApplicationMapper` CRD on top of Metacontroller.
Requires Python: >=3.13

# applicationmapper

[Metacontroller]: https://github.com/metacontroller/metacontroller/

This is is a Kubernetes controller implemented using [Metacontroller] that can generates ArgoCD applications
conveniently via Helm templates from input sources that are not sourced from GitOps, but instead from Rest APIs.

It is comparable to an ArgoCD `ApplicationSet` resource, but more powerful and decoupled from GitOps. The primary use
case of this controller is to manage automatic deployments of mostly homogeneous applications based on external data
sources, such as spinning up (and down) customer environments.

## Usage

The `ApplicationMapper` resource is a Cluster-scoped resource because it allows it to generate resources in any
namespace. This is relevant for being able to generate an `Application` object in the `argocd` namespace while being
able to populate `Secret` and `ConfigMap` resources in another namespace (e.g. where the application deploys its
resources to).

The template in an `ApplicationMapper` may produce any of the following resources:

- `argoproj.io/v1alpha1/Application`
- `v1/ConfigMap`
- `v1/Secret`

### Examples

- [Guestbook](./manifests/guestbooks-example.yaml) &ndash; Creates an instance of the ArgoCD Guestbook application, one
  per item in a static list of subscription IDs.
xsentinels 1.3.1
Sentinels for Defaults, Null and for creating sentinels/singletons.
Requires Python: <4.0,>=3.10
Keywords: singleton, type, guards, sentinels, sentinel, default, null

![PythonSupport](https://img.shields.io/static/v1?label=python&message=%203.10|%203.11|%203.12|%203.13&color=blue?style=flat-square&logo=python)
![PyPI version](https://badge.fury.io/py/xsentinels.svg?)



# Overview

Various objects that allow for sentinel-like singletons for various purposes, including:

- Ones pre-defined in this library:
  - Default
  - Null
- Also, Easily create your own custom singletons/sentinels types.

**[📄 Detailed Documentation](https://xyngular.github.io/py-xsentinels/latest/)** | **[🐍 PyPi](https://pypi.org/project/xsentinels/)**

# Install

```bash
# via pip
pip install xsentinels

# via poetry
poetry add xsentinels
```

# Quick Start

```python
from xsentinels import Default
import os

def my_func(my_param = Default):
    if my_param is Default:
        # Resolve default value for parameter, otherwise None.
        my_param = os.environ.get('MY_PARAM', None)
    ...
```

# Licensing

This library is licensed under the MIT-0 License. See the LICENSE file.
streamlit-analytics-cards 0.0.5
A custom Streamlit component for analytics cards
Requires Python: >=3.7

# streamlit-analytics-cards

A project to create custom Streamlit components using React and TypeScript for analytics and insights.

View a demo: [💾](https://analytics-cards.streamlit.app/)
View it on PyPI: [👾](https://pypi.org/project/streamlit-analytics-cards/0.1.0/)

## Using the component

## **Prerequisites**

- [Python 3.7+](https://www.python.org/downloads/)
- [Streamlit](https://docs.streamlit.io/)

## **Installation**

```bash
pip install streamlit-analytics-cards
or
python3 -m pip install streamlit-analytics-cards
```

## **Implementation**

```python
from streamlit_analytics_cards import card as stac
# Render the component in your Streamlit app
stac(
            template="CardOne",
            title="Attrition Diversity",
            subtitle="Female Attrition",
            main_value="4.7%",
            secondary_value="52",
            delta="Y/Y 5.1%, -0.4%",
            chart_data=df["Number of Exits"].tolist(),
            x_axis_label=df.columns[0],
            color_scheme={"background": "#FFFFFF", "text": "#000000"},
            key="card_1",
        )
```

---

## For developers

## **Prerequisites**

Before you start, ensure you have the following installed on your system:

- [Python 3.7+](https://www.python.org/downloads/)
- [Node.js 14+ and npm](https://nodejs.org/)
- [Streamlit](https://docs.streamlit.io/)

---

## **Installation**

1. **Clone the repository**:

   ```bash
   git clone https://github.com/natxc/streamlit-analytics-cards.git
   cd streamlit-analytics-cards
   ```

2. **Set up the Python environment**:

   ```bash
   python -m venv venv
   source venv/bin/activate  # On Windows: venv\Scripts\activate
   pip install -r requirements.txt
   ```

3. **Install frontend dependencies**:
   Navigate to the `frontend/` folder and install the required Node.js packages:
   ```bash
   cd frontend
   npm install
   ```

---

## **Development**

### **Run the Frontend**

Start the development server for the React app:

```bash
npm start
```

This will start a local development server at [http://localhost:3000](http://localhost:3000).

---

### **Run the Streamlit**

In the root directory, start the Streamlit app:

```bash
streamlit run streamlit_app/app.py
```

---

## **Production Build**

1. **Build the Frontend**:
   Navigate to the `frontend/` folder and run:

   ```bash
   npm run build
   ```

   This will create a production-ready build in the `frontend/build` directory.

2. **Run Streamlit in Production Mode**:
   Ensure `_RELEASE` is set to `True` in the `__init__.py` file:

   ```python
   _RELEASE = True
   ```

   Then start the Streamlit app:

   ```bash
   streamlit run streamlit_app/app.py
   ```
bussilab 0.0.48
A package collecting a heterogeneous set of tools.
Requires Python: >=3.6

[![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/bussilab/py-bussilab)](https://github.com/bussilab/py-bussilab/tags)
[![PyPI](https://img.shields.io/pypi/v/bussilab)](https://pypi.org/project/bussilab/)
[![Conda](https://img.shields.io/conda/v/bussilab/py-bussilab)](https://anaconda.org/bussilab/py-bussilab)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/bussilab)](https://pypi.org/project/bussilab/)

[![CI](https://github.com/bussilab/py-bussilab/workflows/CI/badge.svg)](https://github.com/bussilab/py-bussilab/actions?query=workflow%3ACI)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/bussilab/py-bussilab.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/bussilab/py-bussilab/context:python)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/bussilab/py-bussilab.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/bussilab/py-bussilab/alerts/)
[![codecov](https://codecov.io/gh/bussilab/py-bussilab/branch/master/graph/badge.svg)](https://codecov.io/gh/bussilab/py-bussilab)

A package collecting a heterogeneous set of tools.

This package collects a number of tools that are useful enough to be distributed but too small to deserve being published as separate packages.
Source code is on [GitHub](https://github.com/bussilab/py-bussilab).
Documentation can be browsed at [this page](https://bussilab.github.io/doc-py-bussilab).

To install package and dependencies with pip:

```
pip install bussilab
```

To install package and dependencies with conda:

```
conda install -c conda-forge -c bussilab py-bussilab
```

To install dependencies with macports, see [documentation](https://bussilab.github.io/doc-py-bussilab).
lmstudio-client 0.1.0
A lightweight Python client for interacting with LM Studio API.
Requires Python: >=3.10

# LMStudio_Client

LMStudio_Client is a simple Python wrapper for the LMStudio API. Currently, it provides access to the `chat/completions` endpoint, allowing for both blocking and streaming interactions with an LLM running in LMStudio.

## Features
- Supports synchronous (blocking) chat responses.
- Supports streamed responses for real-time interaction.
- Easy-to-use interface for interacting with LMStudio.

## Installation
```sh
pip install lmstudio_client  # (if available as a package)
```
Or clone this repository and install dependencies manually:
```sh
git clone https://github.com/eiredynamic/lmstudio-client-python
cd lmstudio-client-python
```
Ideally also using a venv...
```sh
python -m venv ./venv
```
Install the dependencies
```sh
pip install -r requirements.txt
```
...and install the module locally
```sh
pip install -e .
```

## Usage
A demonstration of how to use the client is available in `example.py`, a simple console-based application.

### Main Functions

```python
def chat(self, usr_prompt, sys_prompt=_sys_prompt, endpoint_root=_endpoint_root, include_reasoning=False):
    """
    Sends a user prompt to the LMStudio API and returns the complete response.
    
    :param usr_prompt: The user input text.
    :param sys_prompt: (Optional) System prompt to guide the model.
    :param endpoint_root: (Optional) Root endpoint of the API.
    :param include_reasoning: (Optional) Whether to include model reasoning.
    :return: The full response from the LLM.
    """
```

```python
def stream_chat(self, usr_prompt, sys_prompt=_sys_prompt, endpoint_root=_endpoint_root, include_reasoning=False):
    """
    Sends a user prompt to the LMStudio API and returns a streamed response.
    
    :param usr_prompt: The user input text.
    :param sys_prompt: (Optional) System prompt to guide the model.
    :param endpoint_root: (Optional) Root endpoint of the API.
    :param include_reasoning: (Optional) Whether to include model reasoning.
    :yield: Streamed response chunks from the LLM.
    """
```

### Example Usage
#### Blocking Call
```python
from lmstudio_client.client import Client

client = Client()
response = client.chat("Tell me a joke.")
print(response)
```

#### Streaming Call
```python
response_stream = client.stream_chat("Tell me a joke.")
for chunk in response_stream:
    print(chunk, end="", flush=True)
```
## Project Repo
https://github.com/eiredynamic/lmstudio-client-python

## License
This project is licensed under the MIT License. See `LICENSE` for details.

## Contributions
Contributions are welcome! Feel free to submit a pull request or report issues.

## Acknowledgments
Thanks to LMStudio for providing the API interface.
drug-resolver 0.0.5
A tool to resolve messy drug names in biomedical datasets to standard identifiers
Requires Python: >=3.10

# Drug Resolver

This package offers a simple way to resolve drug names to their corresponding PubChem entries.

This is useful for identifying unknown drug synonyms or matching drug synonyms across different datasets in an automated way.


## Installation

```sh
pip install drug-resolver
```

## Usage

```python
from drug_resolver import resolve_drug

d1 = resolve_drug("tetracycline hcl")
print(d1)
"""
ResolvedDrug(
   name='Tetracycline hydrochloride', 
   pubchem_compound_id='54704426', 
   pubchem_substance_id='103591391', 
   smiles='CN(C)C1C(=O)C(C(N)=O)=C(O)C2(O)C(=O)C3=C(O)c4c(O)cccc4C(C)(O)C3CC12.Cl', 
   drug_classes=None, 
   fda_approval=<FDAApprovalStatus.APPROVED: 'APPROVED'>, 
   pubchem_parent_compound_id='54675776')
"""

d2 = resolve_drug("Sumycin")
print(d2)
"""
ResolvedDrug(
    name='Tetracycline', 
    pubchem_compound_id='54675776', 
    pubchem_substance_id='124766046', 
    smiles='CN(C)C1C(=O)C(C(N)=O)=C(O)C2(O)C(=O)C3=C(O)c4c(O)cccc4C(C)(O)C3CC12', 
    drug_classes=frozenset({'Established Pharmacologic Class [EPC] - Tetracycline-class Antimicrobial'}), 
    fda_approval=<FDAApprovalStatus.APPROVED: 'APPROVED'>, 
    pubchem_parent_compound_id=None)
"""

assert d1 == d2 # True
```

The equality operator between `ResolvedDrug` objects will return `True` under the following conditions:

- The `pubchem_compound_id` attribute is the same
- The `pubchem_substance_id` attribute is the same
- The `smiles` strings refer to the same molecule
- Two compounds share the same `pubchem_parent_compound_id` or the `pubchem_compound_id` is the same as the `pubchem_parent_compound_id` of the other compound.

## Caching

You can set the env variable `DRUG_RESOLVER_REQUEST_CACHE` to a filename. A sqlite database will be created
at the filename and all PubChem requests will be cached there. This is useful for avoiding repeated requests
to the PubChem API. By default, the cache will be stored in memory and will be lost when the program exits.

Here is an example of the cache works:

```commandline
(.venv) drug-name-resolver % DRUG_RESOLVER_REQUEST_CACHE=/tmp/test.sqlite3 ipython
Python 3.11.11 (main, Dec  3 2024, 17:20:40) [Clang 16.0.0 (clang-1600.0.26.4)]

In [1]: from drug_resolver import resolve_drug

In [2]: %time d1 = resolve_drug("tetracycline hcl")
CPU times: user 48.1 ms, sys: 10.7 ms, total: 58.8 ms
Wall time: 1.53 s
(.venv)  drug-name-resolver % ls -lh /tmp/test.sqlite3
-rw-r--r--@ 1 quinnj2  wheel   468K Jan 30 14:51 /tmp/test.sqlite3
(.venv) drug-name-resolver % DRUG_RESOLVER_REQUEST_CACHE=/tmp/test.sqlite3 ipython
Python 3.11.11 (main, Dec  3 2024, 17:20:40) [Clang 16.0.0 (clang-1600.0.26.4)]

In [1]: from drug_resolver import resolve_drug

In [2]: %time d1 = resolve_drug("tetracycline hcl")
CPU times: user 24.2 ms, sys: 4.06 ms, total: 28.3 ms
Wall time: 29.3 ms
```