.. image:: https://readthedocs.org/projects/picage/badge/?version=latest
:target: https://picage.readthedocs.io/index.html
:alt: Documentation Status
.. image:: https://travis-ci.org/MacHu-GWU/picage-project.svg?branch=master
:target: https://travis-ci.org/MacHu-GWU/picage-project?branch=master
.. image:: https://codecov.io/gh/MacHu-GWU/picage-project/branch/master/graph/badge.svg
:target: https://codecov.io/gh/MacHu-GWU/picage-project
.. image:: https://img.shields.io/pypi/v/picage.svg
:target: https://pypi.python.org/pypi/picage
.. image:: https://img.shields.io/pypi/l/picage.svg
:target: https://pypi.python.org/pypi/picage
.. image:: https://img.shields.io/pypi/pyversions/picage.svg
:target: https://pypi.python.org/pypi/picage
.. image:: https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
:target: https://github.com/MacHu-GWU/picage-project
------
.. image:: https://img.shields.io/badge/Link-Document-blue.svg
:target: https://picage.readthedocs.io/index.html
.. image:: https://img.shields.io/badge/Link-API-blue.svg
:target: https://picage.readthedocs.io/py-modindex.html
.. image:: https://img.shields.io/badge/Link-Source_Code-blue.svg
:target: https://picage.readthedocs.io/py-modindex.html
.. image:: https://img.shields.io/badge/Link-Install-blue.svg
:target: `install`_
.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg
:target: https://github.com/MacHu-GWU/picage-project
.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg
:target: https://github.com/MacHu-GWU/picage-project/issues
.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg
:target: https://github.com/MacHu-GWU/picage-project/issues
.. image:: https://img.shields.io/badge/Link-Download-blue.svg
:target: https://pypi.org/pypi/picage#files
Welcome to ``picage`` Documentation
==============================================================================
``picage`` provides a object style interface to handle Python package module / file structure. It gives you simple api to access:
- a fullname, shortname of a python module
- parent, sub packages and sub modules
- recursively walk through all sub packages and sub modules
.. note::
Python is a Dyanamic Type Programming language, everything in Python
is an object, including python package and module.
Usage
------------------------------------------------------------------------------
.. code-block:: python
>>> from picage import Package
>>> pip = Package("pip")
>>> pip
Package(name='pip', path='./venv/lib/python2.7/site-packages/pip')
>>> print(pip)
Package(
name='pip',
path='./venv/lib/python2.7/site-packages/pip',
sub_packages=['_vendor', 'commands', 'compat', 'models', 'operations', 'req', 'utils', 'vcs'],
sub_modules=['__main__', 'basecommand', 'baseparser', 'cmdoptions', 'download', 'exceptions', 'index', 'locations', 'pep425tags', 'status_codes', 'wheel'],
)
# visit sub packages
>>> for package_name, package in pip.sub_packages().items():
...
# visit sub modules
>>> for module_name, module in pip.sub_modules().items():
...
# walk through all sub packages modules
>>> for pkg, parent_pkg, sub_pkg_list, sub_module_list in pip.walk():
...
>>> commands = pip["commands"] # it's a sub package
>>> commands = Package("pip.commands") # or you can create it from dot notation
>>> commands.parent == pip # visit parent package
True
>>> pip.parent
None
>>> print(commands)
Package(
name='pip.commands',
path='./venv/lib/python2.7/site-packages/pip/commands',
sub_packages=[],
sub_modules=['check', 'completion', 'download', 'freeze', 'hash', 'help', 'install', 'list', 'search', 'show', 'uninstall', 'wheel'],
)
>>> install = commands["install"] # it's a module
>>> install = Module("pip.commands.install") # or you can create it from dot notation
# Display package structure
>>> pip.pprint()
|-- pip (pip)
|-- _vendor (pip._vendor)
|-- cachecontrol (pip._vendor.cachecontrol)
|-- caches (pip._vendor.cachecontrol.caches)
|-- __init__.py (pip._vendor.cachecontrol.caches)
|-- file_cache.py (pip._vendor.cachecontrol.caches.file_cache)
|-- redis_cache.py (pip._vendor.cachecontrol.caches.redis_cache)
|-- __init__.py (pip._vendor.cachecontrol)
|-- _cmd.py (pip._vendor.cachecontrol._cmd)
|-- adapter.py (pip._vendor.cachecontrol.adapter)
|-- cache.py (pip._vendor.cachecontrol.cache)
|-- compat.py (pip._vendor.cachecontrol.compat)
|-- controller.py (pip._vendor.cachecontrol.controller)
|-- filewrapper.py (pip._vendor.cachecontrol.filewrapper)
|-- heuristics.py (pip._vendor.cachecontrol.heuristics)
|-- serialize.py (pip._vendor.cachecontrol.serialize)
|-- wrapper.py (pip._vendor.cachecontrol.wrapper)
|-- colorama (pip._vendor.colorama)
|-- __init__.py (pip._vendor.colorama)
|-- ansi.py (pip._vendor.colorama.ansi)
|-- ansitowin32.py (pip._vendor.colorama.ansitowin32)
|-- initialise.py (pip._vendor.colorama.initialise)
|-- win32.py (pip._vendor.colorama.win32)
|-- winterm.py (pip._vendor.colorama.winterm)
|-- distlib (pip._vendor.distlib)
|-- _backport (pip._vendor.distlib._backport)
|-- __init__.py (pip._vendor.distlib._backport)
|-- misc.py (pip._vendor.distlib._backport.misc)
|-- shutil.py (pip._vendor.distlib._backport.shutil)
|-- sysconfig.py (pip._vendor.distlib._backport.sysconfig)
|-- tarfile.py (pip._vendor.distlib._backport.tarfile)
|-- __init__.py (pip._vendor.distlib)
|-- compat.py (pip._vendor.distlib.compat)
|-- database.py (pip._vendor.distlib.database)
|-- index.py (pip._vendor.distlib.index)
|-- locators.py (pip._vendor.distlib.locators)
|-- manifest.py (pip._vendor.distlib.manifest)
|-- markers.py (pip._vendor.distlib.markers)
|-- metadata.py (pip._vendor.distlib.metadata)
|-- resources.py (pip._vendor.distlib.resources)
|-- scripts.py (pip._vendor.distlib.scripts)
|-- util.py (pip._vendor.distlib.util)
|-- version.py (pip._vendor.distlib.version)
|-- wheel.py (pip._vendor.distlib.wheel)
|-- html5lib (pip._vendor.html5lib)
|-- _trie (pip._vendor.html5lib._trie)
|-- __init__.py (pip._vendor.html5lib._trie)
|-- _base.py (pip._vendor.html5lib._trie._base)
|-- datrie.py (pip._vendor.html5lib._trie.datrie)
|-- py.py (pip._vendor.html5lib._trie.py)
|-- filters (pip._vendor.html5lib.filters)
|-- __init__.py (pip._vendor.html5lib.filters)
|-- alphabeticalattributes.py (pip._vendor.html5lib.filters.alphabeticalattributes)
|-- base.py (pip._vendor.html5lib.filters.base)
|-- inject_meta_charset.py (pip._vendor.html5lib.filters.inject_meta_charset)
|-- lint.py (pip._vendor.html5lib.filters.lint)
|-- optionaltags.py (pip._vendor.html5lib.filters.optionaltags)
|-- sanitizer.py (pip._vendor.html5lib.filters.sanitizer)
|-- whitespace.py (pip._vendor.html5lib.filters.whitespace)
|-- treeadapters (pip._vendor.html5lib.treeadapters)
|-- __init__.py (pip._vendor.html5lib.treeadapters)
|-- genshi.py (pip._vendor.html5lib.treeadapters.genshi)
|-- sax.py (pip._vendor.html5lib.treeadapters.sax)
|-- treebuilders (pip._vendor.html5lib.treebuilders)
|-- __init__.py (pip._vendor.html5lib.treebuilders)
|-- base.py (pip._vendor.html5lib.treebuilders.base)
|-- dom.py (pip._vendor.html5lib.treebuilders.dom)
|-- etree.py (pip._vendor.html5lib.treebuilders.etree)
|-- etree_lxml.py (pip._vendor.html5lib.treebuilders.etree_lxml)
|-- treewalkers (pip._vendor.html5lib.treewalkers)
|-- __init__.py (pip._vendor.html5lib.treewalkers)
|-- base.py (pip._vendor.html5lib.treewalkers.base)
|-- dom.py (pip._vendor.html5lib.treewalkers.dom)
|-- etree.py (pip._vendor.html5lib.treewalkers.etree)
|-- etree_lxml.py (pip._vendor.html5lib.treewalkers.etree_lxml)
|-- genshi.py (pip._vendor.html5lib.treewalkers.genshi)
|-- __init__.py (pip._vendor.html5lib)
|-- _ihatexml.py (pip._vendor.html5lib._ihatexml)
|-- _inputstream.py (pip._vendor.html5lib._inputstream)
|-- _tokenizer.py (pip._vendor.html5lib._tokenizer)
|-- _utils.py (pip._vendor.html5lib._utils)
|-- constants.py (pip._vendor.html5lib.constants)
|-- html5parser.py (pip._vendor.html5lib.html5parser)
|-- serializer.py (pip._vendor.html5lib.serializer)
|-- lockfile (pip._vendor.lockfile)
|-- __init__.py (pip._vendor.lockfile)
|-- linklockfile.py (pip._vendor.lockfile.linklockfile)
|-- mkdirlockfile.py (pip._vendor.lockfile.mkdirlockfile)
|-- pidlockfile.py (pip._vendor.lockfile.pidlockfile)
|-- sqlitelockfile.py (pip._vendor.lockfile.sqlitelockfile)
|-- symlinklockfile.py (pip._vendor.lockfile.symlinklockfile)
|-- packaging (pip._vendor.packaging)
|-- __init__.py (pip._vendor.packaging)
|-- __about__.py (pip._vendor.packaging.__about__)
|-- _compat.py (pip._vendor.packaging._compat)
|-- _structures.py (pip._vendor.packaging._structures)
|-- markers.py (pip._vendor.packaging.markers)
|-- requirements.py (pip._vendor.packaging.requirements)
|-- specifiers.py (pip._vendor.packaging.specifiers)
|-- utils.py (pip._vendor.packaging.utils)
|-- version.py (pip._vendor.packaging.version)
|-- pkg_resources (pip._vendor.pkg_resources)
|-- __init__.py (pip._vendor.pkg_resources)
|-- progress (pip._vendor.progress)
|-- __init__.py (pip._vendor.progress)
|-- bar.py (pip._vendor.progress.bar)
|-- counter.py (pip._vendor.progress.counter)
|-- helpers.py (pip._vendor.progress.helpers)
|-- spinner.py (pip._vendor.progress.spinner)
|-- requests (pip._vendor.requests)
|-- packages (pip._vendor.requests.packages)
|-- chardet (pip._vendor.requests.packages.chardet)
|-- __init__.py (pip._vendor.requests.packages.chardet)
|-- big5freq.py (pip._vendor.requests.packages.chardet.big5freq)
|-- big5prober.py (pip._vendor.requests.packages.chardet.big5prober)
|-- chardetect.py (pip._vendor.requests.packages.chardet.chardetect)
|-- chardistribution.py (pip._vendor.requests.packages.chardet.chardistribution)
|-- charsetgroupprober.py (pip._vendor.requests.packages.chardet.charsetgroupprober)
|-- charsetprober.py (pip._vendor.requests.packages.chardet.charsetprober)
|-- codingstatemachine.py (pip._vendor.requests.packages.chardet.codingstatemachine)
|-- compat.py (pip._vendor.requests.packages.chardet.compat)
|-- constants.py (pip._vendor.requests.packages.chardet.constants)
|-- cp949prober.py (pip._vendor.requests.packages.chardet.cp949prober)
|-- escprober.py (pip._vendor.requests.packages.chardet.escprober)
|-- escsm.py (pip._vendor.requests.packages.chardet.escsm)
|-- eucjpprober.py (pip._vendor.requests.packages.chardet.eucjpprober)
|-- euckrfreq.py (pip._vendor.requests.packages.chardet.euckrfreq)
|-- euckrprober.py (pip._vendor.requests.packages.chardet.euckrprober)
|-- euctwfreq.py (pip._vendor.requests.packages.chardet.euctwfreq)
|-- euctwprober.py (pip._vendor.requests.packages.chardet.euctwprober)
|-- gb2312freq.py (pip._vendor.requests.packages.chardet.gb2312freq)
|-- gb2312prober.py (pip._vendor.requests.packages.chardet.gb2312prober)
|-- hebrewprober.py (pip._vendor.requests.packages.chardet.hebrewprober)
|-- jisfreq.py (pip._vendor.requests.packages.chardet.jisfreq)
|-- jpcntx.py (pip._vendor.requests.packages.chardet.jpcntx)
|-- langbulgarianmodel.py (pip._vendor.requests.packages.chardet.langbulgarianmodel)
|-- langcyrillicmodel.py (pip._vendor.requests.packages.chardet.langcyrillicmodel)
|-- langgreekmodel.py (pip._vendor.requests.packages.chardet.langgreekmodel)
|-- langhebrewmodel.py (pip._vendor.requests.packages.chardet.langhebrewmodel)
|-- langhungarianmodel.py (pip._vendor.requests.packages.chardet.langhungarianmodel)
|-- langthaimodel.py (pip._vendor.requests.packages.chardet.langthaimodel)
|-- latin1prober.py (pip._vendor.requests.packages.chardet.latin1prober)
|-- mbcharsetprober.py (pip._vendor.requests.packages.chardet.mbcharsetprober)
|-- mbcsgroupprober.py (pip._vendor.requests.packages.chardet.mbcsgroupprober)
|-- mbcssm.py (pip._vendor.requests.packages.chardet.mbcssm)
|-- sbcharsetprober.py (pip._vendor.requests.packages.chardet.sbcharsetprober)
|-- sbcsgroupprober.py (pip._vendor.requests.packages.chardet.sbcsgroupprober)
|-- sjisprober.py (pip._vendor.requests.packages.chardet.sjisprober)
|-- universaldetector.py (pip._vendor.requests.packages.chardet.universaldetector)
|-- utf8prober.py (pip._vendor.requests.packages.chardet.utf8prober)
|-- urllib3 (pip._vendor.requests.packages.urllib3)
|-- contrib (pip._vendor.requests.packages.urllib3.contrib)
|-- __init__.py (pip._vendor.requests.packages.urllib3.contrib)
|-- appengine.py (pip._vendor.requests.packages.urllib3.contrib.appengine)
|-- ntlmpool.py (pip._vendor.requests.packages.urllib3.contrib.ntlmpool)
|-- pyopenssl.py (pip._vendor.requests.packages.urllib3.contrib.pyopenssl)
|-- socks.py (pip._vendor.requests.packages.urllib3.contrib.socks)
|-- packages (pip._vendor.requests.packages.urllib3.packages)
|-- ssl_match_hostname (pip._vendor.requests.packages.urllib3.packages.ssl_match_hostname)
|-- __init__.py (pip._vendor.requests.packages.urllib3.packages.ssl_match_hostname)
|-- _implementation.py (pip._vendor.requests.packages.urllib3.packages.ssl_match_hostname._implementation)
|-- __init__.py (pip._vendor.requests.packages.urllib3.packages)
|-- ordered_dict.py (pip._vendor.requests.packages.urllib3.packages.ordered_dict)
|-- six.py (pip._vendor.requests.packages.urllib3.packages.six)
|-- util (pip._vendor.requests.packages.urllib3.util)
|-- __init__.py (pip._vendor.requests.packages.urllib3.util)
|-- connection.py (pip._vendor.requests.packages.urllib3.util.connection)
|-- request.py (pip._vendor.requests.packages.urllib3.util.request)
|-- response.py (pip._vendor.requests.packages.urllib3.util.response)
|-- retry.py (pip._vendor.requests.packages.urllib3.util.retry)
|-- ssl_.py (pip._vendor.requests.packages.urllib3.util.ssl_)
|-- timeout.py (pip._vendor.requests.packages.urllib3.util.timeout)
|-- url.py (pip._vendor.requests.packages.urllib3.util.url)
|-- __init__.py (pip._vendor.requests.packages.urllib3)
|-- _collections.py (pip._vendor.requests.packages.urllib3._collections)
|-- connection.py (pip._vendor.requests.packages.urllib3.connection)
|-- connectionpool.py (pip._vendor.requests.packages.urllib3.connectionpool)
|-- exceptions.py (pip._vendor.requests.packages.urllib3.exceptions)
|-- fields.py (pip._vendor.requests.packages.urllib3.fields)
|-- filepost.py (pip._vendor.requests.packages.urllib3.filepost)
|-- poolmanager.py (pip._vendor.requests.packages.urllib3.poolmanager)
|-- request.py (pip._vendor.requests.packages.urllib3.request)
|-- response.py (pip._vendor.requests.packages.urllib3.response)
|-- __init__.py (pip._vendor.requests.packages)
|-- __init__.py (pip._vendor.requests)
|-- adapters.py (pip._vendor.requests.adapters)
|-- api.py (pip._vendor.requests.api)
|-- auth.py (pip._vendor.requests.auth)
|-- certs.py (pip._vendor.requests.certs)
|-- compat.py (pip._vendor.requests.compat)
|-- cookies.py (pip._vendor.requests.cookies)
|-- exceptions.py (pip._vendor.requests.exceptions)
|-- hooks.py (pip._vendor.requests.hooks)
|-- models.py (pip._vendor.requests.models)
|-- sessions.py (pip._vendor.requests.sessions)
|-- status_codes.py (pip._vendor.requests.status_codes)
|-- structures.py (pip._vendor.requests.structures)
|-- utils.py (pip._vendor.requests.utils)
|-- webencodings (pip._vendor.webencodings)
|-- __init__.py (pip._vendor.webencodings)
|-- labels.py (pip._vendor.webencodings.labels)
|-- mklabels.py (pip._vendor.webencodings.mklabels)
|-- tests.py (pip._vendor.webencodings.tests)
|-- x_user_defined.py (pip._vendor.webencodings.x_user_defined)
|-- __init__.py (pip._vendor)
|-- appdirs.py (pip._vendor.appdirs)
|-- distro.py (pip._vendor.distro)
|-- ipaddress.py (pip._vendor.ipaddress)
|-- ordereddict.py (pip._vendor.ordereddict)
|-- pyparsing.py (pip._vendor.pyparsing)
|-- re-vendor.py (pip._vendor.re-vendor)
|-- retrying.py (pip._vendor.retrying)
|-- six.py (pip._vendor.six)
|-- commands (pip.commands)
|-- __init__.py (pip.commands)
|-- check.py (pip.commands.check)
|-- completion.py (pip.commands.completion)
|-- download.py (pip.commands.download)
|-- freeze.py (pip.commands.freeze)
|-- hash.py (pip.commands.hash)
|-- help.py (pip.commands.help)
|-- install.py (pip.commands.install)
|-- list.py (pip.commands.list)
|-- search.py (pip.commands.search)
|-- show.py (pip.commands.show)
|-- uninstall.py (pip.commands.uninstall)
|-- wheel.py (pip.commands.wheel)
|-- compat (pip.compat)
|-- __init__.py (pip.compat)
|-- dictconfig.py (pip.compat.dictconfig)
|-- models (pip.models)
|-- __init__.py (pip.models)
|-- index.py (pip.models.index)
|-- operations (pip.operations)
|-- __init__.py (pip.operations)
|-- check.py (pip.operations.check)
|-- freeze.py (pip.operations.freeze)
|-- req (pip.req)
|-- __init__.py (pip.req)
|-- req_file.py (pip.req.req_file)
|-- req_install.py (pip.req.req_install)
|-- req_set.py (pip.req.req_set)
|-- req_uninstall.py (pip.req.req_uninstall)
|-- utils (pip.utils)
|-- __init__.py (pip.utils)
|-- appdirs.py (pip.utils.appdirs)
|-- build.py (pip.utils.build)
|-- deprecation.py (pip.utils.deprecation)
|-- encoding.py (pip.utils.encoding)
|-- filesystem.py (pip.utils.filesystem)
|-- glibc.py (pip.utils.glibc)
|-- hashes.py (pip.utils.hashes)
|-- logging.py (pip.utils.logging)
|-- outdated.py (pip.utils.outdated)
|-- packaging.py (pip.utils.packaging)
|-- setuptools_build.py (pip.utils.setuptools_build)
|-- ui.py (pip.utils.ui)
|-- vcs (pip.vcs)
|-- __init__.py (pip.vcs)
|-- bazaar.py (pip.vcs.bazaar)
|-- git.py (pip.vcs.git)
|-- mercurial.py (pip.vcs.mercurial)
|-- subversion.py (pip.vcs.subversion)
|-- __init__.py (pip)
|-- __main__.py (pip.__main__)
|-- basecommand.py (pip.basecommand)
|-- baseparser.py (pip.baseparser)
|-- cmdoptions.py (pip.cmdoptions)
|-- download.py (pip.download)
|-- exceptions.py (pip.exceptions)
|-- index.py (pip.index)
|-- locations.py (pip.locations)
|-- pep425tags.py (pip.pep425tags)
|-- status_codes.py (pip.status_codes)
|-- wheel.py (pip.wheel)
.. _install:
Install
------------------------------------------------------------------------------
``picage`` is released on PyPI, so all you need is:
.. code-block:: console
$ pip install picage
To upgrade to latest version:
.. code-block:: console
$ pip install --upgrade picage
Raw data
{
"_id": null,
"home_page": "https://github.com/MacHu-GWU/picage-project",
"name": "picage",
"maintainer": "Sanhe Hu",
"docs_url": null,
"requires_python": "",
"maintainer_email": "husanhe@gmail.com",
"keywords": "",
"author": "Sanhe Hu",
"author_email": "husanhe@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/61/72/c6860287d86517351927a89b6aa669ea509dd4e653d06c7f6c59258fbb13/picage-0.2.2.tar.gz",
"platform": "Windows",
"description": "\n.. image:: https://readthedocs.org/projects/picage/badge/?version=latest\n :target: https://picage.readthedocs.io/index.html\n :alt: Documentation Status\n\n.. image:: https://travis-ci.org/MacHu-GWU/picage-project.svg?branch=master\n :target: https://travis-ci.org/MacHu-GWU/picage-project?branch=master\n\n.. image:: https://codecov.io/gh/MacHu-GWU/picage-project/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/MacHu-GWU/picage-project\n\n.. image:: https://img.shields.io/pypi/v/picage.svg\n :target: https://pypi.python.org/pypi/picage\n\n.. image:: https://img.shields.io/pypi/l/picage.svg\n :target: https://pypi.python.org/pypi/picage\n\n.. image:: https://img.shields.io/pypi/pyversions/picage.svg\n :target: https://pypi.python.org/pypi/picage\n\n.. image:: https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social\n :target: https://github.com/MacHu-GWU/picage-project\n\n------\n\n\n.. image:: https://img.shields.io/badge/Link-Document-blue.svg\n :target: https://picage.readthedocs.io/index.html\n\n.. image:: https://img.shields.io/badge/Link-API-blue.svg\n :target: https://picage.readthedocs.io/py-modindex.html\n\n.. image:: https://img.shields.io/badge/Link-Source_Code-blue.svg\n :target: https://picage.readthedocs.io/py-modindex.html\n\n.. image:: https://img.shields.io/badge/Link-Install-blue.svg\n :target: `install`_\n\n.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg\n :target: https://github.com/MacHu-GWU/picage-project\n\n.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg\n :target: https://github.com/MacHu-GWU/picage-project/issues\n\n.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg\n :target: https://github.com/MacHu-GWU/picage-project/issues\n\n.. image:: https://img.shields.io/badge/Link-Download-blue.svg\n :target: https://pypi.org/pypi/picage#files\n\n\nWelcome to ``picage`` Documentation\n==============================================================================\n``picage`` provides a object style interface to handle Python package module / file structure. It gives you simple api to access:\n\n- a fullname, shortname of a python module\n- parent, sub packages and sub modules\n- recursively walk through all sub packages and sub modules\n\n.. note::\n\n Python is a Dyanamic Type Programming language, everything in Python\n is an object, including python package and module.\n\n\nUsage\n------------------------------------------------------------------------------\n\n.. code-block:: python\n\n >>> from picage import Package\n\n >>> pip = Package(\"pip\")\n >>> pip\n Package(name='pip', path='./venv/lib/python2.7/site-packages/pip')\n\n >>> print(pip)\n Package(\n name='pip',\n path='./venv/lib/python2.7/site-packages/pip',\n sub_packages=['_vendor', 'commands', 'compat', 'models', 'operations', 'req', 'utils', 'vcs'],\n sub_modules=['__main__', 'basecommand', 'baseparser', 'cmdoptions', 'download', 'exceptions', 'index', 'locations', 'pep425tags', 'status_codes', 'wheel'],\n )\n\n # visit sub packages\n >>> for package_name, package in pip.sub_packages().items():\n ...\n\n # visit sub modules\n >>> for module_name, module in pip.sub_modules().items():\n ...\n\n # walk through all sub packages modules\n >>> for pkg, parent_pkg, sub_pkg_list, sub_module_list in pip.walk():\n ...\n\n >>> commands = pip[\"commands\"] # it's a sub package\n >>> commands = Package(\"pip.commands\") # or you can create it from dot notation\n\n >>> commands.parent == pip # visit parent package\n True\n >>> pip.parent\n None\n\n >>> print(commands)\n Package(\n name='pip.commands',\n path='./venv/lib/python2.7/site-packages/pip/commands',\n sub_packages=[],\n sub_modules=['check', 'completion', 'download', 'freeze', 'hash', 'help', 'install', 'list', 'search', 'show', 'uninstall', 'wheel'],\n )\n\n >>> install = commands[\"install\"] # it's a module\n >>> install = Module(\"pip.commands.install\") # or you can create it from dot notation\n\n # Display package structure\n >>> pip.pprint()\n |-- pip (pip)\n |-- _vendor (pip._vendor)\n |-- cachecontrol (pip._vendor.cachecontrol)\n |-- caches (pip._vendor.cachecontrol.caches)\n |-- __init__.py (pip._vendor.cachecontrol.caches)\n |-- file_cache.py (pip._vendor.cachecontrol.caches.file_cache)\n |-- redis_cache.py (pip._vendor.cachecontrol.caches.redis_cache)\n |-- __init__.py (pip._vendor.cachecontrol)\n |-- _cmd.py (pip._vendor.cachecontrol._cmd)\n |-- adapter.py (pip._vendor.cachecontrol.adapter)\n |-- cache.py (pip._vendor.cachecontrol.cache)\n |-- compat.py (pip._vendor.cachecontrol.compat)\n |-- controller.py (pip._vendor.cachecontrol.controller)\n |-- filewrapper.py (pip._vendor.cachecontrol.filewrapper)\n |-- heuristics.py (pip._vendor.cachecontrol.heuristics)\n |-- serialize.py (pip._vendor.cachecontrol.serialize)\n |-- wrapper.py (pip._vendor.cachecontrol.wrapper)\n |-- colorama (pip._vendor.colorama)\n |-- __init__.py (pip._vendor.colorama)\n |-- ansi.py (pip._vendor.colorama.ansi)\n |-- ansitowin32.py (pip._vendor.colorama.ansitowin32)\n |-- initialise.py (pip._vendor.colorama.initialise)\n |-- win32.py (pip._vendor.colorama.win32)\n |-- winterm.py (pip._vendor.colorama.winterm)\n |-- distlib (pip._vendor.distlib)\n |-- _backport (pip._vendor.distlib._backport)\n |-- __init__.py (pip._vendor.distlib._backport)\n |-- misc.py (pip._vendor.distlib._backport.misc)\n |-- shutil.py (pip._vendor.distlib._backport.shutil)\n |-- sysconfig.py (pip._vendor.distlib._backport.sysconfig)\n |-- tarfile.py (pip._vendor.distlib._backport.tarfile)\n |-- __init__.py (pip._vendor.distlib)\n |-- compat.py (pip._vendor.distlib.compat)\n |-- database.py (pip._vendor.distlib.database)\n |-- index.py (pip._vendor.distlib.index)\n |-- locators.py (pip._vendor.distlib.locators)\n |-- manifest.py (pip._vendor.distlib.manifest)\n |-- markers.py (pip._vendor.distlib.markers)\n |-- metadata.py (pip._vendor.distlib.metadata)\n |-- resources.py (pip._vendor.distlib.resources)\n |-- scripts.py (pip._vendor.distlib.scripts)\n |-- util.py (pip._vendor.distlib.util)\n |-- version.py (pip._vendor.distlib.version)\n |-- wheel.py (pip._vendor.distlib.wheel)\n |-- html5lib (pip._vendor.html5lib)\n |-- _trie (pip._vendor.html5lib._trie)\n |-- __init__.py (pip._vendor.html5lib._trie)\n |-- _base.py (pip._vendor.html5lib._trie._base)\n |-- datrie.py (pip._vendor.html5lib._trie.datrie)\n |-- py.py (pip._vendor.html5lib._trie.py)\n |-- filters (pip._vendor.html5lib.filters)\n |-- __init__.py (pip._vendor.html5lib.filters)\n |-- alphabeticalattributes.py (pip._vendor.html5lib.filters.alphabeticalattributes)\n |-- base.py (pip._vendor.html5lib.filters.base)\n |-- inject_meta_charset.py (pip._vendor.html5lib.filters.inject_meta_charset)\n |-- lint.py (pip._vendor.html5lib.filters.lint)\n |-- optionaltags.py (pip._vendor.html5lib.filters.optionaltags)\n |-- sanitizer.py (pip._vendor.html5lib.filters.sanitizer)\n |-- whitespace.py (pip._vendor.html5lib.filters.whitespace)\n |-- treeadapters (pip._vendor.html5lib.treeadapters)\n |-- __init__.py (pip._vendor.html5lib.treeadapters)\n |-- genshi.py (pip._vendor.html5lib.treeadapters.genshi)\n |-- sax.py (pip._vendor.html5lib.treeadapters.sax)\n |-- treebuilders (pip._vendor.html5lib.treebuilders)\n |-- __init__.py (pip._vendor.html5lib.treebuilders)\n |-- base.py (pip._vendor.html5lib.treebuilders.base)\n |-- dom.py (pip._vendor.html5lib.treebuilders.dom)\n |-- etree.py (pip._vendor.html5lib.treebuilders.etree)\n |-- etree_lxml.py (pip._vendor.html5lib.treebuilders.etree_lxml)\n |-- treewalkers (pip._vendor.html5lib.treewalkers)\n |-- __init__.py (pip._vendor.html5lib.treewalkers)\n |-- base.py (pip._vendor.html5lib.treewalkers.base)\n |-- dom.py (pip._vendor.html5lib.treewalkers.dom)\n |-- etree.py (pip._vendor.html5lib.treewalkers.etree)\n |-- etree_lxml.py (pip._vendor.html5lib.treewalkers.etree_lxml)\n |-- genshi.py (pip._vendor.html5lib.treewalkers.genshi)\n |-- __init__.py (pip._vendor.html5lib)\n |-- _ihatexml.py (pip._vendor.html5lib._ihatexml)\n |-- _inputstream.py (pip._vendor.html5lib._inputstream)\n |-- _tokenizer.py (pip._vendor.html5lib._tokenizer)\n |-- _utils.py (pip._vendor.html5lib._utils)\n |-- constants.py (pip._vendor.html5lib.constants)\n |-- html5parser.py (pip._vendor.html5lib.html5parser)\n |-- serializer.py (pip._vendor.html5lib.serializer)\n |-- lockfile (pip._vendor.lockfile)\n |-- __init__.py (pip._vendor.lockfile)\n |-- linklockfile.py (pip._vendor.lockfile.linklockfile)\n |-- mkdirlockfile.py (pip._vendor.lockfile.mkdirlockfile)\n |-- pidlockfile.py (pip._vendor.lockfile.pidlockfile)\n |-- sqlitelockfile.py (pip._vendor.lockfile.sqlitelockfile)\n |-- symlinklockfile.py (pip._vendor.lockfile.symlinklockfile)\n |-- packaging (pip._vendor.packaging)\n |-- __init__.py (pip._vendor.packaging)\n |-- __about__.py (pip._vendor.packaging.__about__)\n |-- _compat.py (pip._vendor.packaging._compat)\n |-- _structures.py (pip._vendor.packaging._structures)\n |-- markers.py (pip._vendor.packaging.markers)\n |-- requirements.py (pip._vendor.packaging.requirements)\n |-- specifiers.py (pip._vendor.packaging.specifiers)\n |-- utils.py (pip._vendor.packaging.utils)\n |-- version.py (pip._vendor.packaging.version)\n |-- pkg_resources (pip._vendor.pkg_resources)\n |-- __init__.py (pip._vendor.pkg_resources)\n |-- progress (pip._vendor.progress)\n |-- __init__.py (pip._vendor.progress)\n |-- bar.py (pip._vendor.progress.bar)\n |-- counter.py (pip._vendor.progress.counter)\n |-- helpers.py (pip._vendor.progress.helpers)\n |-- spinner.py (pip._vendor.progress.spinner)\n |-- requests (pip._vendor.requests)\n |-- packages (pip._vendor.requests.packages)\n |-- chardet (pip._vendor.requests.packages.chardet)\n |-- __init__.py (pip._vendor.requests.packages.chardet)\n |-- big5freq.py (pip._vendor.requests.packages.chardet.big5freq)\n |-- big5prober.py (pip._vendor.requests.packages.chardet.big5prober)\n |-- chardetect.py (pip._vendor.requests.packages.chardet.chardetect)\n |-- chardistribution.py (pip._vendor.requests.packages.chardet.chardistribution)\n |-- charsetgroupprober.py (pip._vendor.requests.packages.chardet.charsetgroupprober)\n |-- charsetprober.py (pip._vendor.requests.packages.chardet.charsetprober)\n |-- codingstatemachine.py (pip._vendor.requests.packages.chardet.codingstatemachine)\n |-- compat.py (pip._vendor.requests.packages.chardet.compat)\n |-- constants.py (pip._vendor.requests.packages.chardet.constants)\n |-- cp949prober.py (pip._vendor.requests.packages.chardet.cp949prober)\n |-- escprober.py (pip._vendor.requests.packages.chardet.escprober)\n |-- escsm.py (pip._vendor.requests.packages.chardet.escsm)\n |-- eucjpprober.py (pip._vendor.requests.packages.chardet.eucjpprober)\n |-- euckrfreq.py (pip._vendor.requests.packages.chardet.euckrfreq)\n |-- euckrprober.py (pip._vendor.requests.packages.chardet.euckrprober)\n |-- euctwfreq.py (pip._vendor.requests.packages.chardet.euctwfreq)\n |-- euctwprober.py (pip._vendor.requests.packages.chardet.euctwprober)\n |-- gb2312freq.py (pip._vendor.requests.packages.chardet.gb2312freq)\n |-- gb2312prober.py (pip._vendor.requests.packages.chardet.gb2312prober)\n |-- hebrewprober.py (pip._vendor.requests.packages.chardet.hebrewprober)\n |-- jisfreq.py (pip._vendor.requests.packages.chardet.jisfreq)\n |-- jpcntx.py (pip._vendor.requests.packages.chardet.jpcntx)\n |-- langbulgarianmodel.py (pip._vendor.requests.packages.chardet.langbulgarianmodel)\n |-- langcyrillicmodel.py (pip._vendor.requests.packages.chardet.langcyrillicmodel)\n |-- langgreekmodel.py (pip._vendor.requests.packages.chardet.langgreekmodel)\n |-- langhebrewmodel.py (pip._vendor.requests.packages.chardet.langhebrewmodel)\n |-- langhungarianmodel.py (pip._vendor.requests.packages.chardet.langhungarianmodel)\n |-- langthaimodel.py (pip._vendor.requests.packages.chardet.langthaimodel)\n |-- latin1prober.py (pip._vendor.requests.packages.chardet.latin1prober)\n |-- mbcharsetprober.py (pip._vendor.requests.packages.chardet.mbcharsetprober)\n |-- mbcsgroupprober.py (pip._vendor.requests.packages.chardet.mbcsgroupprober)\n |-- mbcssm.py (pip._vendor.requests.packages.chardet.mbcssm)\n |-- sbcharsetprober.py (pip._vendor.requests.packages.chardet.sbcharsetprober)\n |-- sbcsgroupprober.py (pip._vendor.requests.packages.chardet.sbcsgroupprober)\n |-- sjisprober.py (pip._vendor.requests.packages.chardet.sjisprober)\n |-- universaldetector.py (pip._vendor.requests.packages.chardet.universaldetector)\n |-- utf8prober.py (pip._vendor.requests.packages.chardet.utf8prober)\n |-- urllib3 (pip._vendor.requests.packages.urllib3)\n |-- contrib (pip._vendor.requests.packages.urllib3.contrib)\n |-- __init__.py (pip._vendor.requests.packages.urllib3.contrib)\n |-- appengine.py (pip._vendor.requests.packages.urllib3.contrib.appengine)\n |-- ntlmpool.py (pip._vendor.requests.packages.urllib3.contrib.ntlmpool)\n |-- pyopenssl.py (pip._vendor.requests.packages.urllib3.contrib.pyopenssl)\n |-- socks.py (pip._vendor.requests.packages.urllib3.contrib.socks)\n |-- packages (pip._vendor.requests.packages.urllib3.packages)\n |-- ssl_match_hostname (pip._vendor.requests.packages.urllib3.packages.ssl_match_hostname)\n |-- __init__.py (pip._vendor.requests.packages.urllib3.packages.ssl_match_hostname)\n |-- _implementation.py (pip._vendor.requests.packages.urllib3.packages.ssl_match_hostname._implementation)\n |-- __init__.py (pip._vendor.requests.packages.urllib3.packages)\n |-- ordered_dict.py (pip._vendor.requests.packages.urllib3.packages.ordered_dict)\n |-- six.py (pip._vendor.requests.packages.urllib3.packages.six)\n |-- util (pip._vendor.requests.packages.urllib3.util)\n |-- __init__.py (pip._vendor.requests.packages.urllib3.util)\n |-- connection.py (pip._vendor.requests.packages.urllib3.util.connection)\n |-- request.py (pip._vendor.requests.packages.urllib3.util.request)\n |-- response.py (pip._vendor.requests.packages.urllib3.util.response)\n |-- retry.py (pip._vendor.requests.packages.urllib3.util.retry)\n |-- ssl_.py (pip._vendor.requests.packages.urllib3.util.ssl_)\n |-- timeout.py (pip._vendor.requests.packages.urllib3.util.timeout)\n |-- url.py (pip._vendor.requests.packages.urllib3.util.url)\n |-- __init__.py (pip._vendor.requests.packages.urllib3)\n |-- _collections.py (pip._vendor.requests.packages.urllib3._collections)\n |-- connection.py (pip._vendor.requests.packages.urllib3.connection)\n |-- connectionpool.py (pip._vendor.requests.packages.urllib3.connectionpool)\n |-- exceptions.py (pip._vendor.requests.packages.urllib3.exceptions)\n |-- fields.py (pip._vendor.requests.packages.urllib3.fields)\n |-- filepost.py (pip._vendor.requests.packages.urllib3.filepost)\n |-- poolmanager.py (pip._vendor.requests.packages.urllib3.poolmanager)\n |-- request.py (pip._vendor.requests.packages.urllib3.request)\n |-- response.py (pip._vendor.requests.packages.urllib3.response)\n |-- __init__.py (pip._vendor.requests.packages)\n |-- __init__.py (pip._vendor.requests)\n |-- adapters.py (pip._vendor.requests.adapters)\n |-- api.py (pip._vendor.requests.api)\n |-- auth.py (pip._vendor.requests.auth)\n |-- certs.py (pip._vendor.requests.certs)\n |-- compat.py (pip._vendor.requests.compat)\n |-- cookies.py (pip._vendor.requests.cookies)\n |-- exceptions.py (pip._vendor.requests.exceptions)\n |-- hooks.py (pip._vendor.requests.hooks)\n |-- models.py (pip._vendor.requests.models)\n |-- sessions.py (pip._vendor.requests.sessions)\n |-- status_codes.py (pip._vendor.requests.status_codes)\n |-- structures.py (pip._vendor.requests.structures)\n |-- utils.py (pip._vendor.requests.utils)\n |-- webencodings (pip._vendor.webencodings)\n |-- __init__.py (pip._vendor.webencodings)\n |-- labels.py (pip._vendor.webencodings.labels)\n |-- mklabels.py (pip._vendor.webencodings.mklabels)\n |-- tests.py (pip._vendor.webencodings.tests)\n |-- x_user_defined.py (pip._vendor.webencodings.x_user_defined)\n |-- __init__.py (pip._vendor)\n |-- appdirs.py (pip._vendor.appdirs)\n |-- distro.py (pip._vendor.distro)\n |-- ipaddress.py (pip._vendor.ipaddress)\n |-- ordereddict.py (pip._vendor.ordereddict)\n |-- pyparsing.py (pip._vendor.pyparsing)\n |-- re-vendor.py (pip._vendor.re-vendor)\n |-- retrying.py (pip._vendor.retrying)\n |-- six.py (pip._vendor.six)\n |-- commands (pip.commands)\n |-- __init__.py (pip.commands)\n |-- check.py (pip.commands.check)\n |-- completion.py (pip.commands.completion)\n |-- download.py (pip.commands.download)\n |-- freeze.py (pip.commands.freeze)\n |-- hash.py (pip.commands.hash)\n |-- help.py (pip.commands.help)\n |-- install.py (pip.commands.install)\n |-- list.py (pip.commands.list)\n |-- search.py (pip.commands.search)\n |-- show.py (pip.commands.show)\n |-- uninstall.py (pip.commands.uninstall)\n |-- wheel.py (pip.commands.wheel)\n |-- compat (pip.compat)\n |-- __init__.py (pip.compat)\n |-- dictconfig.py (pip.compat.dictconfig)\n |-- models (pip.models)\n |-- __init__.py (pip.models)\n |-- index.py (pip.models.index)\n |-- operations (pip.operations)\n |-- __init__.py (pip.operations)\n |-- check.py (pip.operations.check)\n |-- freeze.py (pip.operations.freeze)\n |-- req (pip.req)\n |-- __init__.py (pip.req)\n |-- req_file.py (pip.req.req_file)\n |-- req_install.py (pip.req.req_install)\n |-- req_set.py (pip.req.req_set)\n |-- req_uninstall.py (pip.req.req_uninstall)\n |-- utils (pip.utils)\n |-- __init__.py (pip.utils)\n |-- appdirs.py (pip.utils.appdirs)\n |-- build.py (pip.utils.build)\n |-- deprecation.py (pip.utils.deprecation)\n |-- encoding.py (pip.utils.encoding)\n |-- filesystem.py (pip.utils.filesystem)\n |-- glibc.py (pip.utils.glibc)\n |-- hashes.py (pip.utils.hashes)\n |-- logging.py (pip.utils.logging)\n |-- outdated.py (pip.utils.outdated)\n |-- packaging.py (pip.utils.packaging)\n |-- setuptools_build.py (pip.utils.setuptools_build)\n |-- ui.py (pip.utils.ui)\n |-- vcs (pip.vcs)\n |-- __init__.py (pip.vcs)\n |-- bazaar.py (pip.vcs.bazaar)\n |-- git.py (pip.vcs.git)\n |-- mercurial.py (pip.vcs.mercurial)\n |-- subversion.py (pip.vcs.subversion)\n |-- __init__.py (pip)\n |-- __main__.py (pip.__main__)\n |-- basecommand.py (pip.basecommand)\n |-- baseparser.py (pip.baseparser)\n |-- cmdoptions.py (pip.cmdoptions)\n |-- download.py (pip.download)\n |-- exceptions.py (pip.exceptions)\n |-- index.py (pip.index)\n |-- locations.py (pip.locations)\n |-- pep425tags.py (pip.pep425tags)\n |-- status_codes.py (pip.status_codes)\n |-- wheel.py (pip.wheel)\n\n\n.. _install:\n\nInstall\n------------------------------------------------------------------------------\n\n``picage`` is released on PyPI, so all you need is:\n\n.. code-block:: console\n\n $ pip install picage\n\nTo upgrade to latest version:\n\n.. code-block:: console\n\n $ pip install --upgrade picage\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Object style interface for package/module.",
"version": "0.2.2",
"project_urls": {
"Download": "https://pypi.python.org/pypi/picage/0.2.2#downloads",
"Homepage": "https://github.com/MacHu-GWU/picage-project"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8abc447012f36e21aa9f8e7e1f201e8b600fb2e24ee6dee9d189aafe48637411",
"md5": "7bb0c6fc91b88c4e9a73cdaaff2fa566",
"sha256": "f03c0fcb56405ef2cacc3b38d9c8788b8377b9bc17a856f94ff443324c0eb532"
},
"downloads": -1,
"filename": "picage-0.2.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "7bb0c6fc91b88c4e9a73cdaaff2fa566",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 11012,
"upload_time": "2024-01-12T14:37:41",
"upload_time_iso_8601": "2024-01-12T14:37:41.994124Z",
"url": "https://files.pythonhosted.org/packages/8a/bc/447012f36e21aa9f8e7e1f201e8b600fb2e24ee6dee9d189aafe48637411/picage-0.2.2-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6172c6860287d86517351927a89b6aa669ea509dd4e653d06c7f6c59258fbb13",
"md5": "3747972796ace36f666c67b700044f18",
"sha256": "7816d500a6fbca29590a9375bf76c23d1d2c7c15781e925e17a524bcaacfa253"
},
"downloads": -1,
"filename": "picage-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "3747972796ace36f666c67b700044f18",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18210,
"upload_time": "2024-01-12T14:37:43",
"upload_time_iso_8601": "2024-01-12T14:37:43.933177Z",
"url": "https://files.pythonhosted.org/packages/61/72/c6860287d86517351927a89b6aa669ea509dd4e653d06c7f6c59258fbb13/picage-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-12 14:37:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MacHu-GWU",
"github_project": "picage-project",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [],
"lcname": "picage"
}