semvec/pypi-packages huggingface dataset:
llm_providers 0.1.0
Common interface for language models.

# llm-providers

A common, minimal-dependency, async-first interface for interacting with Large Language Model provider APIs.

## Getting Started

`pip install llm-providers`

```python
from llm_providers.openai import OpenAIProvider

async def main():
  provider = OpenAIProvider(
      connection_str=os.environ.get("OPENAI_API_KEY"),
  )

  completion = await provider.complete(prompt="hey i'm a robot who")
  assert completion.prompt == "hey i'm a robot who"
  assert type(completion.completion_text) == str

if __name__ == "__main__":
    asyncio.run(main())
```

## License

This project is licensed under the Apache License

## Acknowledgments

Much code borrowed from https://github.com/HazyResearch/manifest
env-attributes 1.1.1
Loads environment into class attributes
Requires Python: >=3.7.0
Keywords: python,dotenv,python-dotenv,python_dotenv,env_attributes,attributes,env,environment


# EnvAttributes

_v1.1.1_

### Loads environment into class attributes

## Install:
```bash
pip install env_attributes
```

## Example:

### Environment:
```dotenv
HOST=localhost
PORT=5050
```

### Usage:

#### Variant 1:

```python
from env_attributes import Environment

path_to_env = 'example/.env'
env = Environment(env_path=path_to_env)

print(env.host, env.port)
```
output:
```
localhost 5050
```

#### Variant 2:
Correct if the .env file is in the root directory

```python
from env_attributes import env

print(env.host, env.port)
```
output:
```
localhost 5050
```

### Additional usage:
```python
print(env.get('host'), env['port'])
```

#### Register is not important:
```python
print(env.get('HoSt'), env['PORT'])
```

#### You can work with the env object as with a dict:
```python
for key in env:
    value = env.get(key)
    print(key, value)
```
output:
```
host localhost
port 5050
```

#### You can output all environment variables:
```python
print(env)
```
output:
```json
{"host": "localhost", "port": "5050"}
```

#### You can also get all keys or values from env:
```python
print(env.keys())
print(env.values())
```
output:
```
['host', 'port']
['localhost', '5050']
```

#### You can get length of env:
```python
print(len(env))
```
output:
```
2
```

# NEW
#### Added ability to specify type annotations for environment variables

## Example:

### Environment:
```dotenv
BOOL=False
INT=123456789
FLOAT=3.14159265
STRING='Hello World!'
LIST='[123, 2.22, [1, 2, 3], {"key1": "val1", "key2": "val2"}]'
TUPLE='(1, 22, 333, 4444)'
DICT='{"key1": "val1", "key2": "val2", "key3": {"key3.1": 1, "key3.2": 2}}'
CUSTOM='1, 2, 3, 4, 5, 6, 7, 8, 9'
```

### Usage
```python
from env_attributes import Environment, EnvTypes


class EnvironmentTypes(EnvTypes):
    bool: bool
    int: int
    float: float
    string: str
    list: list
    tuple: tuple
    dict: dict

env = Environment(env_types=EnvironmentTypes)

print(env.bool, type(env.bool))
print(env.int, type(env.int))
print(env.float, type(env.float))
print(env.string, type(env.string))
print(env.list, type(env.list))
print(env.tuple, type(env.tuple))
print(env.dict, type(env.dict))
```
output:
```
False <class 'bool'>
123456789 <class 'int'>
3.14159265 <class 'float'>
Hello World! <class 'str'>
[123, 2.22, [1, 2, 3], {'key1': 'val1', 'key2': 'val2'}] <class 'list'>
('1', ' 22', ' 333', ' 4444') <class 'tuple'>
{'key1': 'val1', 'key2': 'val2', 'key3': {'key3.1': 1, 'key3.2': 2}} <class 'dict'>
```
thesaurus-lib 0.1.9
Implemented thesaurus library using SOM
Keywords: thesaurus,NLP

# Thesaurus Visualization

Current supported languages are:

- English ``eng``
- Russian ``rus``

## How to run
### Minimalistic way
Install the library:
```
pip install thesaurus-lib
```
Create an object and specify the language:

```
obj = Thesaurus(lang='eng')
```
Show output:

```
obj.show_map()
```
### Run with your own foregrounds:
After you install the library and create the object do the following

1. pass them to the library:

```
text1 = obj.read_pickle('2017')
text2 = obj.read_txt('shakespeare.txt')
text3 = obj.read_text('My foreground in string format')
```
2. Preprocess your foreground:

```
texts = dict()
foreground_name = 'Physics articles 2017'
texts[foreground_name] = obj.custom_preprocessing_of_data(text1)
```
3. Process foregrounds:

```
processed_foregrounds = obj.process_foreground(foreground_names, texts)
```
4. Show output:

```
obj.show_map()
```

### Use your own configurations

After installing the library create a file called 'config.cfg' in your working
directory and fill the value with your own files:

```
[paths]
som_path =
index_path =
back_tokens_path =
back_embeds_path =
stopwords_path =
foregrounds_path =

    [lang]
    som_url =
    embeds_url =
    som_file =
    index_file =
    back_tokens =
    back_embeds =
    embeddings_file =
    STOPWORDS_FILE =
    model =
```

Note: Don't leave any empty field in config.cfg. For example if you aren't providing a som_file
then delete it in your config.cfg and don't keep it in this way:

```
# fill it or delete it
som_file =
```
load-env-vars-at-startup 0.1.0
Codemod to load environment variables at startup. 📝
Requires Python: >=3.7

<h1 align="center">
    <strong>load-env-vars-at-startup</strong>
</h1>
<p align="center">
    <a href="https://github.com/Kludex/load-env-vars-at-startup" target="_blank">
        <img src="https://img.shields.io/github/last-commit/Kludex/load-env-vars-at-startup" alt="Latest Commit">
    </a>
        <img src="https://img.shields.io/github/workflow/status/Kludex/load-env-vars-at-startup/CI">
        <img src="https://img.shields.io/codecov/c/github/Kludex/load-env-vars-at-startup">
    <br />
    <a href="https://pypi.org/project/load-env-vars-at-startup" target="_blank">
        <img src="https://img.shields.io/pypi/v/load-env-vars-at-startup" alt="Package version">
    </a>
    <img src="https://img.shields.io/pypi/pyversions/load-env-vars-at-startup">
    <img src="https://img.shields.io/github/license/Kludex/load-env-vars-at-startup">
</p>

To understand the **motivation** behind this package, you might want to read about [fail fast](https://www.martinfowler.com/ieeeSoftware/failFast.pdf).

What this package does is to make sure you are reading all the environment variables at startup.

## Example

Consider that you have a folder with the following structure:

```
app/
├── __init__.py
└── main.py
```

Inside of `main.py` you have:

```python
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def index():
    name = os.environ["APP_NAME"]
    return {"message": f"Hello, {name}!"}
```

If you run this application, it will run without any problem, but if you forget to set the `APP_NAME` environment variable,
you will get an error when you try to access the `/` endpoint.

To avoid this, you can use this package.

If you decide to use it, your folder structure will look like this:

```
app/
├── __init__.py
├── main.py
└── config.py
```

Your `config.py` will look like this:

```python
from pydantic import BaseSettings

class Settings(BaseSettings):
    APP_NAME: str

settings = Settings()
```

And your `main.py` will look like this:

```python
from fastapi import FastAPI
from app.config import settings

app = FastAPI()

@app.get("/")
def index():
    name = settings.APP_NAME
    return {"message": f"Hello, {name}!"}
```

## Installation

You can install `load-env-vars-at-startup` via [pip](https://pypi.org/project/pip/):

```bash
pip install load-env-vars-at-startup
```

## Usage

```bash
levas DIR
```

Where `DIR` is the directory of your application.

## License

This project is licensed under the terms of the MIT license.
sodexo 20221022
Mysodexo Python client

# Mysodexo Python client

[![Tests](https://github.com/AndreMiras/mysodexo/workflows/Tests/badge.svg)](https://github.com/AndreMiras/mysodexo/actions/workflows/tests.yml)
[![Coverage Status](https://coveralls.io/repos/github/AndreMiras/mysodexo/badge.svg?branch=main)](https://coveralls.io/github/AndreMiras/mysodexo?branch=main)
[![PyPI version](https://badge.fury.io/py/mysodexo.svg)](https://badge.fury.io/py/mysodexo)

A Python client for the Mysodexo [reverse engineered API](https://github.com/AndreMiras/mysodexo/blob/main/docs/ReverseEngineering.md).

## Install & Usage

Install it with pip.

```sh
pip install mysodexo
```

Then use the command line client.

```sh
mysodexo --balance
```

Or the library.

```python
from mysodexo import api
session, account_info = api.login("foo@bar.com", "password")
dni = account_info["dni"]
cards = api.get_cards(session, dni)
card = cards[0]
card_number = card["cardNumber"]
card_details = api.get_detail_card(session, card_number)
card_details["cardBalance"]
```
mysodexo 20221022
Mysodexo Python client

# Mysodexo Python client

[![Tests](https://github.com/AndreMiras/mysodexo/workflows/Tests/badge.svg)](https://github.com/AndreMiras/mysodexo/actions/workflows/tests.yml)
[![Coverage Status](https://coveralls.io/repos/github/AndreMiras/mysodexo/badge.svg?branch=main)](https://coveralls.io/github/AndreMiras/mysodexo?branch=main)
[![PyPI version](https://badge.fury.io/py/mysodexo.svg)](https://badge.fury.io/py/mysodexo)

A Python client for the Mysodexo [reverse engineered API](https://github.com/AndreMiras/mysodexo/blob/main/docs/ReverseEngineering.md).

## Install & Usage

Install it with pip.

```sh
pip install mysodexo
```

Then use the command line client.

```sh
mysodexo --balance
```

Or the library.

```python
from mysodexo import api
session, account_info = api.login("foo@bar.com", "password")
dni = account_info["dni"]
cards = api.get_cards(session, dni)
card = cards[0]
card_number = card["cardNumber"]
card_details = api.get_detail_card(session, card_number)
card_details["cardBalance"]
```