Metadata-Version: 2.1
Name: requests-extensions
Version: 1.1.3
Summary: DataKitchen Inc. extension of requests package
Author-email: Ricardo Boni <rboni@datakitchen.io>, Brant Watson <bwatson@datakitchen.io>, Diogo Basto <dbasto@datakitchen.io>, Jimmie Högklint <jhogklint@datakitchen.io>, Khanh Tran <ktran@datakitchen.io>, Tyler Stubenvoll <tstubenvoll@datakitchen.io>
License: CLOSED
Project-URL: homepage, https://datakitchen.io
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: requests (~=2.31)
Requires-Dist: urllib3 (>=1.26)
Provides-Extra: build
Requires-Dist: setuptools (~=65.3) ; extra == 'build'
Requires-Dist: wheel (~=0.40.0) ; extra == 'build'
Requires-Dist: build (~=0.10.0) ; extra == 'build'
Provides-Extra: dev
Requires-Dist: black[d] (~=23.1.0) ; extra == 'dev'
Requires-Dist: isort (~=5.12.0) ; extra == 'dev'
Requires-Dist: lxml (~=4.9.1) ; extra == 'dev'
Requires-Dist: mypy (~=1.2.0) ; extra == 'dev'
Requires-Dist: pre-commit (~=2.20.0) ; extra == 'dev'
Requires-Dist: types-setuptools (~=65.3) ; extra == 'dev'
Requires-Dist: types-requests (==2.31.0.6) ; extra == 'dev'
Requires-Dist: pytest (~=7.2.0) ; extra == 'dev'
Requires-Dist: pytest-cov (~=4.0.0) ; extra == 'dev'
Requires-Dist: tomli (~=2.0.1) ; extra == 'dev'
Requires-Dist: twine (~=4.0.2) ; extra == 'dev'

# Requests Extensions

## Usage
...

## Developement Setup

**This repository requires `Python 3.10` at minimum -- prefer the latest `3.10.X`.**

### Installation

Prefer using a virtual Python environment when installing. Tools such as
[virtualenv](https://virtualenv.pypa.io) can be used to set up the environment
using a specific Python version. [pyenv](https://github.com/pyenv/pyenv) can be
used to install the desired Python version if your choice of OS does not provide
it for you.

Example install
```bash
python -m virtualenv -p /usr/bin/python3.10 venv
source venv/bin/activate
# Install platform and developer extra packages
pip install --editable '.[dev]'
```

### Testing

`pytest` is used to run test.
```bash
cd /to/requests_extensions
pytest # runs both unit and integration tests
```

### Pre-commit + Linting

We enforce the use of certain linting tools. To not get caught by the build-system's checks, you should use
`pre-commit` to scan your commits before they go upstream.

The following hooks are enabled in pre-commit:

- `black`: The black formatter is enforced on the project. We use a basic configuration. Ideally this should solve any and all
formatting questions we might encounter.
- `isort`: the isort import-sorter is enforced on the project. We use it with the `black` profile.

To enable pre-commit from within your virtual environment, simply run:

```bash
pip install pre-commit
pre-commit install
```

### Additional tools

These tools should be used by the developer because the build-system will enforce that the code complies with them.
These tools are pinned in the `dev` extra-requirements of `pyproject.toml`, so you can acquire them with

```sh
# within environment
pip install .[dev]
```

We use the following additional tools:

- `pytest`: This tool is used to run the test e.g. `pytest .`
- `mypy`: This is a static and dynamic type-checking tool. This also checks for unreachable and non-returning code. See `pyproject.toml` for its settings. This
tool is not included in pre-commit because doing so would require installing this repo's package and additional stubs into the pre-commit environment, which
is inadvised by pre-commit, and poorly supported.


### FAQ: mypy errors

#### I've encountered 'Unused "type: ignore" comment'

Good news, this means that `mypy` has found symbols for the thing which you are ignoring. That means its time to enable
type-checking on these code-paths.

To resolve this error, do two things:

1. Remove the ignore and fix any type errors.
2. run `mypy . --install-types` and add any newly installed `types-*` packages installed to our `dev` dependencies.
