semvec/pypi-packages huggingface dataset:
gxzip 0.1.0
A compact Python library for archiving and extracting ZIP files.
Requires Python: >=3.8

# gxzip

![Zip Archiver Logo](https://img.shields.io/badge/gxzip%20-v0.1.0-blue?style=for-the-badge&logo=python)  
[![PyPI version](https://badge.fury.io/py/gxzip.svg)](https://badge.fury.io/py/gxzip)  
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)  
[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/downloads/)  

A compact and easy-to-use Python library for archiving files and directories into ZIP files, as well as extracting ZIP archives. Built with standard Python libraries—no external dependencies required! 🚀

## Features ✨
- **Archive Files & Directories**: Recursively zip files or entire folders with customizable compression.
- **Extract ZIPs**: Easily unpack archives to any directory.
- **Lightweight**: Uses only `zipfile` and `os` from the standard library.
- **Flexible Compression**: Supports various ZIP compression methods (e.g., DEFLATED, STORED).
- **Cross-Platform**: Works on Windows, macOS, and Linux.

## Installation 📦
#### Install via pip from PyPI:

```bash
pip install gxzip
```

## Quick Start ⚡
### Archiving Files
#### Create an instance of archiver and use the archive method:
```Python
from gxzip import archiver

zip = archiver()  # Default compression: ZIP_DEFLATED

# Archive a file and a directory
zip.archive('my_archive.zip', ['example.txt', 'my_folder/'])
```
### Extracting Archives
#### Use the extract method to unpack:
```Python
from gxzip import archiver

zip = archiver()

# Extract to current directory
zip.extract('my_archive.zip')

# Or to a specific folder
zip.extract('my_archive.zip', extract_to='output/')
```

### Custom Compression
#### Specify compression during initialization:
```Python
import zipfile
from gxzip import archiver

zip = archiver(compression=zipfile.ZIP_STORED)  # No compression
zip.archive('fast_archive.zip', ['large_file.bin'])
```
## API Reference 📖
### Class: archiver
- `__init__(self, compression: int = zipfile.ZIP_DEFLATED)`: Initializes with optional compression type.
- `archive(self, zip_path: str, paths: list[str]) -> None`: Archives files/directories to a ZIP.
- `extract(self, zip_path: str, extract_to: str = '.') -> None`: Extracts ZIP to a directory.

## Error Handling ⚠️
Wrap calls in `try-except` for robustness:
```Python
try:
    archiver.archive('archive.zip', ['nonexistent.txt'])
except FileNotFoundError as e:
    print(f"Error: {e}")
```
## License 📄
This project is licensed under the MIT License - see the LICENSE file for details.
nshmdb 2025.12.1
A library for working with 2022 NSHM fault geometry
Requires Python: <3.14,>=3.11

# NSHM Database Generation

This repository contains a script and schema to generate a database storing fault geometry and rupture information parsing GeoJSON information from the GNS National Seismic Hazard Model.

## Requirments 

- Python 3.x
- numpy
- qcore
- sqlite3

## Generate your own database
1. Obtain the CRU fault system solution (ask a member of the software team for this file). It should be a zip file with the following structure
```
.
├── aggregate_rates.csv
├── composite_rates.csv
├── modules.json
├── README
├── ruptures
│   ├── average_slips.csv
│   ├── build_info.json
│   ├── fast_indices.csv
│   ├── fault_sections.geojson
│   ├── grid_node_association_fracts.csv
│   ├── grid_node_sect_associations.csv
│   ├── grid_region.geojson
│   ├── indices.csv
│   ├── inversion_target_mfds.json
│   ├── logic_tree_branch.json
│   ├── mod_sect_min_mags.csv
│   ├── modules.json
│   ├── NZSHM22_TvzSections.csv
│   ├── paleo_constraint_data.json
│   ├── properties.csv
│   ├── regional_inversion_target_mfds.json
│   ├── sect_polygons.geojson
│   ├── sect_slip_rates.csv
│   └── sub_seismo_on_fault_mfds.csv
├── solution
│   ├── annealing_progress.csv
│   ├── build_info.json
│   ├── inversion_misfit_progress.csv
│   ├── modules.json
│   ├── rates.csv
│   └── sub_seismo_on_fault_mfds.csv
└── WARNING.md
```
**YOU DO NOT NEED TO EXTRACT THIS FILE ANYWHERE**

2. After cloning this repository and installing the depedencies, run the following 
```bash
python nshmdb/scripts/nshm_db_generator.py <PATH_TO_CRU_FAULT_ZIP> nshmdb.db
```
This will take some time.
planet-auth 2.3.1
Planet Auth Utility Code
Requires Python: >=3.10

# Planet Auth Utility Library

## Overview
The Planet Auth Library provides generic authentication utilities for clients
and services.  For clients, it provides the means to obtain access tokens that
can be used to access network services.  For services, it provides tools to
validate the same access tokens.

The architecture of the code was driven by OAuth2, but is intended to be easily
extensible to new authentication protocols in the future.  Since clients
and resource servers are both themselves clients to authorization servers in
an OAuth2 deployment, this combining of client and server concerns in a single
library was seen as natural.

Currently, this library supports OAuth2, Planet's legacy proprietary
authentication protocols, and static API keys.

This library does not make any assumptions about the specific environment in which
it is operating, leaving that for higher level applications to configure.

The [Planet SDK for Python](https://developers.planet.com/docs/pythonclient/)
leverages this library, and is pre-configured for the Planet Insights Platform used
by customers.

## Installation
Install from PyPI using pip:

```bash
pip install planet-auth
```

## Documentation

See [Planet Auth Library](https://planet-auth.readthedocs.io/) on
_ReadTheDocs.io_ for complete documentation.
iiif-download 0.1.15
A Python package to download images from IIIF manifests
Requires Python: >=3.8

# Download images from IIIF manifests

[![PyPI - Version](https://img.shields.io/pypi/v/iiif-download.svg)](https://pypi.org/project/iiif-download)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/iiif-download.svg)](https://pypi.org/project/iiif-download)
![Test Status](https://img.shields.io/github/actions/workflow/status/Segolene-Albouy/iiif-download/test.yml?branch=main)

This repository contains code to download images from IIIF manifests.
It takes into account limitations and data specificities from various institutions.

```bash
pip install iiif-download
```

## Basic usage

The configuration is stored in `iiif_download/config.py` and can be overridden by setting environment variables.

### Inside a script

```python
from iiif_download import IIIFManifest, config, Config

# Override the default configuration
config.max_size = 2500
config.img_dir = "custom/path/to/images"

manifest_url = "https://example.org/manifest"

# Use global config
manifest = IIIFManifest(manifest_url)

# or override the global config for a specific manifest
manifest = IIIFManifest(
    manifest_url,
    # surcharge any global attribute locally
    img_dir="path/to/dir",
    max_size=4000
)

# or define another config
manifest = IIIFManifest(manifest_url, config=Config(is_logged=False))

# Download images from a manifest inside img_dir/dir_name
manifest.download(save_dir="dir_name")
```

### Command line

```bash
# override specific variables
export IIIF_IMG_DIR=custom/path/to/images
export IIIF_MAX_SIZE=4000
export IIIF_DEBUG=True
# or use .env
source .env

iiif-download https://example.org/manifest
iiif-download -f test-manifests.txt
iiif-download -d custom/path/to/images https://example.org/manifest
```

### Metadata extraction

```python
from iiif_download import IIIFManifest

manifest = IIIFManifest("https://example.org/manifest")
manifest.load()
lic = manifest.license
author = manifest.get_meta("author")
images = manifest.images
```

## Development

Install locally
```bash
python -m venv venv && source venv/bin/activate
pip install -e ".[dev]"
```

Run tests
```bash
pytest
# pre-commit install
pre-commit run --all-files
```

Publish on PyPi
```bash
git tag v<*.*.*> && git push origin v<*.*.*>
```