semvec/pypi-packages huggingface dataset:
swgo-background-library 0.1.5
Python bindings for the SWGO Background Library
Requires Python: >=3.9

# Python Bindings for the SWGO Background Library

This are the Python bindings for the SWGO Background Library.
The bindings can be installed with pip:
```
pip install swgo-background-library
```
To access the the Background interface, import `libbackground` and create an instance:
```python
import libbackground as libbg

bg = libbg.Background("<path to settings>")
```
The documentation can be accessed with `help(libbg.Background)`.

The photo electron lists generated by `Background.next_chunk()` are C++ objects, but behave like nested python lists:
```python
for channel_id, pe_times in bg.next_chunk(1e-9):
    # channel_id = int
    for time in pe_times:
        # time = float
        ...
```
The full documentation of the SWGO Background Library can be found [here](https://swgo-background-library-6e5922.gitlab.io/).
fenics-ffcx 0.10.1.post0
The FEniCSx Form Compiler
Requires Python: >=3.10

# FFCx: The FEniCSx Form Compiler

[![FFCx CI](https://github.com/FEniCS/ffcx/actions/workflows/pythonapp.yml/badge.svg)](https://github.com/FEniCS/ffcx/actions/workflows/pythonapp.yml)
[![Spack install](https://github.com/FEniCS/ffcx/actions/workflows/spack.yml/badge.svg)](https://github.com/FEniCS/ffcx/actions/workflows/spack.yml)
[![Coverage Status](https://coveralls.io/repos/github/FEniCS/ffcx/badge.svg?branch=main)](https://coveralls.io/github/FEniCS/ffcx?branch=main)

FFCx is a new version of the FEniCS Form Compiler. It is being actively
developed and is compatible with DOLFINx.

FFCx is a compiler for finite element variational forms. From a
high-level description of the form in the Unified Form Language (UFL),
it generates efficient low-level C code that can be used to assemble the
corresponding discrete operator (tensor). In particular, a bilinear form
may be assembled into a matrix and a linear form may be assembled into a
vector.  FFCx may be used either from the command line (by invoking the
`ffcx` command) or as a Python module (`import ffcx`).

FFCx is part of the FEniCS Project. For more information, visit
https://www.fenicsproject.org


## Installation

To install FFCx from PyPI:
```
$ pip install fenics-ffcx
```

To install FFCx from the source directory:
```
$ pip install .
```

## Documentation

Documentation can be viewed at https://docs.fenicsproject.org/ffcx/main


## Interface file installation only

FFCx provides the `ufcx.h` interface header for finite element kernels,
used by DOLFINx. `ufcx.h` is installed by FFCx within the Python site
packages, but it is sometimes helpful to install only the header file.
This can be done using `cmake`:
```
$ cmake -B build-dir -S cmake/
$ cmake --build build-dir
$ cmake --install build-dir
```

## License

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with this program. If not, see <https://www.gnu.org/licenses/>.
drow-aio 0.0.2
Prometheus http query client for asyncio
Requires Python: >=3.11

# Drow Aio

Prometheus http query client for Python asyncio.

Implemented prometheus http api:
https://prometheus.io/docs/prometheus/latest/querying/api/

[![PyPI Version][pypi-badge]][pypi]
[![Build Status][qaci-badge]][qaci]

## install

    pip install drow-aio

## usage

get client:

    from drow_aio import get_client

    client = get_client("http://127.0.0.1:9090")

query as vector:

    result = await client.query_as_vector("http_requests_total")
    for s in result.series:
        print(s.metric, s.value.timestamp, s.value.value)

query range:

    import time

    end = time.time()
    start = end - 60 * 60

    result = await client.query_range("http_requests_total", start=start, end=end)
    for s in result.series:
        print(s.metric)
        for p in s.values:
            print(p.timestamp, p.value)

[pypi-badge]: https://img.shields.io/pypi/v/drow-aio "PyPI Version"
[pypi]: https://pypi.org/project/drow-aio "PyPI Version"
[qaci-badge]: https://img.shields.io/github/check-runs/xospc/drow-aio/main "Build Status"
[qaci]: https://github.com/xospc/drow-aio/actions "Build Status"
cmpparis-ftp 1.0.2
FTP/SFTP utilities for cmpparis libraries

# cmpparis-ftp

FTP/SFTP utilities for cmpparis libraries.

## Installation

```bash
pip install cmpparis-ftp
```

## Features

- FTP/SFTP file transfer
- Secure authentication
- Simple API

## Usage

```python
from cmpparis_ftp import FTP

ftp = FTP("ftp.example.com", "user", "password")
ftp.upload_file("local.csv", "remote.csv")
ftp.close()
```
fanda 0.2.2
Figures and Axes
Requires Python: >=3.11

<div align="center">
    <img src="https://github.com/huterguier/fanda/blob/main/images/fanda.png" height="150">
</div>


# Figures and Axes

Figures and Axes (fanda) is a lightweight Python library designed to streamline the process of extracting experiment data from Weights & Biases (wandb) and generating publication-quality plots.The name is a play on "wandb" (Weights and Biases) $\rightarrow$ "fanda" (Figures and Axes).

## Features
- **Seamless Extraction:** Pull scalar histories, configuration configs, and summary metrics from W&B runs easily.
- **Publication Ready:** Generate clean, professional figures using matplotlib and seaborn defaults tailored for academic papers.
- **Conference Styles:** Built-in stylesheets for major conferences (NeurIPS, ICML, ICLR), slides, and posters to automatically handle fonts, sizes, and DPI.
- **Transformations:** Easily transform your data to accelerate your analysis.

## Installation
You can install fanda directly from PyPi:
```bash
pip install fanda
```

## Configuration
Ensure you are logged into W&B before using the library:
```bash
wandb login
```

## Usage
Here is a simple example of how to pull data from a project and plot the training loss.
```python
import matplotlib.pyplot as plt

import fanda
from fanda.wandb_client import fetch_wandb
from fanda import transforms
from fanda.visualizations import lineplot, add_legend, annotate_axis, decorate_axis
from fanda.utils import save_fig, close_fig

plt.style.use('neurips')

df = (
    fetch_wandb("entity", "project", filters={
        "state": "finished",
        "created_at": {"$gte": "2025-01-01"},
    })
    .pipe(transforms.exponential_moving_average, column="loss", alpha=0.7)
    .pipe(transforms.remove_outliers, column="loss")
)
fanda = (
    lineplot(
        df=df,
        x="_step", 
        y="loss", 
        hue="network",
    )
    .pipe(
        annotate_axis, 
        xlabel="Number of Steps",
        ylabel="Loss",
    )
    .pipe(decorate_axis)
    .pipe(add_legend, column="algorithm")
    .pipe(save_fig, name="algorithm_comparison")
    .pipe(close_fig)
)
```

<p align="center">
  <img src="images/sin_cos.png" width="30%" alt="Example of sin and cosine"><img src="images/noisy_training.png" width="30%" alt="Example of noisy training"><img src="images/algorithm_comparison.png" width="40%" alt="Example of algorithm comparison">
</p>

## License
This project is licensed under the MIT License - see the LICENSE file for details.

## Citation
If you find this tool useful for your research, please consider citing it:
```
@software{fanda2025github,
  author = {Noah Farr},
  title = {fanda: Figures and Axes for Weights and Biases},
  year = {2025},
  url = {https://github.com/noahfarr/fanda},
}
```
drow-http 0.0.2
Prometheus http query client
Requires Python: >=3.11

# Drow HTTP

Prometheus http query client of Python.

Implemented prometheus http api:
https://prometheus.io/docs/prometheus/latest/querying/api/

[![PyPI Version][pypi-badge]][pypi]
[![Build Status][qaci-badge]][qaci]

## install

    pip install drow-http

## usage

get client:

    from drow_http import get_client

    client = get_client("http://127.0.0.1:9090")

query as vector:

    result = client.query_as_vector("http_requests_total")
    for s in result.series:
        print(s.metric, s.value.timestamp, s.value.value)

query range:

    import time

    end = time.time()
    start = end - 60 * 60

    result = client.query_range("http_requests_total", start=start, end=end)
    for s in result.series:
        print(s.metric)
        for p in s.values:
            print(p.timestamp, p.value)

[pypi-badge]: https://img.shields.io/pypi/v/drow-http "PyPI Version"
[pypi]: https://pypi.org/project/drow-http "PyPI Version"
[qaci-badge]: https://img.shields.io/github/check-runs/xospc/drow-http/main "Build Status"
[qaci]: https://github.com/xospc/drow-http/actions "Build Status"
nextlayer-sdk-python 1.1.0
Client utilities to interact with next layer public APIs
Requires Python: <4.0,>=3.11

# nextlayer-sdk-python

Client utilities to interact with next layer public APIs.

## Configuration

The module will use a YAML Config file to read it's configuration and also **writes** to it,
to store obtained Tokens and their expiry (similar like `kubctl` does with kubeconfig).

_Example `~/.nextlayer-sdk/auth.nlcustomers.yml`:_

```yaml
server_url: https://login.nextlayer.at/auth/
realm_name: nlcustomers
client_id: nextlayer-sdk-python
username: foobar
password: topsecret

extra_params:
  audience: nextlayer-sdk-python

```

Except for `username`, all settings are optional, but if no `password` is
supplied in config, the password will be asked interactively (if STDIN is a TTY) !

Alternatively the username can be suppled in the `NEXTLAYERSDK_USERNAME` environment
variable or directly passed to the `NlAuth` constructor.

Alternatively the password can be suppliend in the `NEXTLAYERSDK_PASSWORD` environment
variable.

## Usage

```python
import requests
from nextlayer.sdk.auth import NlAuth

nlauth = NlAuth()
access_token = nlauth.get_access_token()

# make Request to some API Endpoint
rsp = requests.get(
    "https://portal.nextlayer.at/apis/v1/users/self",
    headers={"Authorization": "Bearer " + access_token},
)
print(rsp.json())
```

You need to call the `.get_access_token()` Method **every time** you make API-Calls,
because it checks if the Token is still valid and will refresh it if necessary.

### Usage with httpx

```python
import httpx

from nextlayer.sdk.auth_httpx import NlHttpxAuth

client = httpx.Client(
    timeout=httpx.Timeout(30.0),
    base_url=f"https://portal.nextlayer.at/apis/v1",
    auth=NlHttpxAuth(),
)
print(client.get("/users/self").json())
```

## Usage fron commandline

The package also installs a commandline utility `nextlayer-auth` which takes care
of obtaining an access token and printing out a proper `Authorization:` header.

```bash
curl -H "`nextlayer-auth`" https://portal.nextlayer.at/apis/v1/users/self
```

It can also be used to "logout" by cleaning up tokens in the yaml file with:
```
nextlayer-auth clear
```