semvec/pypi-packages huggingface dataset:
redis_models 0.4.3
This package provides a simple model structure for redis based storage.

# Redis Models

This package provides a simple model structure for redis based storage.
It acts like an ORM and allows you to create models with validation.


## Installation

```bash
pip install redis_models
```

## Usage

First, you need to create your model. It's similar to Pydantic models, or built-in dataclass.

```python
from redis_models.models import RedisModel


class MyUserModel(RedisModel):
    name: str
    age: int

    class Meta:
        redis_url = "redis://localhost:6379/0"
        indexes = ("name", )

```

Let's create a User object


```python
user = User(name="John Doe", age=30)
```

Let's try creating an object that does not fit to the definition

```python
try:
    bad_user = User(name="John", eye_color="blue")
except ValidationError:
    pass
```

Let's write it to Redis
```python
user.save()
```

Let's see its `id`. `id`s are UUID4 hex strings

```python
print(user.id)
```

Fetch the record from Redis

```python
user_again = User.get(id=user.id)
```

See the object as dictionary

```python
print(user.asdict())
```

Let's delete the record

```python
user_again.delete()
```

Trying to find a non-existing record throws NotFound exception

```python

from redis_models.errors import NotFound

try:
    user_not_found = User.get(id=user_again.id)
except NotFound:
    print("User not found!")

```

Trying to filter with exact values. 
In this example, `name` field is noted as an index in the model.

```python

User.filter(name="nejdet")
```

## How it works

This package relies on `RedisModelMeta` and `RedisModel` classes.
`RedisModelMeta` is a type constructor and `RedisModel` is a class that contains required methods for derived models.


When you call `YourModel.save()` the method will


- Run `YourModel.asdict()` and get the whole data serialized to JSON (Therefore each field must be JSON-serializable!)

- Create a key like `YourModel-data-<SOME_UUID>` and puts the whole serialized data as value

- Create an index set for each field you put in `YourModel.Meta.indexes` using `YourModel-index-<INDEX_FIELD_NAME>-<INDEX_FIELD_VALUE>` format and UUID for each record as a value.


When you call `YourModel.get(id=id_value)` the method will search among `YourModel-data-<SOME_UUID>` keys and return the data.

When you call `YourModel.filter(index1=value1, index2=value2)` the method will 

- Use `SINTER` to have an intersection for UUIDs. 
- Then uses `MGET` to get multiple values at once. 
- Returns a generator that yields `YourModel` objects (for memory efficiency).
pypontem 1.1.5
The one-stop python toolkit for Flow Assurance workflows
Requires Python: >=3.11


<img style="float:right;" src="https://cdn.prod.website-files.com/645a93c524f9bd7ace372f1b/646ba830c8f56fa29664d1d7_logo.svg" alt="Pontem Analytics Logo" width="100" />


# Welcome to pypontem

![GitHub release](https://img.shields.io/pypi/v/pypontem)
![License](https://img.shields.io/badge/license-MIT-green)
![Python Version](https://img.shields.io/badge/python-3.12.3-blue)

**pypontem** is a Python-based library designed for postprocessing simulation outputs generated by **OLGA**, a leading transient multiphase flow simulator. It helps **flow assurance engineers** efficiently extract, organize, and analyze simulation data.

## Table of Contents
- [Key Features](#key-features)
- [Installation](#installation)
- [Usage Example](#usage-example)
- [Authors](#authors)
- [Further Resources](#further-resources)
- [Contributing](#contributing)
- [License](#license)
- [Contact & Support](#contact--support)

## Key Features
- **Metadata Extraction** – Retrieve simulation metadata (e.g., version, title, author).
- **Branch Analysis** – Identify branch names and extract elevation profiles.
- **Variable Search** – Search variable catalogs based on name, location, or pipeline section.
- **Trend Data Extraction** – Extract time-series data from **TPL** files.
- **Profile Data Extraction** – Extract spatial profile data from **PPL** files.
- **Unit Conversion** – Seamless and robust handling of unit transformations.

## Installation
pypontem requires **Python 3.12.3**. Follow these steps to install:

```sh
# Create a new Conda environment
conda create -n pypontem_env python=3.12.3 jupyter 

# Activate the environment
conda activate pypontem_env

# Install the package
pip install pypontem
```

## Usage Example
Once installed, you can start using **pypontem** as follows:

```python
from pypontem.tpl.tplparser import tplParser

# Load a sample OLGA simulation file
tpl = tplParser(r'example_tpl.tpl')

# Extract metadata from a tpl file
metadata = tpl.metadata
print(metadata)
```

For a detailed walkthrough, check the **[official documentation](https://pypontem.pontemanalytics.com/)**.

## Contributing
We welcome contributions! Follow these steps to contribute:
1. Fork the repository.
2. Create a new branch.
3. Make your changes and commit them.
4. Submit a pull request for review.


## Authors
- **Pontem Analytics**

## Further Resources
- 📚 **[Official Documentation](https://pypontem.pontemanalytics.com/)** – Learn how to use pypontem effectively.
- 💻 **[GitHub Repository](https://github.com/Pontem-Analytics/pypontem_public)** – Explore the source code, contribute, or report issues.

## License
This project is licensed under the **MIT License**.

## Contact & Support
For support, feature requests, or bug reports, open an issue in the **[GitHub repository](https://github.com/Pontem-Analytics/pypontem_public/issues)**
boadata 0.4.2
(B)rother (O)f (A)rbitrary Data - Python CLI tools for data.
Requires Python: <3.15,>=3.11

boadata
=======

(B)rowser (O)f (A)rbitrary Data - a Python browser of tabular data.
The goal is to create a simple tool for scientists / data miners
to browse and plot various data sources in one simple environment.

It's a set of tools, as well as a library.

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

```bash
uv tool install boadata
```

Concepts
--------
* uri - boadata tries to support odo URIs
* data object - wrapper around basic data types (a.k.a odo.resource but with wrapper)
* data tree - browseable that can contain nodes (some of the nodes can be data objects)
* data conversion - between different object types
* view - visual representation of a data objects

In progress: the data objects will use narwhals mostly.

CLI tools
---------
Run `<command> --help` to see full list of options

* `boa-describe <uri>` - show basic info about a data object
* `boa-tree <uri>` - list nodes in a data tree
* `boa-cat <uri>` - print tabular representation of a dataobject
* `boa-convert <from+> <to>` - convert one data source into another
* `boa-table <uri>` - a tabular view of data based on textual

Status
------
* in (slow) development

Requirements
------------
* pandas
* numpy
* numexpr
* click
* tabulate
* blinker (perhaps to be removed)
* h5py (optional)
* sqlalchemy (optional)
* matplotlib (to become optional)
* bokeh (to become optional instead of matplotlib)
* seaborn
* pandas_profiling (optional - dataframe summaries)
* datadotworld (optional - for their datasets)

* Python 3.11+

Supported formats and sources
-----------------------------
* File system tree
* HDF5
* CSV (including web links)
* SQL based on SqlAlchemy (sqlite supported)
* pydataset datasets
* seaborn datasets
* MATLAB .fig files
* data.world datasets/tables (that can be imported pandas dataframes)