semvec/pypi-packages huggingface dataset:
sanitize-filename 1.2.0
A permissive filename sanitizer.
Requires Python: ~=3.7

A simple, dependency-free, blacklist-based filename sanitizer, for when you want to keep the original filename.

Note that a blacklist based sanitizer will _never_ be as safe as a whitelist based one. In most cases, your best option is to create a safe filename yourself. Your second safest option is to use a whitelist approach (allowing only certain characters). This sanitizer is useful when you want to keep the original filename, including non ascii characters, whenever possible.

## Installation

```sh
pip install sanitize_filename
```

## Usage

```python3
from sanitize_filename import sanitize


filename = input("Enter a file name:")
filename = sanitize(filename)
```

Examples:

```python3
> sanitize("A/B/C.txt")
'ABC.txt'

> sanitize("this��filenameḜisあactually...valid.txt")
'this��filenameḜisあactually...valid.txt'

> sanitize("def.")
'def'

> sanitize("NUL")
'__NUL'

> sanitize("..")
'__'
```

## Changelog

- 1.2.0

  - Get rid of os dependent checks; ensure uniform behaviour
  - Now works on long filenames where the non-extensions part consists of only dots

- 1.1.0

  - Try to preserve filename extensions if possible

- 1.0.1

  - First release (as 1.0.1 due to a version number mix-up in 1.0.0)

- 1.0.0-dev3

  - Black list low code point characters (<32)

- 1.0.0-dev1

  - First version
hosting-benchmark 0.0.6
PHP Web-hosting benchmark

# hosting-benchmark

A full web-hosting benchmark suite

## Installation

Install using pip:

```shell script
pip install hosting-benchmark
```

## Usage

The benchmark consists of two components:

* A *server*, which is a set of PHP scripts that run the benchmark
* A *client*, which is a cli (command line interface) tool used to run the
  benchmark and collect/present the data.

In order to run the benchmark, you need to install the server app. This is
fairly straightforward:

* Create a MySQL database on your web hosting, note down the credentials
* Run `hosting-benchmark archive` to prepare a ZIP archive with the server.
  You will be asked to provide your database credentials
* Upload and extract the zip package to your web hosting http root directory
* Run the benchmark using:

```shell script
hosting-benchmark --hostname=https://example.com/ --count=10 --sleep=5 all
```

To learn what the `--count` and `--sleep` flags do, please invoke
`hosting-benchmark --help`.

## Development

### Precommit Hooks

This project supports [pre-commit](https://pre-commit.com/). To use it please install it in the `pip install pre-commit` and then run `pre-commit install` and you are ready to go. `black` will be executed before commit and files will be formatted correctly.
ustorage 0.1.1
Unified Storage Interface for Python.

UStorage
========

Unified Storage Interface for Python.
Copied and decoupled from [Flask-FS](https://github.com/noirbizarre/flask-fs) for working anywhere.

Thanks to [Flask-FS](https://github.com/noirbizarre/flask-fs)

See also [django-storages](https://github.com/jschneier/django-storages)

## Installation

```
$ pip install ustorage
```

## Quick start

```python
from ustorage.s3 import S3Storage

options = {
    'endpoint': 'https://s3.cn-north-1.amazonaws.com.cn',
    'access_key': '<AccessKey>',
    'secret_key': '<SecretKey>',
    'bucket': 'my-bucket',
    'region': 'cn-north-1',
}
fs = S3Storage(options)

fs.write('hello.txt', 'Hello, World!')
fs.exists('hello.txt')
fs.read('hello.txt')
fs.delete('hello.txt')
```