Skip to main content

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

Project description

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

from pathlib import Path
from dephell_discover import Root

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

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

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

# package properies:
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'), ...]

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.1.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

dephell_discover-0.1.2-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dephell_discover-0.1.2.tar.gz
  • Upload date:
  • Size: 4.0 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.1.2.tar.gz
Algorithm Hash digest
SHA256 f18099c667313cdb68a41b8c18970700972d6722b62eb02252954cc87de9de7e
MD5 5c0ec5d5aed3d3483be076dcf6528c39
BLAKE2b-256 d6be4e965c11bdd5d169909c3387013f0fb9a4bb4db98ef28757a73d597cb003

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dephell_discover-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.5 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4e136ee3589cfd9a406db8a16ea2ad9c9d37f66a94569405acc0be1597eb8380
MD5 c2f53d9cf53fbee9d3b594ec95aff76a
BLAKE2b-256 89d69a00b3c4b4e74d65a028be2f2cf4a70fc8e7ec4e543da06b4626b57693ef

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