semvec/pypi-packages huggingface dataset:
operationunitaire 0.2.5
A Python package for rigorous distillation simulations.
Requires Python: >=3.7

## ***Usage***

### **Overview**

`operationunitaire` is designed to streamline the process of distillation column simulations. With just a few inputs, you can calculate the volatilities, coefficients, and liquid fractions for multi-component distillation columns.

### **Example Script**

To use the package, create a Python script (e.g., `calc.py`) and add the following code:

```python
from operationunitaire.main import run_simulation

# User Inputs
stage_temperatures = {1: 65, 2: 90, 3: 115, 4: 140, 5: 165}
feed_composition = {'C3': 0.3, 'NC4': 0.3, 'NC5': 0.4}
vapor_flow_rates = {1: 0, 2: 150, 3: 150, 4: 150, 5: 150}
feed_flow_rates = {1: 0, 2: 0, 3: 100, 4: 0, 5: 0}

# Run the simulation
run_simulation(stage_temperatures, feed_composition, vapor_flow_rates, feed_flow_rates)

```
pybeef 0.0.14
Opinionated distributed RPC using AMQP workers
Requires Python: >=3.9

# beef

Beef is good for your health.

An opinionated distributed RPC using AMQP messages (inspired by celery amqp backend).

## Installing

```bash
pip install pybeef
```

## Usage

Worker:

```python
from beef import beef

@beef
async def add(x: int, y: int) -> int:
    return x + y
```

Server:

```python
async def server():
    async with add.connect('amqp://localhost/'):
        await add.serve()  # here server blocks forever, executing incoming tasks

if __name__ == '__main__':
    import asyncio

    asyncio.run(server())
```

Client (blocking):

```python
async def client():
    async with add.connect('amqp://localhost/'):
        task_id = await add.submit(1, 2)  # submits task
        result = await add.result(task_id)  # waits for completion

if __name__ == '__main__':
    import asyncio

    asyncio.run(client())
```

Client (polling):

```python
import asyncio

async def client():
    async with add.connect('amqp://localhost/'):
        task_id = await add.submit(1, 2)  # submits task

        while True:
            status = await add.get_status(task_id)
            if status.is_final:
                break
            await asyncio.sleep(1)
        print(f'Task {task_id} completed with status {status})

if __name__ == '__main__':
    import asyncio

    asyncio.run(client())
```

## Testing

You need a running RabbitMQ server for testing. For example:

```bash
docker run -it --network host rabbitmq
```

Then, make sure that test dependencies are installed:

```bash
pip install .[test]
```

Finally, run the tests

```bash
python -m pytest beef/test
```

or

```bash
make test
```

## Building

```bash
pip wheel . --no-deps -w wheels/
```

or

```bash
make
```

## Publishing

```bash
twine upload wheels/pybeef-XXX.whl -u __token__ -p <secret-pipy-token>
```