semvec/pypi-packages huggingface dataset:
pyside-demo 0.2.1
Offline-first GUI application with PostgreSQL synchronization
License: MIT
Requires Python: <3.13,>=3.9
Keywords: PySide6, Offline-first, GUI

# PySide Demo

|   |   |
|---|---|
|Project|[![Python Versions](https://img.shields.io/badge/Python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue?logo=python&logoColor=white)](https://www.python.org/) [![Supported Platforms](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-blue)](https://github.com/deltodon/pyside-demo) [![License](https://img.shields.io/github/license/deltodon/pyside-demo)](LICENSE) |
|Quality| [![Issues](https://img.shields.io/github/issues/deltodon/pyside-demo)](https://github.com/deltodon/pyside-demo/issues) [![Lint](https://img.shields.io/badge/Lint-black%20%7C%20isort%20%7C%20flake8%20%7C%20mypy%20%7C%20pymarkdown-blue)](https://github.com/deltodon/pyside-demo/blob/main/.pre-commit-config.yaml) |
| Tools | [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://pre-commit.com/) [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/) |

This application is a PySide6-based GUI that demonstrates an offline-first approach with PostgreSQL synchronization capabilities.
It allows users to manage items locally and synchronize them with a remote PostgreSQL database when an internet connection is available.

It uses folium and pyqtgraph for interactive graph and geospatial visualisation.

![PySide Demo Animation](https://raw.githubusercontent.com/deltodon/pyside-demo/main/docs/images/pyside-demo-anim.gif)

* [Introduction](https://deltodon.github.io/pyside-demo/introduction.html)
* [Installation](https://deltodon.github.io/pyside-demo/installation.html)
* [Usage](https://deltodon.github.io/pyside-demo/usage.html)
* [Data](https://deltodon.github.io/pyside-demo/data.html)
* [Contributing](https://deltodon.github.io/pyside-demo/contributing.html)
* [Changelog](https://deltodon.github.io/pyside-demo/changelog.html)

### Quick Start

install the package using pip

```bash
pip install pyside-demo
```

run the package

```bash
python -m pyside_demo
```

if you are using Poetry, install the package  with

```bash
poetry add pyside-demo
```

and then run

```bash
poetry run python pyside_demo
```

### Features

* Offline-first architecture
* Local data storage in SQLite
* PySide6 based GUI
* PostgreSQL synchronization
* Interactive Graph visualisation
* Interactive Geospatial data visualisation
* Custom QSS colour theme
* Cross-platform support
* Model View Controller structure (MVC)
pihole-client 1.0.0
Execute API calls to Pi-hole from python code
License: MIT

# pihole-client

Python client for Pi-hole

## Installation
```bash
pip install pihole-client
```

## Examples
### Create class
```python
from pihole_client import PiholeClient
piholeClient = PiholeClient( "PIHOLE_DOMAIN", "PIHOLE_TOKEN" )
```
where:
- PIHOLE_DOMAIN: URL of Pi-hole WebUi page
- PIHOLE_TOKEN: Token of Pi-hole WebUi

or using environment variables "PIHOLE_DOMAIN" and "PIHOLE_TOKEN":
```python
from dotenv import load_dotenv
import os
from pihole_client import PiholeClient
load_dotenv()

def main():
    piholeClient = PiholeClient( 
        os.getenv('PIHOLE_DOMAIN'), 
        os.getenv('PIHOLE_TOKEN')
    )

    resp = piholeClient.get_custom_dns()
    print(resp)
if __name__ == "__main__":
    main() 
```

## Methods
```python
# Checks for updates to the Pihole software
piholeClient.check_updates()
# Enables the Pihole filtering
piholeClient.enable()
# Disables the Pihole filtering
piholeClient.disable()
# Retrieves the domains in a specified list
piholeClient.get_list("regex_black")
# Retrieves custom DNS entries
piholeClient.get_custom_dns()
# Retrieves custom DNS entrie by domain
piholeClient.get_custom_dns_by_domain("home.homelab.lan")
# Add a custom DNS entry
piholeClient.add_custom_dns(domain="router.homelab.lan", ip_address="192.168.1.1")
# Delete a custom DNS entry
piholeClient.delete_custom_dns(domain="router.homelab.lan", ip_address="192.168.1.1")
# Retrieves custom CNAME entries
piholeClient.get_custom_cname()
# Add a custom CNAME entry
piholeClient.add_custom_cname(domain="router.homelab.lan", target="xiaomi.local")
# Delete a custom CNAME entry
piholeClient.delete_custom_cname(domain="router.homelab.lan", target="xiaomi.local")
```
snapr 0.5.0
Library enabling a flexible and frictionless way to render snapshots of maps with overlayed geometries.
License: MIT
Requires Python: >=3.8

# snapr.py

[![](https://img.shields.io/pypi/v/snapr?style=flat-square&color=blue)](https://pypi.org/project/snapr/)
[![](https://img.shields.io/github/license/c1m50c/snapr?style=flat-square)](https://github.com/c1m50c/snapr/blob/main/LICENSE)
[![](https://img.shields.io/github/actions/workflow/status/c1m50c/snapr/publish.yml?style=flat-square)](https://github.com/c1m50c/snapr/actions/workflows/publish.yml)

Snapr ([/ˈsnæp ər/](http://ipa-reader.xyz/?text=%CB%88sn%C3%A6p:%C9%99r)) is a library that enables a flexible and frictionless way to render snapshots of maps with overlayed geometries. The backing library is written in Rust, these are bindings to said library.

## Example

```python
from snapr import Geometry, Point, Snapr
import requests

def tile_fetcher(coords: list[tuple[int, int]], zoom: int) -> list[tuple[int, int, bytearray]]:
    tiles = []

    for x, y in coords:
        response = requests.get(
            f"https://a.tile.osm.org/{zoom}/{x}/{y}.png",
            headers={"User-Agent": "snapr.py"},
        )

        tiles.append((x, y, bytearray(response.content)))

    return tiles

snapr = Snapr(tile_fetcher=tile_fetcher, zoom=15)

geometries = [
    Geometry.Point(Point(latitude=41.703811459356196, longitude=-103.34835922605679)),
]

snapshot = snapr.generate_snapshot_from_geometries(geometries=geometries)

with open("example.png", "wb") as image:
    image.write(snapshot)
```

![Example Output](https://github.com/user-attachments/assets/7abd9d2e-ea71-4cfb-81d6-0a03150ddd1e)

## License

Licensed under the [MIT License](https://github.com/c1m50c/snapr/blob/main/LICENSE) found at the root of the repository.