pypixplore package¶
Submodules¶
pypixplore.local module¶
-
class
pypixplore.local.
InstalledPackages
[source]¶ Bases:
object
Gets installed packages and their dependencies
-
dependency_graph
(package_name)[source]¶ takes package_name and outputs its dependencies and their own dependencies plus an asciitree of this arrangement :param package_name: :return: asciitree of the dependencies of the given package, up to the second level
-
get_dependencies
(package_name)[source]¶ Get the dependencies of a given installed package :param package_name: name of the package :return: a dictionary of dependencies and their versions
-
make_dep_json
()[source]¶ Get the dependencies of all packages installed and cache the result in a json. :return: a tinydb database
-
package_status
(package_name)[source]¶ Check whether package_name is installed. If so, returns its version :param package_name: str to be consulted by function :return: if installed - returns tuple with name of package and version
if not installed - returns None
-
pypixplore.remote module¶
-
class
pypixplore.remote.
Index
(server='https://pypi.python.org/pypi', cache_path='/home/docs/.pypiexplorer_cache')[source]¶ Bases:
object
Connects with remote server. PyPI by default.
-
count_releases
(json, time_days)[source]¶ This function count how many releases a package received in a period of time in days. :param json: The json of a package. :param time_days: The period of time that the function will use to count how many releases the package has. :return: The amount of releases a package received in the given period.
-
get_downloads
(package_name)[source]¶ Gets number of downloads for a given package :param package_name: name of the package :return: dictionary of number of downloads. keys are ‘last_month’, ‘last_week’ and ‘last_day’
-
get_well_maintained
()[source]¶ Get packages which have had at least one release in the last six months, sorted by most recently updated
-
how_many_packages_version_py
(n_sample=700)[source]¶ print(‘This command can take a while, do you wish to continue? /n type Y or N’) aux = input() aux = aux.capitalize() if aux == ‘N’:
return None- elif aux != ‘Y’:
- print(‘Por favor, digite S para sim ou N para não’) self.how_many_packages_version_py()
-
rank_of_packages_by_recent_release
(time_days=30, list_size=None, rank_size=None)[source]¶ This function gets the packages and rank them by amount of releases in a period of time. :param time_days: The period of time in days that de function count_releases will use. :param list_size: If given a -list_size-, the function use the first -list_size- packages of the list_of_all_packages. :param rank_size: If given a -rank_size-, the function will return the first -rank_size- of the rank. :return: The rank by recent release using the time in days, the -list_size- and the -rank_size- given.
-
pypixplore.skeleton module¶
-
pypixplore.skeleton.
main
(args)[source]¶ Main entry point allowing external call releasess
Parameters: args ([str]) – command line parameter list
-
pypixplore.skeleton.
parse_args
(args)[source]¶ Parse command line parameters
Parameters: args ([str]) – command line parameters as list of strings Returns: command line parameters namespace Return type: argparse.Namespace