Title: Consider inferring requirements from imports and venv · Issue #893 · usethis-python/usethis-python · GitHub
Open Graph Title: Consider inferring requirements from imports and venv · Issue #893 · usethis-python/usethis-python
X Title: Consider inferring requirements from imports and venv · Issue #893 · usethis-python/usethis-python
Description: Motivation This is a bit of an ambitious one, but as a part of #241 I noticed that we are creating empty pyproject.toml if it doesn't already exist. But that seems unnecessary - we should be able to generate empty requirements.txt withou...
Open Graph Description: Motivation This is a bit of an ambitious one, but as a part of #241 I noticed that we are creating empty pyproject.toml if it doesn't already exist. But that seems unnecessary - we should be able t...
X Description: Motivation This is a bit of an ambitious one, but as a part of #241 I noticed that we are creating empty pyproject.toml if it doesn't already exist. But that seems unnecessary - we should be ab...
Opengraph URL: https://github.com/usethis-python/usethis-python/issues/893
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consider inferring requirements from imports and venv","articleBody":"**Motivation**\nThis is a bit of an ambitious one, but as a part of #241 I noticed that we are creating empty `pyproject.toml` if it doesn't already exist. But that seems unnecessary - we should be able to generate empty `requirements.txt` without creating an empty dependencies list.\n\nBut we can probably do better in this case; we can potentially infer requirements based on the project's imports. Of course, this could potentially be unreliable for cases where the import doesn't match the PyPI name (and potentially a security concern due to typosquatting on PyPI...) so I don't know if this is wise or not. Also should check if something off-the-shelf already exists.\n\n**Summary**\nConsider whether it makes sense to have something to infer requirements from imports and venv.\n","author":{"url":"https://github.com/nathanjmcdougall","@type":"Person","name":"nathanjmcdougall"},"datePublished":"2025-07-22T09:08:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/893/usethis-python/issues/893"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:61c15786-d2ef-0e7a-bb88-9ac3f39fc37b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B3C6:232EF3:12B4B7B:199B912:6A4D6EB2 |
| html-safe-nonce | 92d7b7c5b66cab17a704dac83e2386bf97352574fed584d64787c1938779aae1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0M2OjIzMkVGMzoxMkI0QjdCOjE5OUI5MTI6NkE0RDZFQjIiLCJ2aXNpdG9yX2lkIjoiODA5MDEzMzI2MTA0NzM5Mzk3MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a78305a9ff430819a52004c31c8f33963d05f0559bf5bd8915f9e23d63453308 |
| hovercard-subject-tag | issue:3251816279 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/usethis-python/usethis-python/893/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ddbe9c6267537bff554139e5ef28cb69977de9055138ce6efb50a7e995f1f191/usethis-python/usethis-python/issues/893 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ddbe9c6267537bff554139e5ef28cb69977de9055138ce6efb50a7e995f1f191/usethis-python/usethis-python/issues/893 |
| og:image:alt | Motivation This is a bit of an ambitious one, but as a part of #241 I noticed that we are creating empty pyproject.toml if it doesn't already exist. But that seems unnecessary - we should be able t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nathanjmcdougall |
| hostname | github.com |
| expected-hostname | github.com |
| None | c78260c7b3f4ac4b0356c8208537f05406a3a2d46a9ec3f735b372dcc519c39e |
| turbo-cache-control | no-preview |
| go-import | github.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git |
| octolytics-dimension-user_id | 216362695 |
| octolytics-dimension-user_login | usethis-python |
| octolytics-dimension-repository_id | 842189705 |
| octolytics-dimension-repository_nwo | usethis-python/usethis-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842189705 |
| octolytics-dimension-repository_network_root_nwo | usethis-python/usethis-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 399fff412f48461d435721c009efc17ea44be72f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width