pypi / pypi/stdlib-list

Suggestion: Add methods or parameters to filter the list

Open
#42 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
Python
Stars
141
Forks
41
Avg merge
2d 16h
Merged PRs (30d)
3

Description

Specifically there are a lot of test. members to the standard library that people probably don't need most of the time, (e.g. when deciding which libraries to include in an executable). I think that it also might be handy to be able to get a list of just the top level libraries.

Taking python 3.8-64 as a test case:

from stdlib_list import stdlib_list
sl = stdlib_list('3.8')
print(len(sl))  # 1766
no_test = [l for l in sl if not l.startswith('test.') and not l == 'test']
print(len(no_test))  # 1062
top_level = {l.split('.')[0] for l in sl}
print(len(top_level))  # 310

I think that it would be great to either have functions or flags on stdlib_list to return the no_test & top_level filtered lists above, (which could possibly be produced more efficiently).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the public stdlib_list entry point and review how it produces the full module list. Decide how the requested no_test and top_level filtered lists should be exposed and verify them against the Python 3.8 example; done means both requested outputs are available without requiring callers to implement the filtering themselves.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.