semvec/pypi-packages huggingface dataset:
mywsgi 1.0.3
Opinionated uWSGI setup
License: MIT

# mywsgi

Setting up [uWSGI](https://uwsgi-docs.readthedocs.io/) for a new Python project is hard. uWSGI provides a million configuration options
and a million ways to do everything. I have slimmed this down to a core set of basic options.

These options are very opinionated and how I've grown to like doing things.

## Installation

```sh
pip install mywsgi
```

## How do I

There are two APIs for working with mywsgi. A Python API, and a CLI API.

### CLI

mywsgi comes along with a CLI interface. This is the simplest way to get going.

```sh
$ mywsgi --help
usage: mywsgi [-h] module bind

positional arguments:
  module      python wsgi module
  bind        ip:port to bind to

optional arguments:
  -h, --help  show this help message and exit
```

```sh
mywsgi foo.wsgi:application 127.0.0.1:8000
```

If you want to override or change any uWSGI variables, the only way to do this is through
uWSGI's native environment variables. So something like:

```sh
export UWSGI_MAX_REQUESTS=1000
export UWSGI_HARAKIRI=30
mywsgi foo.wsgi:application 127.0.0.1:8000
```


### Python API

The Python API is simple, it exposes one function with two required arguments.

```python
import mywsgi
mywsgi.run(
    "foo.wsgi:application",
    "127.0.0.1:8000",
)
```

Running this ultimately `exec`s out and hands off all control over to `uWSGI`. So beyond this call,
nothing else will run. Your program is gone.

You can pass additional uWSGI arguments along to this as additional kwargs:

```python
import mywsgi
mywsgi.run(
    "foo.wsgi:application",
    "127.0.0.1:8000"
    max_requests=10000,
    harakiri=30,
)
```

Anything passed in as kwargs is directly passed along to uWSGI and will override my defaults.

## Bring your own uWSGI

This package does not directly require uWSGI, but it supports working with both the `uWSGI` package and the great `pyuwsgi` package.

I'd highly recommend using `pyuwsgi` instead of `uWSGI` directly. `pyuwsgi` is just a compiled binary distribution of `uWSGI`.
libmediainfo-cffi 2.1.5
CFFI interface for libmediainfo
License: MIT
Requires Python: >=3.5

#################
libmediainfo_cffi
#################

This library provides a convenient CFFI wrapper for `libmediainfo <https://github.com/MediaArea/MediaInfoLib/>`_, a lightweight library that displays information about video and audio files.
Supported attributes `here <https://mediaarea.net/it/MediaInfo/Support/Tags>`_.

Quickstart
==========
Easy enough:

.. code:: Python

    from libmediainfo_cffi import MediaInfo
    data = MediaInfo.read_metadata(path)

You can also pass options, e.g. if you want JSON output:

.. code:: Python

    from libmediainfo_cffi import MediaInfo
    data = MediaInfo.read_metadata(path, Inform='JSON')

Differences between this and `pymediainfo <https://github.com/sbraz/pymediainfo/>`_
===================================================================================
| The main difference is that this library uses the API mode of CFFI, while pymediainfo uses the ABI mode. Libmediainfo_cffi approach is safer and faster but it's a bit more complicated to debug, since you need to wrap the C++ mediainfo library in C to comunicate with Python.

| On the other hand pymediainfo is more tested, Python only (but needs libmediainfo installed, while with this library you don't) and **supports Python 2** (while this library doesn't and won't) and has better crossplatform capabilities (since, again, it uses ABI mode).

Installation
============
``pip install libmediainfo_cffi``

Development
===========
| Download the source, launch ``make setup`` and start tinkering.
| Note: the .cpp and .h file in the libmediainfo_cffi directory are not used directly, but read as strings and fed to CFFI. They are useful only for IDE code hinting. Don't try to compile them with CMake, it won't work.

Licenses
========
Copyright (c) 2019 Alessandro Cerruti

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

This product uses `MediaInfo <https://mediaarea.net/en/MediaInfo>`_ library, Copyright (c) 2002-2019 `MediaArea.net SARL <info@mediaarea.net>`_.