-
Notifications
You must be signed in to change notification settings - Fork 0
Home
David Vegh edited this page Apr 18, 2022
·
23 revisions
write-pypistat makes it easy to collect, filter and save pypi statistics to csv files.
WritePypiStat
's constructor has two parameter:
-
package
:str
name of the target pypi package -
outdir
:str
, optional
path of the directory where the gathered data will be saved into csv files (default None)
In these examples we initilaize a WritePypiStat
class in order to collect statistics about write-pypistat
pypi package.
Because outdir
is None
the gathered statistics will be only printed to the console.
from writepypistat import WritePypiStat
write_pypistat = WritePypiStat("write-pypistat")
Because outdir
is not None
the gathered statistics will be saved into csv files too.
from writepypistat import WritePypiStat
write_pypistat = WritePypiStat("write-pypistat", "stats/write-pypistat")
WritePypiStat
has three property:
-
outdir
:str
, optional
path of the directory where the gathered data will be saved into csv files (default None) -
drop_percent_column
:bool
, optional
flag used to drop percent column from pypi statistics (defaultTrue
) -
drop_total_row
:bool
, optional
flag used to drop total row from pypi statistics (defaultTrue
)
outdir
can be changed or set at anytime.
from writepypistat import WritePypiStat
write_pypistat = WritePypiStat("write-pypistat")
write_pypistat.outdir = "stats/write-pypistat"
from writepypistat import WritePypiStat
write_pypistat = WritePypiStat("write-pypistat")
write_pypistat.drop_percent_column= False
from writepypistat import WritePypiStat
write_pypistat = WritePypiStat("write-pypistat")
write_pypistat.drop_total_row= False