semvec/pypi-packages huggingface dataset:
type-asserter 1.0.0
This package enforces the functions' type hints at runtime, making sure that the types of the actual parameters and the return value match the types specified in the function signature.
License: MIT
Keywords: TYPE,TYPES,ASSERTION,TYPE ASSERTION,TYPE CHECKER

# Type Asserter: A tool to type

This package enforces the functions' *type hints* at runtime, making sure that the types of the actual parameters and the return value match the types specified in the function signature.

# Installation

The source code is currently hosted on GitHub at: https://github.com/ValerioNeriGit/type_asserter

Binary installers for the latest released version are available at the Python package index.

```bash
pip3 install type_asserter
```

# Usage

Define your function using the Python3.8 type hints and add the *@enforce_type_hints* decorator

```python
from type_asserter import enforce_type_hints


@enforce_type_hints
def power(num: int, pow: int, verbose: bool = False) -> int:
    result = num ** pow

    if verbose:
        print("The result is:", result)

    return result


power(3, 4, verbose=True)
```

When one or more type mismatches are found, for each mismatched parameter is shown its name (as in the function's signature, its expected type, and its actual type:
```
TypeError: Parameter's type mismatch
   Parameter's name: num, expected: <class 'int'> but got: <class 'str'>
   Parameter's name: pow, expected: <class 'int'> but got: <class 'str'>
```

## Performance

The package endeavors to impact as little as possible on the performance of your program, but still, it introduces some overhead.

You can disable the type check in order to maximize performance setting ***disable=True*** as in the example below

If you want to disable the type check for 

```python
from type_asserter import enforce_type_hints


@enforce_type_hints(disable=True)
def power(num: int, pow: int) -> int:
    return  num ** pow
```

## Show a warning instead of an error

It is possible to set ***warning_instead_of_error=True*** in order to have a non-interrupting warning instead of a TypeError, as in the example below.

```python
from type_asserter import enforce_type_hints


@enforce_type_hints(warning_instead_of_error=True)
def power(num: int, pow: int) -> int:
    return  num ** pow
```

## Author

**Valerio Neri**  - [github](https://github.com/ValerioNeriGit)
SpacePY-X 1.1.4.5
Simple Python wrapper for the SpaceX API
License: MIT
Keywords: wrapper api spacex python

Simple and Easy API Wrapper for `r-spacex/SpaceX-API <https://github.com/r-spacex/SpaceX-API>`__
------------------------------------------------------------------------------------------------


Documentation
~~~~~~~~~~~~~

This API Wrapper aims to provide a simple and easy way to use the
`SpaceX-API <https://github.com/r-spacex/SpaceX-API>`__ in Python
projects. See the
`Documentation <https://spacepy-x.readthedocs.io/en/latest/>`__ for full
wrapper documentation.

Installation
~~~~~~~~~~~~

Note that this supports Python 3 *ONLY*

To install via ``pip`` use: ``pip install spacexPython``

Basic Usage
~~~~~~~~~~~

The usage of the wrapper is very easy. It does not require any
initialisation. Just import and start coding:

.. code:: python

    import spacexpython

    rocket_data = spacexpython.rockets.falconHeavy()
    print(rocket_data)

Credits
~~~~~~~

Jake Meyer's
`r-spacex/SpaceX-API <https://github.com/r-spacex/SpaceX-API>`__

Based on work by
`vinayphadnis <https://github.com/vinayphadnis/SpaceX-Python.git>`__

License
~~~~~~~

MIT License
m2-beats2audio 0.9
Library for producing audios from beats
License: MIT

# Beats2Audio

`beats2audio` is an utility to create audio files with clicks at designated 
onset times as provided in a configuration file. Onset times are specified in
a text file defining one location per line, in milliseconds. This utility was
developed in the context of the publication "Simple and Cheap Setup for 
Measuring Timed Responses to Auditory Stimuli", Miguel. et al. (under review).


## Installation

* From pypi (requires pip >= 20.0.1):

```
    pip install m2-beats2audio
```

* From sources:

```
    git clone https://github.com/m2march/beats2audio.git
    cd beats2audio
    python setup.py install
```


## Usage

Given a input file as the following, specifying onsets at 500 ms intervals
(see `examples/iso_500.txt`):

    0
    500
    1000
    1500
    2000
    2500

`beats2audio` takes as a positional parameter the onset times file and
specifies an output file with the `-o` flag. I.e.:

    `beats2audio -o 500.wav examples/iso_500.txt`

The utility can produce `wav` and `mp3` files, according to the extension of
the output file or via the `-f` flag. More options are explained in the help
text `-h`.