semvec/pypi-packages huggingface dataset:
strong 0.2.2
Dynamic type checker for function signatures
License: MIT
Requires Python: >=3.8

<p align="center">
<img src="https://raw.githubusercontent.com/jeertmans/strong/main/img/logo.png" width=300></img>
</p>

![](https://img.shields.io/readthedocs/strong) ![](https://img.shields.io/pypi/v/strong) ![](https://img.shields.io/pypi/pyversions/strong)

# Strong - Dynamic type checker for function signatures
Strong embraces the builtin `typing` package by providing dynamic type checking for function signatures.

## Install:

Simply use:

`pip install strong`

## Documentation:

The documentation is hosted [here](https://strong.readthedocs.io/en/latest/).

## Example:

Let's say you have a function taking two inputs, `a` and `b`, and returning one output. In Python, you can use type-hint in order to give clue about the type the parameters should have. Nonetheless, Python will not block inputs with the wrong type.

This package is here to provide tools to make the task of checking input parameters type easy.

```python
>>> from strong.core.decorators import assert_correct_typing

>>> @assert_correct_typing
>>> def f(a: int, b: int) -> int:
>>>     return a + b

>>> x = f(1, 2)  # O.K.

>>> y = f(1, '2')  # K.O.
AssertionError: Function f defined in "<function_file>", line 3
    Argument `b` does not match typing: '2' is not an instance of <class 'int'>
>>> from strong.core.decorators import measure_overhead
>>> import numpy as np

>>> @measure_overhead(assert_correct_typing)
>>> def g(a: int, b: int) -> np.ndarray:
        return np.random.rand(a, b)
    
>>> g(100, 100)
1.0687804670719938  # Ratio between time taken with @assert_correct_typing and without
```
us-congress 0.1.2a2
Client to work with US Congress data
License: MIT
Requires Python: >=3.9,<4.0
Keywords: US,census

[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)

![Release](https://github.com/drawjk705/us-congress/workflows/Release/badge.svg)
![CI](https://github.com/drawjk705/us-congress/workflows/CI/badge.svg)

# US Congress

Client for getting information on the US Congress.

## Requirements

For this package to work, you must [get an API key from ProPublica](https://www.propublica.org/datastore/api/propublica-congress-api), whose API this uses, and set the following the environment variable `PROPUBLICA_CONG_KEY` to whatever that key is, either with

```bash
export PROPUBLICA_CONG_KEY=<your key>
```

or in a `.env` file:

```bash
PROPUBLICA_CONG_KEY=<your key>
```

## Getting started

To install with pip, simply run

```bash
pip install us_congress
```

```python
>>> from us_congress import Congress
>>> cong = Congress(116)
>>> cong
<Congress 116>
```

This will return a client for querying data on a particular congress (in the above example, the 116th Congress).

Right now, this enables only getting lists of Representatives and Senators:

```python
cong.getRepresentatives() # DataFrame with all representatives
cong.getSenators()        # DataFrame with all senators
```