semvec/pypi-packages huggingface dataset:
twinfield 2.1.3
Read and insert data using the Twinfield API.
Requires Python: >=3.7
Keywords: python, twinfield, API

<p align="center"><img alt="logo" src="https://www.zypp.io/static/assets/img/logos/zypp/white/500px.png" width="200"></p>

[![Downloads](https://pepy.tech/badge/twinfield)](https://pepy.tech/project/twinfield)
[![Open Source](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://opensource.org/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyPI](https://img.shields.io/pypi/v/twinfield)](https://pypi.org/project/twinfield/)
[![Latest release](https://badgen.net/github/release/zypp-io/twinfield)](https://github.com/zypp-io/twinfield/releases)

Twinfield
====

---
> Python package for reading Twinfield data using the Twinfield API.

## Installation

---
```commandline
pip install twinfield
```

## Usage
for an extensive list of examples, please checkout the [twinfield test suite](twinfield/tests/test_twinfield.py).

```python
from twinfield import TwinfieldApi

# logging in
tw = TwinfieldApi()

# sending browse request.
df = tw.query_by_year(code="030_3", year=2021)

# sending dimensions request
df = tw.dimensions(dim_type="CRD")
```
## required environment variables
Twinfield works with OpenID Connect. OpenID Connect is a simple identity layer on top of the OAuth 2.0 protocol.
In order to authenticate with the twinfield server, the following environment variables must be set. Please see the
[Twinfield webservice documentation](https://accounting.twinfield.com/webservices/documentation/#/ApiReference/Authentication/OpenIdConnect)
on the walktrough how to obtain the refresh token and set the app registration.

```shell
"TWINFIELD_ORGANISATION"
"TWINFIELD_CLIENT_ID"
"TWINFIELD_CLIENT_SECRET"
"TWINFIELD_REFRESH_TOKEN"
```

## optional environment variables
TQDM accepts environmental variables to overwrite default settings `TQDM_*` i.e.,
```shell
TQDM_DISABLE=1
TQDM_MININTERVAL=5
```

How to set environment variables?
- [Windows](https://stackoverflow.com/questions/5898131/set-a-persistent-environment-variable-from-cmd-exe)
- [macOS](https://apple.stackexchange.com/questions/106778/how-do-i-set-environment-variables-on-os-x)
- [Linux](https://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables)

---

## api scoping (security) advice
Please note that there are different levels of API access in Twinfield app's. It is recommended to use level 3 access over level 1 access.
Level 3 is sufficient for working with the dataservices.

### Twinfield deprecation notices
- The module salesinvoice is only to be used if invoices need to be generated. If only the transaction registration is necessary, use the transactions endpoint.
- modules have versions, for instance the 030 module can be pulled with suffix _1 or _3. It is advised to use the latest version because the speed of the requests is greater.


---

[Link](https://www.twinfield.nl/api) to the Twinfield API documentation.

---

For business inquiries concerning this package, contact us at hello@zypp.io
find-step 0.0.2
All the str.find() goodness, now with a step argument
Requires Python: >=3.10

find-step
=========

find-step supplements Python ``str.find()`` and ``bytes.find()`` methods
with an extra *step* argument - just like slicing has ``s[start:end:step]``.


Usage
-----

If *step* is ``None``, ``1``, or omitted then behaviour is unchanged
from ``str.find()`` or ``bytes.find()``.

.. code:: pycon

   >>> import find_step
   >>> find_step.find('.a.a.a.a', 'a')  # Same as '.a.a.a.a'.find('a')
   1

If *step* is 2 or higher then only indexes satisfying
``start + n * step`` are tried, where ``n >= 0``.

.. code:: pycon

   >>> find_step.find('.a.a.a.a', 'a', None, None, 3)  # Tries index 0, then index 3
   3
   >>> find_step.find('hello', 'l', 1, None, 2)  # Tries index 1, then index 1 + 2 = 3
   3
   >>> find_step.find('abcde', 'c', 1, None, 2)  # Tries index 1, then 3, then 5
   -1

If *step* is ``O`` then ``ValueError`` is raised, as in slice notation.

.. code:: pycon

   >>> find_step.find('abc', 'a', None, None, 0)
   Traceback (most recent call last):
       ...
   ValueError: slice step cannot be zero


Install
-------

.. code:: shell

   python3 -m pip install find-step`

or

.. code:: shell

   uv pip install find-step


License
-------

..
   SPDX-FileCopyrightText: 2025 Alex Willmer <alex@moreati.org.uk>
   SPDX-License-Identifier: MIT

MIT
textual-pdf-view 0.1.0
Add your description here
Requires Python: >=3.13

# Textual PDF View

A Textual widget for viewing PDF files.

## Installation

Install the package using your package manager:

```sh
pip install textual-pdf
uv add textual-pdf
poetry add textual-pdf
```

## Usage

Here is a simple example of how to use the `PDFViewer` widget in your Textual application:

```python
from textual.app import App, ComposeResult
from textual_pdf_view.pdf_viewer import PDFViewer

class PDFApp(App):
    def compose(self) -> ComposeResult:
        yield PDFViewer("path/to/your/document.pdf")

app = PDFApp()
app.run()
```

The `PDFViewer` class also comes with an option to switch protocols

`PDFViewer` supports whatever image protocols `textual-image` supports, which are `TGP`, `Sixel`, and `Halfcell` and `Unicode`

`TGP` and `Sixel` are the most recommended to use as they allow the clearest image to be produced. `Halfcell` and `Unicode` are not readable at all, and simply exists for the fun of it.

```py
# use tgp
PDFViewer("path/to/your/document.pdf", protocol="TGP")
# autodetect (default)
PDFViewer("path/to/your/document.pdf", protocol="Auto")
```

## CLI

This package also provides a command-line interface to view PDF files directly from your terminal.

```sh
textual-pdf-view /path/to/your/document.pdf
```

## Key Bindings

| Key                                   | Action              |
| ------------------------------------- | ------------------- |
| `Down`, `Right`, `j`, `l`, `PageDown` | Go to next page     |
| `Up`, `Left`, `k`, `h`, `PageUp`      | Go to previous page |
| `PageDown`                            | Go to next page     |
| `PageUp`                              | Go to previous page |
| `Home`                                | Go to first page    |
| `End`                                 | Go to last page     |

## License

This project is licensed under the MIT License.
keycard 0.3.0
KeyCard Python SDK - APDU communication and cryptographic utilities.

# KeyCard Python SDK

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Python](https://img.shields.io/badge/python-3.13.3-blue.svg)](https://www.python.org/downloads/) [![codecov](https://codecov.io/gh/mmlado/keycard-py/branch/main/graph/badge.svg)](https://codecov.io/gh/mmlado/keycard-py) [![PyPI version](https://img.shields.io/pypi/v/keycard.svg)](https://pypi.org/project/keycard/) [![Build status](https://github.com/mmlado/keycard-py/actions/workflows/publish.yml/badge.svg)](https://github.com/mmlado/keycard-py/actions/workflows/publish.yml) [![Documentation](https://img.shields.io/badge/docs-gh--pages-blue.svg)](https://mmlado.github.io/keycard-py/) ![stars](https://img.shields.io/github/stars/mmlado/keycard-py.svg?style=social) ![lastcommit](https://img.shields.io/github/last-commit/mmlado/keycard-py.svg) ![numcontributors](https://img.shields.io/github/contributors-anon/mmlado/keycard-py.svg) 

A minimal, clean, fully native Python SDK for communicating with [Keycard](https://keycard.tech) smart cards.

This SDK is under active development.  
APDU commands are being implemented one by one.

## Supported Commands

- [x] SELECT
- [x] INIT
- [x] IDENT
- [x] OPEN SECURE CHANNEL
- [x] MUTUALLY AUTHENTICATE
- [x] PAIR
- [x] UNPAIR
- [x] GET STATUS
- [x] VERIFY PIN
- [x] CHANGE PIN
- [x] UNBLOCK PIN
- [x] LOAD KEY
- [x] DERIVE KEY
- [x] GENERATE MNEMONIC
- [x] REMOVE KEY
- [x] GENERATE KEY
- [x] SIGN
- [x] SET PINLESS PATH
- [x] EXPORT KEY
- [x] STORE DATA
- [x] GET DATA
- [x] FACTORY RESET

## Goals

- Fully native Python implementation
- Clean API surface
- Easy to integrate
- Clear separation between transport, protocol, parsing, and crypto
- Fully tested, deterministic behavior
- Focused on correctness, clarity, and maintainability

## Installation

```bash
git clone https://github.com/mmlado/keycard-py.git
cd keycard-py
python -m venv venv
source venv/bin/activate
pip install -e .
pytest
```

## License

MIT

## Contributions

Contributions are welcome as this SDK grows.