semvec/pypi-packages huggingface dataset:
prisma-to-sqlmodel 0.1.0
Convert Prisma schema to SQLModel models
Requires Python: >=3.12

# Prisma to SQLModel

A tool to convert Prisma schema files to SQLModel models. This tool helps you migrate from Prisma to SQLModel while preserving your data model structure, relationships, and indexes.

## Features

- Converts Prisma models to SQLModel classes
- Preserves relationships (one-to-one, one-to-many, many-to-many)
- Handles indexes and primary keys
- Supports vector fields with pgvector
- Maintains field types and constraints
- Generates proper SQLModel relationships with back_populates

## Installation

```bash
pip install prisma-to-sqlmodel
```

## Usage

### Command Line Interface

```bash
prisma-to-sqlmodel schema.prisma output.py
```

### Python API

```python
from prisma_to_sqlmodel import PrismaConverter

converter = PrismaConverter("schema.prisma")
python_code = converter.convert()

# Write to file
with open("output.py", "w") as f:
    f.write(python_code)
```

## Example

### Input (schema.prisma)

```prisma
model User {
  id        Int      @id @default(autoincrement())
  email     String   @unique
  name      String?
  posts     Post[]
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}

model Post {
  id        Int      @id @default(autoincrement())
  title     String
  content   String   @db.Text
  author    User     @relation(fields: [authorId], references: [id])
  authorId  Int
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}
```

### Output (output.py)

```python
from datetime import datetime
from typing import Optional, List
from sqlmodel import Field, SQLModel, Relationship

class User(SQLModel, table=True):
    __tablename__ = "User"

    id: int = Field(primary_key=True)
    email: str = Field(unique=True)
    name: Optional[str] = None
    posts: List["Post"] = Relationship(back_populates="author")
    created_at: datetime = Field(default_factory=datetime.utcnow)
    updated_at: datetime = Field(sa_column=Column(sql.func.now(), onupdate=sql.func.now()))

class Post(SQLModel, table=True):
    __tablename__ = "Post"

    id: int = Field(primary_key=True)
    title: str
    content: str = Field(sa_column=Column(Text))
    author: User = Relationship(back_populates="posts")
    author_id: int = Field(foreign_key="User.id")
    created_at: datetime = Field(default_factory=datetime.utcnow)
    updated_at: datetime = Field(sa_column=Column(sql.func.now(), onupdate=sql.func.now()))
```

## Development

1. Clone the repository
2. Create a virtual environment: `python -m venv .venv`
3. Activate the virtual environment:
   - Windows: `.venv\Scripts\activate`
   - Unix/MacOS: `source .venv/bin/activate`
4. Install dependencies: `pip install -e ".[dev]"`
5. Run tests: `pytest`

## License

MIT License
geomodel-optimizer 0.5.1
Location optimizer for Waiwera simulations
Requires Python: >=3.10

# Description

This borehole location optimizer was developed as part of the [GeoModel](https://geomodel.pl/) project. The goal is to enable operators of geothermal fields to make informed decisions on how to expand production of their geothermal fields.

# Guide

A detailed user's guide is contained in [guide.md](https://github.com/ISOR-Geothermal/GeoModel-Optimizer/blob/master/guide.md). 

# License

MIT license
litecache2 0.1.5
A lightweight async TCP dictionary server with RESP support
Requires Python: >=3.11

# litecache

## Introduction
---------------

litecache is a basic in-memory key-value store written in Python supporting a subset of RESP (redis serialization language)

## Features
------------

* **Key-Value Cache**: Store and retrieve data using a simple key-value pair system
* **RESP**: support a subset of resp so should work with any redis client (SET,GET,DEL)
* **Simple**: small code base and fairly readable so should be easy to understand and make updates to

## Installation
---------------

To install litecache, run the following command:
```bash
pip install litecache2
```

or

```
pip install git+https://github.com/psqnt/litecache.git
```

## Usage
-----

### Basic Example
```
$ litecache --host localhost --port 6399
```


(development)
```bash
$ uv run litecache
```

using docker:
```
$ docker build -t litecache:latest .
$ docker run litecache:latest
```

## Configuration
---------------

litecache can be configured using the following cli parameters:

```
--host
--port
```

## Testing
-------

To run the tests, use the following command:
```bash
uv run pytest
```
nlp-date-parser 0.0.1
A simple NLP-based date parser to extract dates from text.
Requires Python: >=3.6

# NLP Date Parser

A Python package to parse natural language date expressions like:

âœ… `next Tuesday`  
âœ… `in 3 days`  
âœ… `tomorrow at noon`  

## Installation & Usage

```sh
pip install nlp_date_parser
 
**Usage**

from nlp_date_parser import NLPDateParser

parser = NLPDateParser()
print(parser.parse("next Friday"))
ed-utility 0.1.0
EasyDrop utils Package
Requires Python: >=3.12
Keywords: ed_utility, pypi, package

# Domain Model

## How to Use

### If you have `poetry` installed, 

Run the following command to install dependencies, create a virtual environment, and start the application:
```bash
poetry install
poetry shell
make run
```

### If you don't have `poetry` installed,

Run the following command to run the application inside a docker container:

```bash
make run.docker
```

## API Endpoints
- Open your browser and navigate to `http://localhost:8000/` to view the API documentation.
pyopsin 0.2.4
A simple python wrapper for OPSIN: Open Parser for Systematic IUPAC nomenclature.
Requires Python: >=3.9

PyOPSIN
====================

This is a Python wrapper for the OPSIN (Open Parser for Systematic IUPAC Nomenclature) package, which allows you to generate SMILES and CML form the standardized IUPAC names for organic molecules. The original OPSIN package was written in Java, but this wrapper allows you to use OPSIN functionality directly from Python.

Installation
------------

To install PyOPSIN, run

```bash
pip install pyopsin
```

Usage
-----

Here's an example of how to use the PyOPSIN to generate SMILES string using the IUPAC name for a molecule:

```python
from pyopsin.pyopsin import PyOpsin

# create an PyOpsin object
opsin = PyOpsin()

# generate the SMILES string from an IUPAC name for a molecule
name = "2,4,6-trinitrotoluene"
smiles = pyopsin.to_smiles(name)

# print the SMILES string
print(smiles)
```

This should output the following SMILES string:

```bash
[N+](=O)([O-])C1=C(C)C(=CC(=C1)[N+](=O)[O-])[N+](=O)[O-]
```

Here is another example of how to invoke parallel processing to process a list of IUPAC names:

```python
names = ["2,4,6-trinitrotoluene", "cycloheptene"]
smiles = pyopsin.to_smiles(names, num_workers=2)
print(smiles)
```

This should output the following SMILES strings:

```bash
["[N+](=O)([O-])C1=C(C)C(=CC(=C1)[N+](=O)[O-])[N+](=O)[O-]", "C1=CCCCCC1"]
```

Acknowledgments
---------------

The OPSIN Python wrapper is built on top of the [OPSIN package](https://opsin.ch.cam.ac.uk/), which was developed by the Centre for Molecular Informatics at the University of Cambridge. We would like to thank the developers of OPSIN for creating such a powerful and useful tool.