--- id: hatch-requirements-txt version: "0.4.1" license: Copyright (c) 2022 Dominic Davis-Foster Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in… (full text in the JSON record) license_treatment: permissive maintenance: active --- # hatch-requirements-txt — Hatchling plugin to read project dependencies from requirements.txt License: permissive · Maintenance: active · Downloads: 3.5M/mo ## What it is and what it does hatch-requirements-txt is a Hatchling plugin that bridges the gap between traditional requirements.txt dependency files and modern pyproject.toml-based project configuration. It allows you to keep your dependencies specified in requirements.txt while using Hatchling as your build backend, automatically parsing those files and exposing them as project dependencies during the build process. The plugin supports PEP 508 requirement specifiers, comments, and command-line options (which it ignores), but explicitly does not support editable installs, file references, URLs, or constraints files. It's designed for straightforward dependency declaration and works with optional dependency groups by reading multiple requirements files into separate feature sets. The package is actively maintained, supports Python 3.6 through 3.12, and has no known security vulnerabilities. Use it for: - Migrating a legacy project from setuptools to Hatchling while keeping existing requirements.txt files intact. - Managing separate dependency groups (e.g., dev, test, docs) by mapping each to a requirements file and declaring them as optional dependencies. - Maintaining a single source of truth for dependencies in requirements.txt while using modern pyproject.toml-based build configuration. - Automating dependency pinning in CI/CD by reading from generated requirements.txt files during the build process. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Hatchling plugin that reads project dependencies from requirements.txt files and makes them available to the build system via pyproject.toml configuration. Yes. If you use Hatchling and want to keep dependencies in requirements.txt files, this plugin eliminates the need to duplicate them in pyproject.toml. It's lightweight, actively maintained, permissively licensed, and has no security vulnerabilities. Install it if you're already committed to Hatchling; skip it if you use another build system or prefer managing dependencies directly in pyproject.toml. ## Install pip install hatch-requirements-txt uv add hatch-requirements-txt poetry add hatch-requirements-txt ## Installing hatch-requirements-txt Before you install: Low friction installation with only two runtime dependencies (hatchling and packaging). The package is actively maintained with a recent commit history and has been stable since its initial release in 2022. License in practice: MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for both open-source and commercial projects. Quickstart: # In pyproject.toml: [build-system] requires = ["hatchling", "hatch-requirements-txt"] build-backend = "hatchling.build" [project] name = "my-project" version = "1.0.0" dynamic = ["dependencies"] [tool.hatch.metadata.hooks.requirements_txt] files = ["requirements.txt"] Requires hatchling as the build backend; does not work with other build systems like setuptools or poetry. Verify before relying: - Whether the plugin handles complex version specifiers or environment markers beyond basic PEP 508 compliance. - Performance characteristics when processing large or numerous requirements.txt files. - Compatibility with Hatchling versions beyond those tested in the CI matrix. ## Package facts - License: Copyright (c) 2022 Dominic Davis-Foster Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 3.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags hatchling requirements.txt plugin, read dependencies from requirements.txt, hatch build requirements integration, convert requirements.txt to pyproject.toml, hatch metadata hooks, requirements.txt dependency management, hatchling dependency resolution, hatchling-plugin, build-configuration, dependency-management [View on SkillFed](https://skillfed.io/packages/hatch-requirements-txt) · [View on PyPI](https://pypi.org/project/hatch-requirements-txt/)