dephell-discover


Namedephell-discover JSON
Version 0.2.10 PyPI version JSON
download
home_page
SummaryFind project modules and data files (packages and package_data for setup.py).
upload_time2019-11-13 11:09:43
maintainer
docs_urlNone
authorGram
requires_python>=3.5
licenseMIT
keywords dephell packaging dependency dependencies setuptools packages finder
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            
Dephell Discover
================


.. image:: https://travis-ci.org/dephell/dephell_discover.svg?branch=master
   :target: https://travis-ci.org/dephell/dephell_discover
   :alt: travis


.. image:: https://ci.appveyor.com/api/projects/status/github/dephell/dephell_discover?svg=true
   :target: https://ci.appveyor.com/project/orsinium/dephell-discover
   :alt: appveyor


.. image:: https://img.shields.io/pypi/l/dephell-discover.svg
   :target: https://github.com/dephell/dephell_discover/blob/master/LICENSE
   :alt: MIT License


Find project modules and data files (\ ``packages`` and ``package_data`` for ``setup.py``\ ).

Installation
------------

install from `PyPI <https://pypi.org/project/dephell-discover/>`_\ :

.. code-block:: bash

   python3 -m pip install --user dephell_discover

Usage
-----

Get root, packages, package_data, `package dir <https://docs.python.org/2/distutils/examples.html#pure-python-distribution-by-package>`_\ :

.. code-block:: python

   from pathlib import Path
   from dephell_discover import Root

   root = Root(path=Path('../dephell'))

   root.packages
   # [Package(path=Path('../dephell/dephell'), root=Path('../dephell')), ...]

   root.data
   # {Data(path=Path('../dephell/dephell/templates'), ext='.j2', package=Package(...)), ...}

   root.package_dir
   # {'': '.'}

Package properties:

.. code-block:: python

   p = root.packages[-1]
   p.path    # Path('../dephell/dephell/commands')
   p.root    # Path('../dephell')
   p.module  # 'dephell.commands'
   str(p)    # 'dephell.commands'
   list(p)   # [Path('../dephell/dephell/commands/base.py'), ...]

Data properties:

.. code-block:: python

   d = next(iter(root.data))
   d.path      # Path('../dephell/dephell/templates')
   d.ext       # .j2
   d.package   # Package(path=Path('../dephell/dephell'), root=...)
   d.module    # 'dephell'
   # relative path from package root:
   d.relative  # 'templates/*.j2'
   str(d)      # 'templates/*.j2'
   list(d)     # [Path('../dephell/dephell/templates/python.html.j2'), ...]

Meta information:

.. code-block:: python

   root.metainfo.summary
   # 'Python project management.'

   root.metainfo.authors
   # ['Gram (@orsinium)']

   root.metainfo.license
   # 'MIT'

   root.metainfo.version
   # '0.7.0'

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "dephell-discover",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": "",
    "keywords": "dephell,packaging,dependency,dependencies,setuptools,packages,finder",
    "author": "Gram",
    "author_email": "master_fess@mail.ru",
    "download_url": "https://files.pythonhosted.org/packages/c0/4c/8a4bcccd4b11d3a84825eccb44122b83137b0acc1a317c2ce3b324deb1b2/dephell_discover-0.2.10.tar.gz",
    "platform": "",
    "description": "\nDephell Discover\n================\n\n\n.. image:: https://travis-ci.org/dephell/dephell_discover.svg?branch=master\n   :target: https://travis-ci.org/dephell/dephell_discover\n   :alt: travis\n\n\n.. image:: https://ci.appveyor.com/api/projects/status/github/dephell/dephell_discover?svg=true\n   :target: https://ci.appveyor.com/project/orsinium/dephell-discover\n   :alt: appveyor\n\n\n.. image:: https://img.shields.io/pypi/l/dephell-discover.svg\n   :target: https://github.com/dephell/dephell_discover/blob/master/LICENSE\n   :alt: MIT License\n\n\nFind project modules and data files (\\ ``packages`` and ``package_data`` for ``setup.py``\\ ).\n\nInstallation\n------------\n\ninstall from `PyPI <https://pypi.org/project/dephell-discover/>`_\\ :\n\n.. code-block:: bash\n\n   python3 -m pip install --user dephell_discover\n\nUsage\n-----\n\nGet root, packages, package_data, `package dir <https://docs.python.org/2/distutils/examples.html#pure-python-distribution-by-package>`_\\ :\n\n.. code-block:: python\n\n   from pathlib import Path\n   from dephell_discover import Root\n\n   root = Root(path=Path('../dephell'))\n\n   root.packages\n   # [Package(path=Path('../dephell/dephell'), root=Path('../dephell')), ...]\n\n   root.data\n   # {Data(path=Path('../dephell/dephell/templates'), ext='.j2', package=Package(...)), ...}\n\n   root.package_dir\n   # {'': '.'}\n\nPackage properties:\n\n.. code-block:: python\n\n   p = root.packages[-1]\n   p.path    # Path('../dephell/dephell/commands')\n   p.root    # Path('../dephell')\n   p.module  # 'dephell.commands'\n   str(p)    # 'dephell.commands'\n   list(p)   # [Path('../dephell/dephell/commands/base.py'), ...]\n\nData properties:\n\n.. code-block:: python\n\n   d = next(iter(root.data))\n   d.path      # Path('../dephell/dephell/templates')\n   d.ext       # .j2\n   d.package   # Package(path=Path('../dephell/dephell'), root=...)\n   d.module    # 'dephell'\n   # relative path from package root:\n   d.relative  # 'templates/*.j2'\n   str(d)      # 'templates/*.j2'\n   list(d)     # [Path('../dephell/dephell/templates/python.html.j2'), ...]\n\nMeta information:\n\n.. code-block:: python\n\n   root.metainfo.summary\n   # 'Python project management.'\n\n   root.metainfo.authors\n   # ['Gram (@orsinium)']\n\n   root.metainfo.license\n   # 'MIT'\n\n   root.metainfo.version\n   # '0.7.0'\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Find project modules and data files (packages and package_data for setup.py).",
    "version": "0.2.10",
    "project_urls": {
        "Repository": "https://github.com/dephell/dephell_discover"
    },
    "split_keywords": [
        "dephell",
        "packaging",
        "dependency",
        "dependencies",
        "setuptools",
        "packages",
        "finder"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a63770ceb569bd1492fdc192340e8a7e4847dfd71a712a1d5a6ff04d2b75d114",
                "md5": "da929bbd86aef3992acedb1e28a340bb",
                "sha256": "abf190e9707d4a88f14e91be1f80e996e195b20b5400da2362e98cf19e59a1e4"
            },
            "downloads": -1,
            "filename": "dephell_discover-0.2.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "da929bbd86aef3992acedb1e28a340bb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5",
            "size": 9350,
            "upload_time": "2019-11-13T11:09:41",
            "upload_time_iso_8601": "2019-11-13T11:09:41.804243Z",
            "url": "https://files.pythonhosted.org/packages/a6/37/70ceb569bd1492fdc192340e8a7e4847dfd71a712a1d5a6ff04d2b75d114/dephell_discover-0.2.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c04c8a4bcccd4b11d3a84825eccb44122b83137b0acc1a317c2ce3b324deb1b2",
                "md5": "1dedeb46d083c48ed38bf3b926e816a1",
                "sha256": "a2ad414e5e0fe16c82c537d6a3198afd9818c0c010760eccb23e2d60e5b66df6"
            },
            "downloads": -1,
            "filename": "dephell_discover-0.2.10.tar.gz",
            "has_sig": false,
            "md5_digest": "1dedeb46d083c48ed38bf3b926e816a1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 12489,
            "upload_time": "2019-11-13T11:09:43",
            "upload_time_iso_8601": "2019-11-13T11:09:43.352891Z",
            "url": "https://files.pythonhosted.org/packages/c0/4c/8a4bcccd4b11d3a84825eccb44122b83137b0acc1a317c2ce3b324deb1b2/dephell_discover-0.2.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2019-11-13 11:09:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dephell",
    "github_project": "dephell_discover",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "appveyor": true,
    "lcname": "dephell-discover"
}
        
Elapsed time: 0.15746s