Skip to main content

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 can be used to set up the environment using a specific Python version. pyenv can be used to install the desired Python version if your choice of OS does not provide it for you.

Example install

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.

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:

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

# 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

requests-extensions-1.1.3.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

requests_extensions-1.1.3-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file requests-extensions-1.1.3.tar.gz.

File metadata

  • Download URL: requests-extensions-1.1.3.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for requests-extensions-1.1.3.tar.gz
Algorithm Hash digest
SHA256 e3bb64cb783981f21dc1111bef11caf052b577362c10ebfaadb7596ce2c7742d
MD5 974acb33c92d2953b60eaf7801befc10
BLAKE2b-256 ce09988b1c2eb80702ffd29ae62bda5bbb26bd70bc57de52c575ebb50abb683f

See more details on using hashes here.

File details

Details for the file requests_extensions-1.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for requests_extensions-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f16d203b300dded7434060043a1bc42517c1d799cd34c2c176d441fb9fb10fdc
MD5 7d582eea3489d3bdce90098bb7e17806
BLAKE2b-256 17b5d79886cb5b13b716edb33f4072824c601847456e62e1ba58db4d261e2880

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.3 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page