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
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
Release history Release notifications | RSS feed
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.4.tar.gz
(11.8 kB
view details)
Built Distribution
File details
Details for the file dephell_discover-0.2.4.tar.gz
.
File metadata
- Download URL: dephell_discover-0.2.4.tar.gz
- Upload date:
- Size: 11.8 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | be80a188e5624678812f966c8cd2e6b2db6b54239fd0fdeef1abbc1babfa1d85 |
|
MD5 | 548a16c2187a1c3c00ca26f2f87c2b15 |
|
BLAKE2b-256 | 10df2f90d9fd1ee7670c2af73196f4fa3e276ef959dc0370d3bd2948b40d4bb2 |
File details
Details for the file dephell_discover-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: dephell_discover-0.2.4-py3-none-any.whl
- Upload date:
- Size: 9.2 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4f7dc826845bed65e8b8acbe8869c657915a887854fb33abf40c6a572af1e92 |
|
MD5 | 4179aba35e34d37a340a37ca363f230f |
|
BLAKE2b-256 | 2ba4d6df5155cf9bb8f9e5234f48f0bc57327d146ee612f248ae79a1c7fb2d7f |