semvec/pypi-packages huggingface dataset:
cloud_sheets_slim 0.3.0
A lightweight cloud sheets operation library
Requires Python: <4.0,>=3.10

# Cloud Sheets Slim

## Installation

```bash
pip install cloud-sheets-slim
```

## Usage

```bash
from cloud_sheets_slim import CloudSheetsSlim

cloud_sheet = CloudSheetsSlim("https://docs.google.com/spreadsheets/d/1LS1gMp_wFkmuFTS17D***your-doc-key***", "Sheet1")
pdp = sheets.to_pdp()

# query operations
pdp.find({'key': 'value'})
pdp.find_one({'key': 'value'})

# write operations
pdp.update_one({'key': 'value'}, update_object)
pdp.replace_one({'key': 'value'}, update_object)
pdp.delete_one({'key': 'value'})
# send updated result to cloud sheets
cloud_sheet.push_df(pdp.get_df())
```

## Features

load data from cloud sheets to pandas proxy, manipulate data in pandas proxy, every operation will be recorded in pandas proxy, and push back to cloud sheets.

avoid too many API calls to cloud sheets.

### Pandas proxy

- [x] find_one
- [x] find
- [x] insert_one
- [x] insert_many
- [x] replace_one
- [x] update_one
- [x] update_many
- [x] delete_one
- [x] delete_many
- [x] count_records

## Supported Platform

### [x] Google Sheets

- https://developers.google.com/sheets/api/quickstart/python
- https://developers.google.com/sheets/api/guides/concepts
- https://github.com/burnash/gspread
- https://docs.gspread.org/en/latest/oauth2.html

### [ ] Lark sheets

- https://github.com/larksuite/oapi-sdk-python
- https://github.com/larksuite/oapi-sdk-python-demo/blob/main/composite_api/sheets/copy_and_paste_by_range.py
- https://open.larksuite.com/document/server-docs/docs/sheets-v3/spreadsheet-sheet/operate-sheets

### [ ] MS Excel Sheets

- https://github.com/microsoftgraph/msgraph-sdk-python
rest-ai 0.1.3
Using Langchain to parse language to REST API calls.
Requires Python: <4.0,>=3.10

# REST AI

Leverage AI to parse human language to REST API calls.

## Description

**Note: this package is still in development. There will be features not yet available, but contributions are welcome.**

Features:
- Translates plain language to rest api requests using an openapi schema
- Invokes the request, and verifies a correct response
- Uses reasoned retry logic to try and correct invalid requests

Find out more about the package at https://aashishmehta.com/rest-ai-queries-making-apis-smarter/

## Installation

`pip install rest-ai`

## Usage

To use this package, you must have:
- An Openapi schema (loaded as a python dictionary)
- Access to a langchain ChatModel that supports structured outputs
- Details of the API endpoint to call

## Examples

```python
from rest_ai import RestAi
import json
import logging
import sys
from langchain_ollama import ChatOllama

logging.basicConfig(stream=sys.stdout, level=logging.INFO)

base_url = "http://localhost:8000"
file_path = "/path/to/openapi.json"

with open(file_path, "r", encoding="utf-8") as file:
    openapi_spec = file.read()
    openapi_spec = json.loads(openapi_spec)

base_model = ChatOllama(
    base_url="localhost:11434",
    model="llama3.2:3b",
    temperature=0,
)

rest_ai_controller = RestAi(base_url, openapi_spec, base_model)

while True:
    user_input = input("Enter a command to parse into REST API call (or 'exit' to quit): ")
    
    if user_input.lower() == 'exit':
        break
    
    response = rest_ai_controller.invoke(user_input)
    if response:
        print("Response: ")
        print(response.json())
```
drugbank-schemas 0.1.1
Drugbank Schemas Pydantic Models
Requires Python: >=3.9

# drugbank_schemas (v0.1.0)

<p align="center">
    <img src="https://img.shields.io/pypi/dm/rxiv-types?style=flat-square" />
    <img src="https://img.shields.io/pypi/l/rxiv-types?style=flat-square"/>
    <img src="https://img.shields.io/pypi/v/rxiv-types?style=flat-square"/>
    <a href="https://github.com/tefra/xsdata-pydantic">
        <img alt="Built with: xsdata-pydantic" src="https://img.shields.io/badge/Built%20with-xsdata--pydantic-blue">
    </a>
    <a href="https://github.com/dbrgn/coverage-badge">
        <img src="./images/coverage.svg">
    </a>
</p>

## Introduction

The purpose of this package is to provide Pydantic models for Drugbank schema files (XSD). 
It generates Pydantic classes that help parse Drugbank XML Data files.
`xsdata-pydantic` tool. 

## How to install it?
pip install drugbank-schemas

## How do I use it?
You can import the generated Pydantic models for drunbank schema files and use them 
to parse your drugbank XML files.

```python
from xsdata_pydantic.bindings import XmlParser
from xsdata.formats.dataclass.context import XmlContext

from drugbank_schemas.models.drugbank_latest import Drugbank

parser = XmlParser(context=XmlContext())
drugbank = parser.parse("drugbank_5.1.10.xml", Drugbank)
```
pyctx 0.1.10
Context package to use data between function calls, use timers and log it.
Requires Python: >=3.10
Keywords: code_execution, context, ctx, log, request, request_context, timer

CTX
----

[![pipeline status](https://gitlab.com/molcay/pyctx/badges/master/pipeline.svg)](https://gitlab.com/molcay/pyctx/commits/master)
[![coverage report](https://gitlab.com/molcay/pyctx/badges/master/coverage.svg)](https://gitlab.com/molcay/pyctx/commits/master)

Context package to use data between function calls, use timers and log it.

For example; you want to have some decision points in your code, or you want to measure the time spent on a specific calculation or I/O operation:

```python
from pyctx.context import Context

ctx = Context('APP')
x = 100
y = (x + 1) * (x - 1)
ctx.log.set_data('isEven', y % 2)
ctx.log.set_data('y', y)
ctx.log.start_timer('timer1')
import time

time.sleep(1)
ctx.log.stop_timer('timer1')
with ctx.log.timeit('timer2_context_manager'):
    time.sleep(5)

ctx.finalize()
```

- As a return value of the `ctx.finalize()`, you will get python dictionary.
You can use any json serialization to convert the dictionary to string.
Here is the above result:

```json
{
  "type": "APP",
  "ctxId": "0fdecfe0-067e-4bdd-9920-3b7ed46d8a98",
  "startTime": "2019-08-06 09:42:31.222184",
  "endTime": "2019-08-06 09:42:37.236861",
  "data": {
    "isEven": 1,
    "y": 9999
  },
  "timers": {
    "timer1": 1.00633,
    "timer2_context_manager": 5.002412
  }
}
```