Unverified Commit 4ed29193 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

python313Packages.requests-random-user-agent: init at 2025.01.19 (#508433)

parents 7b56a47e 5bfa8ae5
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  requests,
  pytestCheckHook,
  pytest-httpbin,
}:

buildPythonPackage (finalAttrs: {
  pname = "requests-random-user-agent";
  version = "2025.01.19";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "DavidWittman";
    repo = "requests-random-user-agent";
    tag = finalAttrs.version;
    hash = "sha256-El/aibqEyx5diVTOe/4PEFB7KRfKqUJGPar6j6hZyIc=";
  };

  build-system = [ setuptools ];

  dependencies = [ requests ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "requests_random_user_agent" ];

  disabledTests = [
    # Tests require network access
    "test_request"
    "test_request_different_without_session"
    "test_request_without_session"
  ];

  meta = {
    description = "Configures the requests library to randomly select a desktop User-Agent";
    homepage = "https://github.com/DavidWittman/requests-random-user-agent";
    changelog = "https://github.com/DavidWittman/requests-random-user-agent/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
  };
})
+4 −0
Original line number Diff line number Diff line
@@ -16768,6 +16768,10 @@ self: super: with self; {
  requests-pkcs12 = callPackage ../development/python-modules/requests-pkcs12 { };
  requests-random-user-agent =
    callPackage ../development/python-modules/requests-random-user-agent
      { };
  requests-ratelimiter = callPackage ../development/python-modules/requests-ratelimiter { };
  requests-toolbelt = callPackage ../development/python-modules/requests-toolbelt { };