semvec/pypi-packages huggingface dataset:
aioxlsxstream 1.0.3
Asynchronous xlsx files generator
Keywords: async xlsx streaming


# aioxlsxstream

Generate the xlsx file on fly without storing entire file in memory.
Generated excel workbook contain only one sheet. All data writes as strings.

## Installation

```
pip install aioxlsxstream
```

## Requirements

  * Python 3.8+

### Simple exapmle

```python
import aioxlsxstream
import asyncio

async def main():
    async def rows_generaor():
        async def row_cells_generator(row):
            for col in range(5):
                yield row*5 + col
        for row in range(10):
            yield row_cells_generator(row)

    xlsx_file = aioxlsxstream.XlsxFile()
    xlsx_file.write_sheet(rows_generaor())

    with open("example.xlsx", "wb") as f:
        async for data in xlsx_file:
            f.write(data)

asyncio.run(main())
```

### aiohttp Example

```python
from aiohttp import web, hdrs
import aioxlsxstream

async def rows_generaor():
    async def row_cells_generator(row):
        for col in range(5):
            yield row*5 + col
    for row in range(10):
        yield row_cells_generator(row)

async def handle(request):
    filename = "example.xlsx"
    response = web.StreamResponse(
        status=200,
        headers={
            hdrs.CONTENT_TYPE: "application/octet-stream",
            hdrs.CONTENT_DISPOSITION: (f"attachment; " f'filename="{filename}"; '),
        },
    )
    await response.prepare(request)

    xlsx_file = aioxlsxstream.XlsxFile() # or CsvFile("csv") or CsvFile("tsv")
    xlsx_file.write_sheet(rows_generaor())

    async for data in xlsx_file:
        await response.write(data)
    return response

app = web.Application()
app.add_routes([web.get('/', handle)])

if __name__ == '__main__':
    web.run_app(app)
```
dftd-labeler 0.1.2
A convenience tool to label structures with DFT dispersion corrections.

# DFT Dispersion Correction Labeler

This Python-based project is designed to process a database of structures and 
label them with DFT dispersion corrections. It reads an existing database, 
applies the desired DFT dispersion scheme ontop of the present energy and force
labels, and writes the corrected structures to a new database.

## Installation

We recommend working in a conda environment:

```bash
conda create -n dftd-env python=3.9 -y
conda activate dftd-env
```

Then install conda-specific dependencies:

```bash
conda install -c conda-forge ase simple-dftd3 dftd3-python dftd4 dftd4-python -y
```

Finally, install the tools:

```bash
pip install dftd-labeler
```

## Usage

After installation, you can use the tool as a command-line program:

```css
dftd_labeler -i INPUT_DATABASE_PATH -o OUTPUT_DATABASE_PATH -d DISPERSION_SCHEME
```

## Options

 - -m or --dft_method: Specifies the DFT Method to be used. Default is 'SCAN'.
 - -i or --input_database: Specifies the path to the database to be read. This is a required argument.
 - -o or --output_database: Specifies the path to write the labeled database. This is a required argument.
 - -d or --dispersion: Specifies which dispersion scheme to use. Only values 3 or 4 are allowed, indicating DFT-D3 and DFT-D4 respectively. This is a required argument.

## Example

To process a database using the default DFT method (SCAN) and the DFT-D4 dispersion scheme:

```css
dftd_labeler -i my_database.extxyz -o output_database.extxyz -d 4
```

## Dependencies

This project depends on several Python libraries, including ase, dftd4.ase, 
dftd3.ase. Ensure you have all required dependencies installed.

## Contributing

Pull requests are welcome. For major changes, please open an issue first to 
discuss what you would like to change.
py-docker-gadgets 0.1.3
Some convenience tools for managing docker containers in python
Requires Python: >=3.8,<4.0

.. image::  https://badge.fury.io/py/py-docker-gadgets.svg
   :target: https://badge.fury.io/py/py-docker-gadgets
   :alt:    Latest Version

*****************
 py-docker-tools
*****************

-----------------------------------------------------------------
 Some convenience tools for managing docker containers in python
-----------------------------------------------------------------

py-docker-gadgets is a very compact set of tools for working with docker containers in python. Its API exposes
a very simple command to spin up a container and then shut it down.


Super Quick Start
-----------------

 - requirements: `python3`
 - install through pip: `$ pip install py-docker-tools`

Example Usage
-------------

Here's a very basic example of how this could be used:

.. code-block:: python

   from docker_gadgets import start_service, stop_service

   start_service(
       "test-postgres",
       image="postgres",
       env=dict(
           POSTGRES_PASSWORD="test-password",
           POSTGRES_USER="test-user",
           POSTGRES_DB="test-db",
       ),
       ports={"5432/tcp": 8432},
   )
   stop_service("test-postgres")