semvec/pypi-packages huggingface dataset:
workos 5.42.1
WorkOS Python Client
Requires Python: >=3.8

# WorkOS Python Library

![PyPI](https://img.shields.io/pypi/v/workos)
[![Build Status](https://workos.semaphoreci.com/badges/workos-python/branches/main.svg?style=shields&key=9e4cb5bb-86a4-4938-9ec2-fc9f9fc512be)](https://workos.semaphoreci.com/projects/workos-python)

The WorkOS library for Python provides convenient access to the WorkOS API from applications written in Python, [hosted on PyPi](https://pypi.org/project/workos/)

## Documentation

See the [API Reference](https://workos.com/docs/reference/client-libraries) for Python usage examples.

## Installation

To install from PyPi, run the following:

```
pip install workos
```

To install from source, clone the repo and run the following:

```
python -m pip install .
```

## Configuration

The package will need to be configured with your [api key and client ID](https://dashboard.workos.com/api-keys).

```python
from workos import WorkOSClient

workos_client = WorkOSClient(
    api_key="sk_1234", client_id="client_1234"
)
```

The SDK also provides asyncio support for some SDK methods, via the async client:

```python
from workos import AsyncWorkOSClient

async_workos_client = AsyncWorkOSClient(
    api_key="sk_1234", client_id="client_1234"
)
```

## SDK Versioning

For our SDKs WorkOS follows a Semantic Versioning ([SemVer](https://semver.org/)) process where all releases will have a version X.Y.Z (like 1.0.0) pattern wherein Z would be a bug fix (e.g., 1.0.1), Y would be a minor release (1.1.0) and X would be a major release (2.0.0). We permit any breaking changes to only be released in major versions and strongly recommend reading changelogs before making any major version upgrades.

## Beta Releases

WorkOS has features in Beta that can be accessed via Beta releases. We would love for you to try these
and share feedback with us before these features reach general availability (GA). To install a Beta version,
please follow the [installation steps](#installation) above using the Beta release version.

> Note: there can be breaking changes between Beta versions. Therefore, we recommend pinning the package version to a
> specific version. This way you can install the same version each time without breaking changes unless you are
> intentionally looking for the latest Beta version.

We highly recommend keeping an eye on when the Beta feature you are interested in goes from Beta to stable so that you
can move to using the stable version.

## More Information

- [Single Sign-On Guide](https://workos.com/docs/sso/guide)
- [Directory Sync Guide](https://workos.com/docs/directory-sync/guide)
- [Admin Portal Guide](https://workos.com/docs/admin-portal/guide)
- [Magic Link Guide](https://workos.com/docs/magic-link/guide)
fastpluggy-ui-tools 0.0.12
UI Tools plugin for Fastpluggy
Requires Python: >=3.10

# UI Tools Module for FastPluggy

A FastPluggy module that provides a collection of Jinja2 template filters and HTML rendering utilities for building user interfaces. 
It includes base64 encoding, Pydantic model dumping, localization, JSON rendering, and image embedding.

## Features

* **Base64 Encoding**: `b64encode` filter to convert binary data to Base64 strings.
* **Pydantic Model Dump**: `pydantic_model_dump` filter to serialize Pydantic `BaseModel` or `BaseSettings` instances to dictionaries.
* **Localization**: `localizedcurrency`, `localizeddate`, and `nl2br` filters for number, date/time formatting, and newline-to-HTML conversions using Babel.
* **JSON Rendering**: `from_json` filter and HTML list conversion utilities for safely displaying JSON data.
* **Image Rendering**: Embed Base64-encoded images directly into templates with `<img>` tags.
* **Seamless Integration**: Easy registration with FastPluggy via the `UiToolsModule` plugin.

# Extra Widget

TODO: add widget description

## Requirements

* Python 3.7 or higher
* [Babel](https://pypi.org/project/Babel/)
* [Pillow](https://pypi.org/project/Pillow/)

Install dependencies:

```bash
pip install -r requirements.txt
```



## Usage

### Template Filters

| Filter                | Description                                                      |
| --------------------- |------------------------------------------------------------------|
| `b64encode`           | Base64-encode binary data (`bytes → str`).                       |
| `pydantic_model_dump` | Dump Pydantic models/settings to dictionaries.                   |
| `localizedcurrency`   | Format a number as localized currency (default: `EUR`, `fr_FR`). |
| `localizeddate`       | Format dates/datetimes with various styles/locales/timezones.    |
| `nl2br`               | Convert newline characters to `<br>` tags.                       |
| `from_json`           | Parse a JSON string into Python objects (`list`/`dict`).         |
| `render_bytes_size`   | Format a size into human readable                                |

**Example in a Jinja2 template:**

```jinja
<h2>{{ user.name }}</h2>
<p>Balance: {{ user.balance | localizedcurrency('USD', 'en_US') }}</p>
<p>Joined: {{ user.joined_at | localizeddate('long', 'short', 'en_US') }}</p>
<pre>{{ config | pydantic_model_dump | pprint }}</pre>
```

### HTML Rendering Utilities

Import and use functions from `html_render.py` to render JSON or image data in HTML:

```python
from ui_tools.html_render import render_data_field, render_safe_data_field

# Render JSON string as HTML list
html_list = render_data_field(json_string)

# Safely render arbitrary data
safe_html = render_safe_data_field(raw_input)
```

## Running Tests

Ensure you have `pytest` installed, then run:

```bash
pytest tests/
```

## Contributing

1. Fork the repository.
2. Create a new branch: `git checkout -b feature/your-feature`.
3. Commit your changes and push to your fork.
4. Open a pull request for review.

## License

This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.
castor-pollux 0.0.21
A library for 'gemini' languagemodels without unnecessary dependencies.
Requires Python: >=3.10

# castor-pollux
Castor-Pollux (the twin sons of Zeus, routinely called 'gemini') is a pure REST API library for interacting with Google Generative AI API.

## Without (!!!):
- any whiff of 'Vertex' or GCP;
- any signs of 'Pydantic' or unnecessary (and mostly useless) typing;
- any other dependencies of other google packages trashed into the dumpster `google-genai` package.

## Installation:
<pre>
  pip install castor-pollux
</pre>
Then:
```Python
  # Python
  import castor_pollux.rest as cp
```
## A text continuation request:
```Python
import castor_pollux.rest as cp
from yaml import safe_load as yl

kwargs = """  # this is a string in YAML format
  model:        gemini-3.1-pro-preview      # thingking model
  # system_instruction: ''                  # will prevail if put here
  mime_type:    text/plain                  #
  modalities:
    - TEXT                                  # text for text
  max_tokens:   10000
  n:            2                           # 1 is not mandatory
  stop_sequences:
    - STOP
    - "\nTitle"
  temperature:  0.5                         # 0 to 1.0
  top_k:        10                          # number of tokens to consider.
  top_p:        0.5                         # 0 to 1.0
  include_thoughts: True
  thinking_level: high                      # for 3+ models
"""

instruction = 'You are Joseph Jacobs, you retell folk tales.'

text_to_continue = 'Once upon a time, when pigs drank wine '

machine_responses = cp.continuation(
    text=text_to_continue,
    instruction=instruction,
    **yl(kwargs)
)
```
## A multi-turn conversation continuation request:
```Python
import castor_pollux.rest as cp
from yaml import safe_load as yl

kwargs = """  # this is a string in YAML format
  model:        gemini-2.5-pro
  mime_type:    text/plain
  modalities:
    - TEXT
  max_tokens:   32000
  n:            1  # no longer a mandatory 1
  stop_sequences:
    - STOP
    - "\nTitle"
  temperature:  0.5
  top_k:        10
  top_p:        0.5
  include_thoughts: True
  thinking_budget: 32768   
"""

previous_turns = """
  - role: user
    parts:
      - text: Can we change human nature?
    
  - role: model
    parts:
      - text: Of course, nothing can be simpler. You just re-educate them.
"""

human_response_to_the_previous_turn = 'That is not true. Think again.'

instruction = 'I am an expert in critical thinking. I analyse.'

machine_responses = cp.continuation(
    text=human_response_to_the_previous_turn,
    contents=yl(previous_turns),
    instruction=instruction,
    **yl(kwargs)
)
```