Skip to content

About

Statistics to better understand how python is used and written

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Motivation

This is a package with a goal to provide statistics to better understand how python is used and written.

A package maintain might ask:

  • Can certain functions be depreciated?
  • How are my users using my package in tests vs. source vs. notebooks?
  • What should I include in tutorials?
  • Are new features being adopted?

Python Core Maintainers might ask:

  • What are the most and least used stdlib modules?
  • Is the community moving away from one module?
  • Lets educate PEPs with actual statistics!

Interesting Questions

Workflow

This is a package with components that expose a sqlite database via datasette. Originally this package provided csv files with api usage statistics for packages. The problem is that this cannot anticipate all the questions that users may have. Thus we have a sql interface to ask custom questions on the (currently) 6 GB database.

The scripts involved in this work.

  1. Assemble list of important repositories/projects that depend on libraries such as numpy, scipy, requests, tensorflow, etc. This work would not be possible without libraries.io scripts/librariesio.sh
  2. Construct database by inspecting source code and ast of every python file and notebook in repositories. scripts/inspect.sh
  3. Expose sqlite database via datasette scripts/serve.sh

Tests

The tests depend on pytest. The tests are a great demostration of what python-api-inspect can capture.

pytest

About

Statistics to better understand how python is used and written

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages