requirements.txt File — Python Requirements File
text/plain
Drop any file to identify its extension and type — runs entirely in your browser
Drop a requirements.txt file here or click to choose
Or drop any file to identify its extension
text/plainQuick Facts
| Extension | requirements.txt |
| Full Name | Python Requirements File |
| MIME Type | text/plain |
| Category | Config |
| Type | Text-based (human-readable) |
| Typical Size | 100 B – 10 KB |
| First Appeared | 2008 |
What Is a requirements.txt File?
Requirements files are the standard mechanism for specifying Python package dependencies. Each line lists a package name with optional version constraints using pip's requirement specifier syntax: exact versions (package==1.2.3), minimum versions (package>=1.0), version ranges (package>=1.0,<2.0), compatible releases (package~=1.4), and extras (package[feature]). Comments use #, and -r allows including other requirements files. Requirements.txt files are processed by pip install -r requirements.txt, which downloads and installs all listed packages from PyPI (Python Package Index). The format supports environment markers for platform-specific dependencies, direct URL references for packages from Git repositories or custom servers, and hash checking for supply chain security. While modern Python packaging tools like Poetry (pyproject.toml), Pipenv (Pipfile), and PDM offer more sophisticated dependency management with lock files, requirements.txt remains the most universal and widely supported format for specifying Python dependencies. Docker containers, CI/CD pipelines, and deployment scripts commonly use requirements.txt. The pip freeze command generates a requirements.txt with exact versions of all installed packages.
How to Open requirements.txt Files
Related File Extensions
More Config File Extensions
Other config formats you might encounter
Browse File Extensions by Category
Explore our reference of 259 file extensions with details, programs, and related formats.