semvec/pypi-packages huggingface dataset:
jython-swingutils 2.1.2
Makes using Java's Swing UI toolkit easy on Jython
License: MIT
Keywords: jython swing

Jython Swing Utilities
======================

A collection of utility classes and helper functions to make it easier to build
Swing user interfaces with Jython. The helpers provide "pythonic" alternatives
to often clumsy Java APIs.

Included in this package:

* enhanced table, list and combobox models
* JavaBeans support and automatic property change notification
* an alternative API for adding/removing event listeners
* a powerful data binding system that supports Swing components
* preferences access
* text field formatters
* shortcuts for loading resources (images or generic data) via class loaders
* shortcuts for basic dialogs
* enhanced file selection dialogs
* wrappers for loading `JFormDesigner`_ forms
* decorators and functions for safely accessing the GUI from any thread
* support for running background tasks in separate threads

Requires Jython 2.7 or later.

Documentation can be found at the Python Packaging
`documentation repository`_.

The `source code`_ and the `issue tracker`_ can be found at GitHub.


Building jar files
------------------

To build a jar file, you need to tell ant where to find jython.jar, by
defining the ``jythonjarpath`` property, either as a command line option
to ant, or in the ``build.properties`` file.

To build a jar file containing the Python source files::

    ant srcjar

To build a jar containing compiled bytecode files::

    ant binjar


Building signed jar files
-------------------------

Signing the jar files requires three additional properties to be defined:
``signer``, ``storepass`` and ``keypass``. It also requires that you have a
matching code signing key in your keystore (``~/.keystore``).


To build a signed source jar::

    ant signsrcjar

To build a signed, compiled jar (suitable for `Java Web Start`_)::

    ant signbinjar

The generated jar file will be timestamped using Safe Creative's `free
timestamping`_ service. If you want to use a different timestamping authority,
you can override the ``tsaurl`` property in your own ``build.properties``
file.

.. _JFormDesigner: http://www.jformdesigner.com/
.. _source code: https://github.com/jython/swingutils
.. _issue tracker: https://github.com/jython/swingutils/issues
.. _documentation repository: http://packages.python.org/jython-swingutils/
.. _Java Web Start: http://docs.oracle.com/javase/tutorial/deployment/webstart/
.. _free timestamping: https://tsa.safecreative.org/
preprocessor 1.1.3
Preprocessor for files.
License: MIT
Keywords: Macros,Processing,FileIO

### Preprocessor

Suited for simple preprocessing of Python files. The original use case of the package was annoying Cython work to do with data types. Notice that Preprocessor can run on any type of file (e.g. TSV, C++ sources etc.). To avoid clashes with other programming language preprocessor prefix and suffix is fully tunable.

#### Example
Here's a small file where we replicate the same Cython code 3 times - once for every of int, float and double datatypes. You can find the code for `typed_expression` function in `sample_utils.py` in this repo.

```Python
pyp
from sample_utils import typed_expression
ypy

cdef class Mat:
    cdef CMat[dtype] matinternal
    int dtype

    def sum(Mat self):
        # Inline preprcoessor expression. Executes a function.
        # Generally inline expressions should be one line,
        # But can be extended to multiple where all the data
        # on second line and following will be captured into
        # a string argument passed as last positional argument
        # to a function
        pypinline typed_expression(pyp, "self.matinternal", "CMat",
            print('siema')
            return WrapMat(TYPED_EXPRESSION.sum())
        ypy
```

The output of the preprocessed file looks like this:

```Python
cdef class Mat:
    cdef CMat[dtype] matinternal
    int dtype

    def sum(Mat self):
        # Inline preprcoessor expression. Executes a function.
        # Generally inline expressions should be one line,
        # But can be extended to multiple where all the data
        # on second line and following will be captured into
        # a string argument passed as last positional argument
        # to a function
        if self.dtype == np.int32:
            print('siema')
            return WrapMat((<CMat[int]>(self.matinternal)).sum())
        elif self.dtype == np.float32:
            print('siema')
            return WrapMat((<CMat[float]>(self.matinternal)).sum())
        elif self.dtype == np.float64:
            print('siema')
            return WrapMat((<CMat[double]>(self.matinternal)).sum())
        else:
            raise ValueError("Invalid dtype:" + self.dtype + " (should be one of int32, float32, float64)")
```

#### Command Line Interface

Preprocessor comes with a command line script, to easily run the preprocessor form environments outside of Python

```bash
preprocessor --input sample.py.pre --output sample.py
```
Flask-Debug-API 0.1.0
API Browser for Flask-DebugToolbar
License: MIT

Flask Debug API
===============

Flask-Debug-API is an API Browser for Flask-DebugToolbar.

Injects a form to POST, PUT, PATCH or DELETE to API endpoints and allows debugging SQLAlchemy queries, Werkzeug stack traces, and everything else that Flask-DebugToolbar supports.


Installation
------------

Install with pip

.. code-block:: sh

    $ pip install Flask-Debug-API


Usage
-----

.. code-block:: python

    # Create your app and enable debugging
    from flask_todomvc.factory import create_app
    from flask_debugtoolbar import DebugToolbarExtension
    from flask_debug_api import DebugAPIExtension

    app = create_app()
    app.debug = True

    # Register Flask-DebugToolbar and Flask-Debug-API
    DebugToolbarExtension(app)
    DebugAPIExtension(app)

    # Append Browse API Panel to Flask-DebugToolbar defaults
    # (or add explicitly)
    config = app.config
    panels = list(config['DEBUG_TB_PANELS'])
    panels.append('flask_debug_api.BrowseAPIPanel')
    config['DEBUG_TB_PANELS'] = panels

    # Optional: Change API prefix to custom prefix
    # to filter routes in Browse API Panel
    # Can leave '' to browse all routes
    # (Default is /api)
    config['DEBUG_API_PREFIX'] = '/todos'

    app.run(port=8000)