di / di/pip-api
Pass requirements text directly to `parse_requirements`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 119
- Forks
- 17
- Avg merge
- 43m
- Merged PRs (30d)
- 3
Description
I have a use case where it may be easier to pass a blob of text representing the contents of a requirements file, rather than a file name (because a file may not actually exist on the FS). Could we refactor this so that you can pass an argument like parse_requirements(contents=my_text_blob) and have it go around the whole process of opening and reading the file?
Alternatively, if it at least supported passing filenames or file-like objects, then I could at least pass in a StringIO object that could be opened.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the parse_requirements entry point and the code path that opens and reads the requirements file. Check any tests covering parse_requirements, then define done as accepting contents directly while preserving existing filename behavior, or supporting file-like objects if that is the chosen scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100