semvec/pypi-packages huggingface dataset:
sartorius 0.7.0
Python driver for Sartorius and Minebea Intec scales.

sartorius
=========

Asynchronous python ethernet interface and command-line tool for Sartorius and
Minebea Intec scales.

![](https://www.dataweigh.com/media/11870/signum1.jpg)

Compatibility
=============

This driver should work for any ethernet scale that uses the standardized communications
protocol of the Scale Manufacturers Association. However, it has only been tested
on the following models:

 * Minebea Intec Signum
 * Sartorius Entris
 * Sartorius Miras

Installation
============

```
uv install sartorius
```

Scale Setup
===========

For Minebea scale setup, navigate to `SETUP` - `UNICOM` - `DATAPROT` - `ETHER`.

  * Make sure `SRC.IP` is set to a valid LAN address
  * Ensure `MODE` - `SBI-SRV` - `6.1.1` is set (manual says this should be default but it is not)
  * All other defaults are good

This driver is intended to be stable to disconnects, so operators should be
able to unplug and reposition the device without affecting any long polling.

Command Line
============

```
$ sartorius scale-ip.local
{
    "mass": 0.0,
    "units": "kg",
    "stable": true,
    "info": {
        "model": "SIWADCP-1-",
        "serial": "37454321",
        "software": "00-37-09"
    }
}
```
If using a port other than the default of 49155 e.g. for a MODBUS gateway, use `--port`
or a colon between the IP address and port.
`sartorius 192.168.1.1 --port 10000` or `sartorius 192.168.1.1:12345`

You can tare and zero with `--zero` and remove the info field with `--no-info`.
See `sartorius --help` for more.

To use in shell scripts, parse the json output with something like
[jq](https://stedolan.github.io/jq/). For example,
`sartorius scale-ip.local | jq .mass` will return the mass.

Python
======

If you'd like to link this to more complex behavior, consider using a Python
script. This driver exclusively supports asynchronous Python ≥3.7.

```python
import asyncio
import sartorius

async def get():
    async with sartorius.Scale('scale-ip.local') as scale:
        await scale.zero()             # Zero and tare the scale
        print(await scale.get())       # Get mass, units, stability
        print(await scale.get_info())  # Get model, serial, software version

asyncio.run(get())
```
pytwain-extensions 0.1.0
A Python library that extends pytwain with pythonic design to make working with the TWAIN api easier. Built on TWAIN 2.5 specification.
Requires Python: >=3.10

# Twain Extensions

Twain Extensions is a Python library designed to enhance usability of the [pytwain](https://pypi.org/project/pytwain/) library with a pytonic design layered on top of the existing functionality.

## Features

- **Capability Registries**: Predefined registries for audio, image, and general capabilities including documentation from the [TWAIN specification](https://twain.org/wp-content/uploads/2021/11/TWAIN-2.5-Specification.pdf).
- **Dynamic Code Generation**: Can generate a pydantic model for the configuration of a given scanner using Jinja2 templates.
- **Enhanced Data Types**: Translates TWAIN specific enums and frames into pythonicly typed variables.

## Groups
The library offers grouped installation of dependencies for different use cases:
- `twain_extensions`: Installs the core library with enums and registries. No additional dependencies.
- `twain_extensions[dev]`: Includes all development dependencies such as testing and linting tools.
- `twain_extensions[generate]`: Includes dependencies required for code generation features.

## Installation

To install the required dependencies, I recommend using [uv](https://uv.sh/).

```bash
uv sync --all-groups
```

## Usage

### Generating Scanner Models

You can generate a Python model for a scanner configuration using the `generate_scanner_model` function:

```python
from twain_extensions.generate.generate import generate_scanner_model

source = twain.Source("Your Scanner Name")
generate_scanner_model(source, "output_file.py")
```

### Capability Registries

The library includes predefined registries for various TWAIN capabilities:

- `AUDIO_CAP_REGISTRY`
- `IMAGE_CAP_REGISTRY`
- `GENERAL_CAP_REGISTRY`


## Project Structure

```
.
├── src/
│   ├── twain_extensions/
│   │   ├── enums.py
│   │   ├── frame.py
│   │   ├── generate/
│   │   │   ├── generate.py
│   │   │   ├── template.py
│   │   ├── registries/
│   │   │   ├── audio_capabilities.py
│   │   │   ├── capability.py
│   │   │   ├── general_capabilities.py
│   │   │   ├── image_capabilities.py
├── tests/
│   ├── test_registries.py
│   ├── test_registry_entries.py
```

## Development

### Running Tests

To run the tests, use:

```bash
pytest
```

### Linting

This project uses Ruff for linting. To check for linting errors, run:

```bash
ruff check .
```

## Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

## Acknowledgments & Copyrights

This software is an implementation of the TWAIN specification.

* TWAIN (Classic) Specification: © 1991-2025 TWAIN Working Group. All rights reserved.

* Portions of the documentation strings in this library are quoted directly from the TWAIN Specification to assist developers. These descriptions remain the intellectual property of the TWAIN Working Group.

* For more information, visit twain.org.

## Contact

For any questions or feedback, please contact Jonathan Costa at jonathanleonhard.costa@gmail.com.
pdfme 0.5.0
Create PDFs easily
Requires Python: >=3.6

# pdfme

This is a powerful library to create PDF documents easily.

The way you create a PDF document with pdfme is very similar to how you create
documents with LaTex: you just tell pdfme at a very high level what elements you
want to be in the document, without worrying about wrapping text in a box,
positioning every element inside the page, creating the lines of a table, or the
internals of the PDF Document Format. pdfme will put every element
below the last one, and when a page is full it will add a new page to keep
adding elements to the document, and will keep adding pages until all of the
elements are inside the document. It just works.

If you want the power to place elements wherever you want and mess with the PDF
Document Format internals, pdfme got you covered too. Give the docs a look to
check how you can do this.

## Main features

* You can create a document without having to worry about the position of each
  element in the document. But you have the possibility to place any element
  wherever you want too.
* You can add rich text paragraphs (paragraphs with text in different sizes,
  fonts, colors and styles).
* You can add tables and place whatever you want on their cells, span columns
  and rows, and change the fills and borders in the easiest way possible. 
* You can add content boxes, a multi-column element where you can add 
  paragraphs, images, tables and even content boxes themselves. The elements
  inside this content boxes are added from top to bottom and from left to right.
* You can add url links (to web pages), labels/references, footnotes and
  outlines anywhere in the document.
* You can add running sections, content boxes that will be included in every
  page you add to the document. Headers and footers are the most common running
  sections, but you can add running sections anywhere in the page.
## Installation

You can install using pip:
```
pip install pdfme
```

## Documentation

* Docs and examples: https://pdfme.readthedocs.io