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
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
Built Distribution
File details
Details for the file dephell_discover-0.1.3.tar.gz
.
File metadata
- Download URL: dephell_discover-0.1.3.tar.gz
- Upload date:
- Size: 4.4 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 | 33fed5ea923a3c96327da7c5886e4b392b02992ef551ae8e63ca185bfc5ea360 |
|
MD5 | af0d36fea4cd42315086ef65881eb33f |
|
BLAKE2b-256 | 8ab9c3f3f0c7bdb85c0b9d9cafd7ca1eea6cd2a9bde1d137488708f59aaa50ab |
File details
Details for the file dephell_discover-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: dephell_discover-0.1.3-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 878d78f5ff2590f6849ae652abe4e4d1b8bf75364b40c8102bd9caa861a42025 |
|
MD5 | 558b9b2d97f7dfb87d8c25c46f77aeb6 |
|
BLAKE2b-256 | 6cffffdd121b74314fa1a6e05f15f7595889559fedb8c736c6adbabef8c7cf87 |