Skip to content

Suggestion: Add methods or parameters to filter the list #42

Open
@GadgetSteve

Description

@GadgetSteve

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).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions