Skip to main content

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

Project description

travis appveyor MIT License

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

Installation

install from PyPI:

python3 -m pip install --user dephell_discover

Usage

Get root, packages, package_data, package dir:

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:

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:

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:

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

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

root.metainfo.license
# 'MIT'

root.metainfo.version
# '0.7.0'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dephell_discover-0.2.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

dephell_discover-0.2.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file dephell_discover-0.2.1.tar.gz.

File metadata

  • Download URL: dephell_discover-0.2.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.0

File hashes

Hashes for dephell_discover-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1e360c086527a3d9e1a838cfbaf3f11a8c904fb134b7a9a6deb97a42141aa1ad
MD5 6f0100a685254a58dd24b6c8275f2443
BLAKE2b-256 c72811ad0d91a366d04e593140c03ccd4f18eb208f05b416abcafa6137203e10

See more details on using hashes here.

File details

Details for the file dephell_discover-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: dephell_discover-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.0

File hashes

Hashes for dephell_discover-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d6d97a872dba1d4f6bdfe46900416bef5ddb5318d794337a0f77b67a5a56488
MD5 d2f10a2cc0a1eba88a3e4f67a8abd4d6
BLAKE2b-256 8877617d334bbfb6dd40ded8ff0beb19d4bb7e794ebe897111288cb21249c681

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page