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.5.tar.gz
(12.3 kB
view details)
Built Distribution
File details
Details for the file dephell_discover-0.2.5.tar.gz
.
File metadata
- Download URL: dephell_discover-0.2.5.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2ca52485abdf48de4c4e5c38e4fd6aac028479f54923a9b4c2a7053e665632e |
|
MD5 | 45a60935b60b68986243ccbdbd6dbdc5 |
|
BLAKE2b-256 | 6dfe39c78753ac856bce3d2c3d3318d2668fba62fbbb033852616fe9f73f33db |
File details
Details for the file dephell_discover-0.2.5-py3-none-any.whl
.
File metadata
- Download URL: dephell_discover-0.2.5-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42d51269917c12a7f1c1fc52d65d12ff60e1c9833de0015f01e9f87b102860c3 |
|
MD5 | 0fb57be03f9722311450c8fc16f47f35 |
|
BLAKE2b-256 | e0dfc13d09c7862bcc0ffe0e69d8171488119ea8da1d6bb4ee56b7e08c1a17fa |